Professional Documents
Culture Documents
Sitting below that library we have the lower level driver. This extension will effectively form
the glue between PHP and our system libraries ( libmongoc and libbson). This extension will
expose an identical public API for the most essential and performance-sensitive functionality:
Connection management
By decoupling the driver internals and a high-level API into an extension and PHP libraries,
respectively, we hope to reduce our maintenance burden and allow for faster iteration on new
features. As a welcome side effect, this also makes it easier for anyone to contribute to the
driver. Additionally, an identical public API will make it that much easier to port an
application across PHP runtimes, whether the application uses the low-level driver directly or
a higher-level PHP library.
GridFS is a great example of why we chose this direction. Although we implemented GridFS
in C for our old mongo driver, it is actually quite a high-level specification. Its API is just an
abstraction for accessing two collections: files (i.e. metadata) and chunks (i.e. blocks of data).
Likewise, all of the syntactic sugar found in the old mongo driver, such as processing
uploaded files or exposing GridFS files as PHP streams, can be implemented in pure PHP.
Provided we have performant methods for reading from and writing to GridFS' collections –
andDepartment of low
thanks to our CS&E, VVCE
level extensions, we will – shifting this API to PHP is win-win. Page 1
WEB DEVELOPMENT
Model:
o The Model object knows all about all the data that need to be displayed.
o The Model represents the application data and business rules that govern to an
Department of CS&E, VVCE Page 2
update of data.
WEB DEVELOPMENT
o Model is not aware about the presentation of data and How the data will be display
to the browser.
View:
o The View represents the presentation of the application.
o View object refers to the model remains same if there are any modifications in the
Business logic.
o In other words, we can say that it is the responsibility of view to maintain consistency
in its presentation and the model changes.
Controller:
o Whenever the user sends a request for something, it always goes through Controller.
o A controller is responsible for intercepting the request from view and passes to the
model for appropriate action.
o After the action has been taken on the data, the controller is responsible for directly
passes the appropriate view to the user.
o In graphical user interfaces, controller and view work very closely together.
A mixed approach between a fat and a thin client can be the solution to improve the user experience
without giving up on the browser logic. The website can be divided into different contexts that offer
the user some common functionalities. Between contexts the web page is fully reloaded, while
operations within the contexts only update some parts of the page
Department of CS&E, VVCE Page 4
WEB DEVELOPMENT