17

Click here to load reader

J2EE Struts with Hibernate Framework

  • Upload
    mparth

  • View
    32

  • Download
    5

Embed Size (px)

Citation preview

Page 1: J2EE Struts with Hibernate Framework

J2EE STUTS WITH HIBERNATE FRAMEWORK

BY:-Parth Mewara

IT IV Year

Page 2: J2EE Struts with Hibernate Framework

JAVA – A brief Introduction J2EE – Use and Need Servlets JSP Struts Hibernate

Topics to Cover

Page 3: J2EE Struts with Hibernate Framework

Java is a computer programming language object-oriented "write once, run anywhere" (WORA) Developed by James Gosling and team at

Sun Microsystems Released in 1995.

JAVA – A brief Introduction

Page 4: J2EE Struts with Hibernate Framework

Major release versions of Java, along with their release dates:

JDK 1.0 (January 21, 1996) JDK 1.1 (February 19, 1997) J2SE 1.2 (December 8, 1998) J2SE 1.3 (May 8, 2000) J2SE 1.4 (February 6, 2002) J2SE 5.0 (September 30, 2004) Java SE 6 (December 11, 2006) Java SE 7 (July 28, 2011) Java SE 8 (March 18, 2014)

Versions of JAVA

Page 5: J2EE Struts with Hibernate Framework

JAVA

J2SEJava Standard

Edition

J2MEJava Micro

Edition

J2EEJava

Enterprise Edition

Variants of JAVA

Page 6: J2EE Struts with Hibernate Framework

The Java 2 Enterprise Edition (J2EE) is Multi-tiered architecture Implementing Enterprise-class applications Web based applications. Open and standard based platform for

developing, deploying and managing n-tier, Web-enabled, server-centric, and component-

based enterprise applications.

J2EE

Page 7: J2EE Struts with Hibernate Framework

Component based model Container provided services Highly Scalable Simplified Architecture Flexible security model

J2EE Features

Page 8: J2EE Struts with Hibernate Framework

Application clients and applets. Java Servlet and Java Server Pages technology (Web

Container) Enterprise JavaBeans components (enterprise beans)

(EJB Container)

J2EE Components

Page 9: J2EE Struts with Hibernate Framework

Used to develop Server-Side applications. Java Servlets Java Server Pages Java Server Faces

J2EE Uses

Page 10: J2EE Struts with Hibernate Framework

JSP (Java Server Pages) :- Alternate way of creating servlets JSP is written as ordinary HTML, with merged Java. The Java is enclosed in special tag.

JSP files must have the extension .jsp JSP is translated into a Java servlet, which is then compiled

Servlets are run in the usual way The browser or other client sees only the resultant

HTML, as usual

JSP

Page 11: J2EE Struts with Hibernate Framework

Life Cycle of JSP

Page 12: J2EE Struts with Hibernate Framework

JSP initialization The jspInit() method is executed at the start and only once.

If the JSP developer needs to perform any JSP-specific initialization such as database connections at the beginning this method can be specified.

JSP execution* public_service(HttpServletRequest req, HttpServletResponse

res)

{//code}

JSP termination<%! public void jspDestroy(){ . . . } %>

Architecture of JSP

Page 13: J2EE Struts with Hibernate Framework

Struts is a set of cooperating classes, Servlets, and JSP tags that make up a reusable MVC 2 design.

Hence, Struts is a framework, rather than a library. Contains an extensive tag library and utility classes that

work independently of the framework.

Struts

Page 14: J2EE Struts with Hibernate Framework

Object-relational mapping (ORM) solution for Java Data made persistent by storing in a database Hibernate takes care of this for us

Hibernate

Page 15: J2EE Struts with Hibernate Framework

JDBC maps Java classes to database tables (and from Java data types to SQL data types)

Hibernate automatically generates the SQL queries.

Hibernate provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.

Makes an application portable to all SQL databases.

Hibernate over JDBC

Page 16: J2EE Struts with Hibernate Framework

Hibernate Architecture

Page 17: J2EE Struts with Hibernate Framework

THANK YOU