Wednesday, 18 February 2015

Java frameworks their apps and configuration

Hibernate Frameworks:

Hibernate basically a ORM tool. ORM means object relation mapping.

Why do we use ORM tool:  

If we don’t want to create my application dependent on the database.We use Hibernate. In Hibernate we have to create one file named as Hibernate Configuration file. In this file we mention which
database we want to connect with our application & provide username and password of that database.
 Suppose my application is currently working on MySql and i want to switch database from MySql  to Oracle.

By using Hibernate You don’t need to change any code. You just change the database name username and password in the configuration file of Hibernate. Hibernate will automatically connected you to Oracle by compiling once.

It was started in 2001 by Gavin King as an alternative to EJB2 style entity bean. The stable release of Hibernate till July 16, 2014, is Hibernate 4.3.6.

 Java FrameworksStruts Framework:

Framework is basically come in demand because of fewer burdens faced by developers. A strut is the MVC framework. MVC means Model-View-Controller.

The struts framework was initially created by Craig McClanahan and donated to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001.Now a Days Struts2 in demand.

Firstly MVC: Model-View-Controller

Controller: Controller is your xml file which is to be read by server for the mapping of the incoming request to which page or on which servlet.
View:           View is the web-page which is shown to Clients or o/p interacting.
Model:        Mode is the business logic.

Struts give us the pattern to place right code at right place. Struts have own directory structure, if you want to make MVC application by using Struts then you have to follow the Directory structure of struts.


No comments:

Post a Comment