A PRESENTATION ON
STRUTS & HIBERNATE
TUSHAR CHOUDHARY
B.TECH COMPUTER SCIENCE 4TH YEAR
GOVT. ENGG. COLLEGE BIKANER
1
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
2
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
3
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
4
Flow Diagram
Fig. 1 Model View Controller [1]
5
Advantage of Model 2 (MVC) Architecture
 Navigation control is centralized.
 Easy to maintain
 Easy to extend
 Easy to test
 Better separation of concerns [3]
6
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]
7
Flow Diagram
Fig.2 Directory Structure [2]
8
Struts 2 Architecture and Flow
 Struts 2 basic Architecture
Fig. 3 Struts 2 basic Architecture [3]
9
Struts2 Standard Architecture
Fig. 4 Structs 2 Standard Architecture [4]
10
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]
11
Flow Diagram
Fig. 5 Flow Diagram [5]
12
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]
13
Hibernate Architecture
Fig.7 This is the high level architecture of Hibernate with
mapping file and configuration file. [5]
14
Flow Diagram
Fig.8 Hibernate framework uses many objects session factory,
session [6]
15
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]
16
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/
17
18

A PRESENTATION ON STRUTS & HIBERNATE

  • 1.
    A PRESENTATION ON STRUTS& HIBERNATE TUSHAR CHOUDHARY B.TECH COMPUTER SCIENCE 4TH YEAR GOVT. ENGG. COLLEGE BIKANER 1
  • 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 2
  • 3.
    Struts2 Features Struts 2provide 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 3
  • 4.
    Struts 2 Architecture TheModel-View-Controller pattern in Struts2 is realized with following five core components: [2]  Actions  Interceptors  Value Stack / OGNL  Results / Result types  View technologies 4
  • 5.
    Flow Diagram Fig. 1Model View Controller [1] 5
  • 6.
    Advantage of Model2 (MVC) Architecture  Navigation control is centralized.  Easy to maintain  Easy to extend  Easy to test  Better separation of concerns [3] 6
  • 7.
    Steps to createStruts 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] 7
  • 8.
  • 9.
    Struts 2 Architectureand Flow  Struts 2 basic Architecture Fig. 3 Struts 2 basic Architecture [3] 9
  • 10.
    Struts2 Standard Architecture Fig.4 Structs 2 Standard Architecture [4] 10
  • 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] 11
  • 12.
    Flow Diagram Fig. 5Flow Diagram [5] 12
  • 13.
    Advantages of HibernateFramework  Open source and Lightweight  Fast performance  Database Independent query  Automatic table creation  Simplifies complex join  Provides query statistics and database status [5] 13
  • 14.
    Hibernate Architecture Fig.7 Thisis the high level architecture of Hibernate with mapping file and configuration file. [5] 14
  • 15.
    Flow Diagram Fig.8 Hibernateframework uses many objects session factory, session [6] 15
  • 16.
    Steps to createHibernate 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] 16
  • 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/ 17
  • 18.