Powered by Blogger.

2. Introduction to FrameWork

>> Thursday, May 28, 2009

In MVC architecture based webapplication we use JSPs in view Laer servlet in controller Layer. JavaBean, EJB, Spring with Hibernate technologies in model layer.
Q. What happens if interchange technologies of these layers.?
A. We can change rolls of these technologies , but it is not recommended to do.

Reasons: If servlet is taken as view layer component

  • preesntation Logic of the webapplication changes at regulat intervals.
  • If source code of servlet is modified we need to recompile the servlet and we need to reload the webapplication.
  • If Source code of JSP is modified these is no need of recompiling JSP and reloading the webapplication.
  • Since presentation logic of webapplication changes regularly it is recommended to take JSP s as View components.
If JSP is taken as Controller
  • Integration Logic of controller is always java code.
  • Keeping Java Code in JSP is not industry standard.
  • It is always recommended to develop JSP as java codeless JSP.
  • If JSP is taken as controller it will be forced to have java code,representing integration logic which is not a recommended operation.So always prefer taking servlet as controller.
Note.:Only webComponents(Servlets, JSPs) can acts as controller Because they only can take Http request given by browser. So we can't see JavaBean, EJB, Hibernate and spring applications as controller because they can't take Http request.
These application can't act as view Layer application because they are not capable of generating web-pages.
  • If Seperates or another Servlet/JSP is taken as model layer components.
  • Business Logic placed in Servlet/JSP gives following limitations.
  • Allow only HttpClients(browsers) to access the business logic.
  • Business Logic becomes specific to one webapplication(businessLogic is not reusable).
  • Middleware services must be implemented manually.
  • To overcome these problems use EJB, Spring with hibernate to develop business logic of model layer,and take the advantage of reuability of business logic built in middle ware services under capability of allowing all types of java applications as clients(Both Http & Http Clients).
Note: Browsers are called HttpClients. Java application, awt, spring applications are called non HttpClients.

Framework is a special software that is capable of developing applications based on certain architectuere havingg ability to generate common logics of applications devolopment dynamically.
Due to framework software program need not to develop of all the logic of application. He just need to concentrate only on the logics that are specific to our applications.
Strut is a web based frame work software to develop MVC architecture based webapplication having capability of generating integration logic of controller Servlet dynamic calls.
In Struct based webbased application controller servlet is built in servlet and its integration logic will be generated dynamically By struct framework software . So programmer needs to develop only presentation , business logics.
  • Struts framework Software is designed by using servlet JSP technologies has underlaying technologies.
  • In strut based web application, MVC priciple will not be violated , because it experts source code files to programmer according to MVC principles.
  • By using struts frame work software complex operation of web application can be done easily with the support of built in wizards and (Phonics).
  • If web application developed manually with out using framework softwares are based on MVC architecture programmer needs to develop all the applications manually.
  • Compare to mannual implementation of MVC architecture(with out framework software) to develop web applications the framework software based web applications can be developed fastly.
Struts ----> Apache
JSF ----> Sun MicroSystems
Cocoon ----> Adobe
Webwork ----> OpenSymphony
Spring MVC----> Interface21.
TapStray ----> OpenCommunity
ASP.net ----> MicroSoft

Note : All java based webframe work softwares are given based on servlet JSP technologies.

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2014. All rights reserved.