a presentation on struts & hibernate
TRANSCRIPT
1
A PRESENTATION ON STRUTS & HIBERNATE
TUSHAR CHOUDHARYB.TECH COMPUTER SCIENCE 4TH YEAR
GOVT. ENGG. COLLEGE BIKANER
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
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
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
5
Flow Diagram
Fig. 1 Model View Controller [1]
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]
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]
8
Flow Diagram
Fig.2 Directory Structure [2]
9
Struts 2 Architecture and Flow
Struts 2 basic Architecture
Fig. 3 Struts 2 basic Architecture [3]
10
Struts2 Standard Architecture
Fig. 4 Structs 2 Standard Architecture [4]
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]
12
Flow Diagram
Fig. 5 Flow Diagram [5]
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]
14
Hibernate Architecture
Fig.7 This is the high level architecture of Hibernate with mapping file and configuration file. [5]
15
Flow Diagram
Fig.8 Hibernate framework uses many objects session factory, session [6]
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]
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/
18
Thank You