March 14

Application Flow Chart in CodeIgniter

CI

  1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
  2.  The Router examines the HTTP request to determine what should be done with it.
  3. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
  4.  Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered forsecurity.
  5. The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.
  6. The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so that on subsequent requests it can be served.
March 14

What do you means by Good Code?

 

At the time of interview, many of you faced this question, “What is Good Code”?

The answer for this  question will differ from person to person. I can define Good Code as follows;

  • Are source files organized in a clean manner and Looking at the code,  can I find code with out too much difficulty?
  • The code is well documented?
  • Is there a clear pattern to where variables are declared? Does the code have a logical flow to it and avoid unnecessary control structures?
  • Is all the functions, queries have comments for them explaining what they do in the code?

Al these above points are  from my point of view. Others can have different opinions about this.

Kindly reply, if you have different view at this

 

March 5

Web page rendering

Nowadays we all using  websites, web applications for our work. But do you know how this websites are working on internet. Here you can find the steps how the web world works:

  1. You type an URL into address bar in your preferred browser.
  2. The browser parses the URL to find the protocol, host, port, and path.
  3. It forms a HTTP request.
  4. To reach the host, it first needs to translate the human readable host into an IP number, and it does this by doing a DNS lookup on the host
  5. Then a socket needs to be opened from the user’s computer to that IP number, on the port specified (most often port 80)
  6. When a connection is open, the HTTP request is sent to the host
  7. The host forwards the request to the server software configured to listen on the specified port
  8. The server inspects the request , and launches the server plugin needed to handle the request.
  9. The plugin gets access to the full request, and starts to prepare a HTTP response.
  10. To construct the response a database is accessed. A database search is made, based on parameters in the path (or data) of the request
  11. Data from the database, together with other information the plugin decides to add, is combined into a long string of text (most probably HTML).
  12. The plugin combines that data with some meta data in the form of , and sends the HTTP response back to the browser.
  13. The browser receives the response, and parses the HTML  in the response.
  14. A DOM tree is built out of the broken HTML.
  15. New requests are made to the server for each new resource that is found in the HTML source. Go back to step 3 and repeat for each resource.
  16. Stylesheets are parsed, and the rendering information in each gets attached to the matching node in the DOM tree
  17. Javascript is parsed and executed, and DOM nodes are moved and style information is updated accordingly
  18. The browser renders the page on the screen according to the DOM tree and the style information for each node.
  19. Aftre all above steps, you will see the web page on your screen.
Category: WEB | LEAVE A COMMENT
March 1

What is the HTML DOM?

DOM

Once a web page loads, your browser generates something called a DOM, or Document Object Model, of the page. The DOM acts as as programming interface for HTML, which defines HTML properties, events, and methods. It also refers to HTML elements as objects.

The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.

The document can be further processed and the results of that processing can be incorporated back into the presented page.

This is an overview of DOM-related materials here at W3C and around the web.