Some Stuff that might be asked in Interview.

  1. We had a CGI platform than why we used Servlet ?
  • CGI creates process where servlets create threads on each requests. OK then what ?
  • Process needs a special memory block so each new process will occupy a special memory block. so the more requests the more memory gets absorbed.
  • While threads share the same memory space if threads are in process they share same memory area.
  • Servlets are server based java application that can link directly to the Web server where as CGI stands for Common Gateway Interface and can't link directly to the web server.
  • Servlets share data among each other whereas CGI does not provide sharing property.
  • Servlets are good in Performing Session Tracking and caching of previous computations as it is server based application. As CGI don't as they are dependent on process.
Okay good So servlets were used due to above reasons

Then how did Jsp came to picture?
  • As a  limitation of CGI servlet came into picture and as a result of limitation of Servlet  jsp came to picture because in servlet there was a common coding for business logic and presentation logic where as in jsp we have separate logic for presentation and business so each time by change of code we did not need to recompile the code.
                            
So the order is CGI⇨⇨⇨Servlet ⇨⇨⇨JSP.

What was the architecture that developer's used to perfrom previously?
  • Model 1 architecture were used more previously 
And Now ?

Now MVC's are used more ..

Why what was the limitations of the Previous one we may use still that ..!!

  • In model 1 architecture the control for navigation was decentralized since every page contains the logic to determine the next page.If Jsp page name is changed that is referred in all other pages than we have to change in all the pages containing it.
  • Second is time consuming we take more time to develop custom tags in jsp. So that we dont need to use Scriplet tag.
Okay then How does MVC resolves this pitfall ?
  • In MVC we write the code controller but the thing is that the whole stuff we have to write by ourselves and change in controller must rebuild the system.
Hope you might have enjoyed we will see MVC architecture from the base level in simple language cheers..!! 


Comments

Popular posts from this blog

State space search / blocks world problem by heuristic approach /TIC TAC TOE

Navigation in Vaadin.

Drag and drop items from one Grid to another