You are on page 1of 4

PMAS-Arid Agriculture University Rawalpindi

University Institute of Information Technology


Assignment no 1

MVC (Model View Controller)


MVC stands for Model-View-Controller, and its an idea behind application
development to separate the 3 main pieces of the application into their own
isolated environments.
There are three major components of any given application, be it a desktop
application, mobile application, or a web-based application. These three
components are the Controller, the View, and the Model
The Controller:
The Controller is essentially the traffic cop of the application, directing traffic
to where it needs to go, figuring out which view it needs to load up, and
interacting with the appropriate models. For example, when you go to login
to your email on a website, the controller is going to tell the application that
it needs to load the login form view. Upon attempting to login, the controller
will load the model that handles logins, which will check if the username and
password match what exists within the system. If successful, the controller
will then pass you off to the first page you enter when logging in, such as
your inbox. Once there, the inbox controller will further handle that request.
The View:
In a web-based application, the view is exactly what it sounds like: the visible
interface that the user interacts with, displaying buttons, forms, and
information. Generally speaking, the controller calls up the view after
interacting with the model, which is what gathers the information to display
in the particular view.
The Model:
The Model is where data from the controller and sometimes the view is
actually passed into, out of, and manipulated. Keeping in mind our last
example of logging into your web-based email, the model will take the
username and password given to it from the controller, check that data

against the stored information in the database, and then render the view
accordingly. For example, if you enter in an incorrect password, the model
will tell the controller that it was incorrect, and the controller will tell the view
to display an error message saying something to the effect of Your
username or password is incorrect.
Essentially, it allows for the programmer to isolate these very separate
pieces of code into their own domain, which makes code maintenance and
debugging much simpler than if all of these items were chunked into one
massive piece. If I have a problem with an application not displaying an error
message when it should, I have a very specific set of locations to look to see
why this is not happening. First I would look at the Login Controller to see if
it is telling the view to display the error. If thats fine, I would look at the
Login Model to see if it is passing the data back to the controller to tell it
that it needs to show an error. Then if thats correct, the last place it could be
happening would be in the Login View.
Using this development pattern allows for very easy maintenance, as well as
independent development of pieces of the same system by different
programmers, which makes for quick turnover of applications all while still
maintaining a very high standard of quality for the application.

ORM (Object Relational Mapping)


Object-relational mapping (ORM) is a mechanism that makes it possible to
address, access and manipulate objects without having to consider how
those objects relate to their data sources.
Merits:
1. Huge reduction in code.ORM tools provide a host of services thereby
allowing developers to focus on the business logic of the application
rather than repetitive CRUD (Create Read Update Delete) logic.
2. Concurrency support: Support for multiple users updating the same
data simultaneously.
3. Changes to the object model are made in one place. One you update
your object definitions, the ORM will automatically use the updated
structure for retrievals and updates.
4. Cache management: Entities are cached in memory thereby reducing
load on the database.
Bootstrap:

A technique of loading a program into a computer by means of a few initial


instructions which enable the introduction of the rest of the program from an
input device.

1. Speed of Development
Undoubtedly one of the biggest advantages of using Bootstrap is the speed
of development. If youre looking to push out a new website or application
quickly, you should definitely consider using Bootstrap.
Rather than coding from scratch, Bootstrap enables you to utilize ready
made blocks of code to help you get started. Combine that with crossbrowser compatibility and CSS-Less functionality, many hours of coding can
be saved. To achieve the fastest route possible, you can also purchase readymade Bootstrap themes and modify them to suit your needs.

2. Responsiveness
Mobile devices continue to grow in popularity year after year.. The need to
have a responsive website is becoming increasingly important.
Creating mobile ready websites is a breeze with Bootstrap thanks to the fluid
grid layout that dynamically adjusts to the proper screen resolution. There is
virtually no work that needs to be done to achieve proper responsiveness.
3. Consistency
Bootstrap was actually founded on this principle. It was originally
developed by a few Twitter employees as a framework to encourage
consistency across internal tools. Co-Founder Mark Otto later realized it had
potential beyond just an internal toolkit and released the first open-source
version in August 2011.
Mark also describes how Bootstrap was built using one core concept: pairing
designers with developers. Doing so is what made Bootstrap successful at
Twitter, and why it continues to be successful on the web.

Put simply, Bootstrap ensures consistency regardless of whos working on


the project. In addition, results are uniform across platforms so output
remains the same whether youre using Firefox, Chrome or Internet Explorer.
4. Customizable
Bootstrap can be tailor made according to the specifications of your project.
Developers have the ability to pick and choose the features that are needed
and the rest can be tossed. This is easily accomplished using the Bootstrap
customize page. Simply tick off all the features you dont need and your
custom version of Bootstrap will be ready for download. How cool is that?
5. Support
Bootstrap has a huge support community behind it so you can usually get
help when you run into issues. Furthermore, Bootstrap itself is being
continuously updated and the creators have been really good about putting
out timely updates. Its currently being hosted, developed and maintained
on GitHub with over 9,000 commits and over 500 contributors.
Conclusion
As you can see, there are several benefits to using Bootstrap. The framework
allows for rapid, responsive development that is consistent and well
supported by the development and design community.
R
afia Nawaz
BSCS 4th semester

You might also like