Download - A PRESENTATION ON STRUTS & HIBERNATE
![Page 1: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/1.jpg)
1
A PRESENTATION ON STRUTS & HIBERNATE
TUSHAR CHOUDHARYB.TECH COMPUTER SCIENCE 4TH YEAR
GOVT. ENGG. COLLEGE BIKANER
![Page 2: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/2.jpg)
2
What is Struts ?
The struts 2 framework is used to develop MVC-based web application. 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. The current stable release of Struts2 is 2.3.15.1 GA in July 16, 2013. [1]
Struts 2 Framework Struts 2 are the combination of web work framework of opensymphony and
struts 1. struts2 = webwork + struts1
![Page 3: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/3.jpg)
3
Struts2 Features
Struts 2 provide many features that were not in struts 1. The important features of struts 2 framework are as follows: [2] Configurable MVC components POJO based actions AJAX support Integration support Various Result Types Various Tag support Theme and Template support
![Page 4: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/4.jpg)
4
Struts 2 Architecture
The Model-View-Controller pattern in Struts2 is realized with following five core components: [2] Actions Interceptors Value Stack / OGNL Results / Result types View technologies
![Page 5: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/5.jpg)
5
Flow Diagram
Fig. 1 Model View Controller [1]
![Page 6: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/6.jpg)
6
Advantage of Model 2 (MVC) Architecture
Navigation control is centralized. Easy to maintain Easy to extend Easy to test Better separation of concerns [3]
![Page 7: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/7.jpg)
7
Steps to create Struts 2 Application Create the directory structure Create input page (index.jsp) Provide the entry of Controller in (web.xml) file Create the action class (Product.java) Map the request with the action in (struts.xml) file and define the view components Create view components (welcome.jsp) load the jar files start server and deploy the project [3]
![Page 8: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/8.jpg)
8
Flow Diagram
Fig.2 Directory Structure [2]
![Page 9: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/9.jpg)
9
Struts 2 Architecture and Flow
Struts 2 basic Architecture
Fig. 3 Struts 2 basic Architecture [3]
![Page 10: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/10.jpg)
10
Struts2 Standard Architecture
Fig. 4 Structs 2 Standard Architecture [4]
![Page 11: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/11.jpg)
11
What is Hibernate?
Hibernate Framework This hibernate 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. It simplifies the development of java application to interact with the database.
Hibernate is an open source, lightweight, ORM (Object Relational Mapping) tool. An ORM tool simplifies the data creation, data manipulation and data access. It is a
programming technique that maps the object to the data stored in the database. [5]
![Page 12: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/12.jpg)
12
Flow Diagram
Fig. 5 Flow Diagram [5]
![Page 13: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/13.jpg)
13
Advantages of Hibernate Framework Open source and Lightweight Fast performance Database Independent query Automatic table creation Simplifies complex join Provides query statistics and database status [5]
![Page 14: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/14.jpg)
14
Hibernate Architecture
Fig.7 This is the high level architecture of Hibernate with mapping file and configuration file. [5]
![Page 15: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/15.jpg)
15
Flow Diagram
Fig.8 Hibernate framework uses many objects session factory, session [6]
![Page 16: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/16.jpg)
16
Steps to create Hibernate Application Create the hibernate application without IDE. we need to follow following steps: Create the Persistent class Create the mapping file for Persistent class Create the Configuration file Create the class that retrieves or stores the persistent object Load the jar file Run the hibernate application without IDE [6]
![Page 17: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/17.jpg)
17
References
http://www.javatpoint.com/struts-2-tutorial https://struts.apache.org/ http://www.tutorialspoint.com/struts_2/ http://www.javatpoint.com/hibernate-tutorial http://www.tutorialspoint.com/hibernate/ http://hibernate.org/
![Page 18: A PRESENTATION ON STRUTS & HIBERNATE](https://reader036.vdocuments.net/reader036/viewer/2022082904/589c4e271a28ab227d8b634f/html5/thumbnails/18.jpg)
18
Thank You