PHP ZCE mock test, interview preparation, daily lessons under chalk talk

Monday, June 11, 2012

How does MVC pattern work?

How does MVC pattern work?


MVC ie Model View Controller pattern is a methodology for separating the business
logic (model) from the display logic (view) and the decisional controls (controller).


When a User clicks on a URL say http://php-geeks-wink.blogspot.in/ below are the steps processed
1. Front Controller receives the request and sets up the environment.
2. Thereon request reaches the controller.
3. Controller interacts with Model to perform any db queries.
4. Control then reaches to View, preparing the response.
5. Response is then sent back to the browser.

Tuesday, June 5, 2012

Difference between div and table


What is the difference between a div and table? When will you prefer one over the other?

1. Tables are quite acceptable for displaying layout elements that are in a tabular layout format. On the other hand, divs do not restrict the layout to tabular format. Instead, a div is like a “floating box” that can be positioned anywhere you want.

2. Divs helps seperating content from presentation.

3. Table make it more difficult for the search engine to find relevant information.