What is framework?

What is framework?

A framework is a set of conceptural structure and guidelines used to build something useful

A framework may include predefined classes and functions that can be used to process input, manage hardware devices, and interact with system software

Why use Framework?

• Collection of tools • No need to start from scratch • Save Time • Improve Productivity • Clean Code • Reusable Code • Testing • Debugging

Web Framework

A Web Framework (WF) or Web Application Framework (WAF) which helps to build Web Applications. Web frameworks provide tools and libraries to simplify common web development operations. This can include web services, APIs, and other resources. Web frameworks help with a variety of tasks, from templating and database access to session management and code reuse. More than 80% of all web app frameworks rely on the Model View Controller architecture.

Model View Template (MVT)

The MVT is an design pattern that separates an application into three main logical components Model, View, and Template. Each of these component has their own role in a Project.

Model

The Model responsible to handle database. It is a data access layer which handles the data.

View

The user can send request by interacting with template, the view handles these requests and sends to Model then get appropriate response from the Model, sends response to template. It may also have required logics. It works as a mediator between Template and Model.

Template

It represents how data should be presented to the application user. User can read or write the data from template. Basically it is responsible for showing end user content, we can say it is user interface. It may consists of HTML, CSS, JS mixed with Django Template Language.

Why use MVT

• Organized Code • Independent Block • Reduces the complexity of web applications • Easy to Maintain • Easy to modify

Basic Structure in Django framework