The Java Persistence API Training Course for Struts 2 is a step-by-step introduction to building applications using the new Java persistence standard with tried and true frameworks, like Struts 2, Hibernate 3, and Spring 2.

After completing the course, you will be equipped to create and maintain basic JPA applications using Struts 2, including all necessary client-side and server-side programming.

Presentations are reinforced by workshops designed to explore common problems and best-practice solutions. This course is intended for developers who want field-savvy advice on how to get your applications working the "Struts 2 JPA Way".

h2. Audience

Developers and programmers who want to learn about web application development using JPA and Apache Struts 2.

h2. Course Objectives

* Identify and apply object relational modeling techniques

* Utilize standard unit tests to deploy JPA solutions

* Build a working JPA-enabled web application

* Explore key best practices

h2. Course Format

* Sessions include a presentation and a workshop.

* Presentations are reinforced by workshops designed to explore common problems and best practice solutions.

* Workshops are described with standard use cases.

* Source code for the completed workshops is available in the Apache Struts Sandbox.

* Other Course materials are available through the this site

h2. Prerequisites

|To benefit from this course, participants should have experience programming with Java along with a basic knowledge of HTML and HTTP. Experience with a modern Java IDE, such as [Eclipse|http://www.eclipse.org/], [IDEA|http://www.jetbrains.com/idea/], or [NetBeans|http://www.netbeans.org/], is also beneficial. |

h2. Course Status

The course is nearly code complete and being presented in the field for the first time the week of 10 Dec 2007. Source code for the completed workshops is available through the [Apache Struts Sandbox|http://svn.apache.org/viewvc/struts/sandbox/trunk/jpa-mailreader/].

h3. Course Vendors

The course is being presented "in the field" by [Struts Mentor|http://www.StrutsMentor.com].

||1-1| [Starter] / [Notes|Starter-Notes] | [Building Persistence Applications|JPA Agenda^1-1-building-jpa-apps.pdf] | We start from square one and discuss why we we need a ORM persistence solution, and how the JPA and Hibernate solve our persistence problems. In the lab, we use MyEclipse to create a simple JPA application. |

||1-2| [CRUD] / [Notes|CRUD-Notes] | [JUnit Jumpstart|JPA Agenda^1-2-testing-persistence.pdf] | The JPA encourages a layered architecture which implies a layered approach to testing. We learn how to interact with the the business and persistence layers through unit tests. In the lab, we work up a set of standard CRUD tests for our starter object. |

||1-3| [Register], [Profile] / [Notes|Register-JPA-Notes] | [Mapping Object Graphs to Relational Data|JPA Agenda^1-3-mapping-objects.pdf] | With a development infrastructure in place, we take a closer look at object relational modeling, exploring the various types of relationships and associations objects share. In the lab, we move over to the Struts MailReader use cases, and create a User entity object. |

||1-4| [Subscribe] / [Notes|Subscribe-JPA-Notes] | [Annotating Persistence Applications|JPA Agenda^1-4-annotating-persistence.pdf] | In this session, we learn how to use annotations to describe object relationships and associations that the JPA cannot deduce on its own. In the lab, we extend the User object to include other properties, including a list of subscriptions. |

| | | || Day 2 - Navigating Pages |

||2-1| [Login] / [Notes|Login-JPA-Notes] | [Querying for Persistence Objects|JPA Agenda^2-1-querying-persistence.pdf] | Retrieving objects can be the most interesting part of the CRUD quartet. In this session, we put to task the Java Persistence API Query Language (JPL). In the lab, we authenticate a MailReader user by retrieving an account by username and password. |

||2-2| [Register] ext / [Notes|Register2-JPA-Notes] | [Going beyond the JPA with Hibernate 3|JPA Agenda^2-2-beyond-jpa.pdf] | Hibernate 3 is a superset of the JPA. In this session, we look at some of the "added value" extensions offered by Hibernate 3. In the lab, we use the Hibernate validator to prevent "garbage" input. |

||2-3| [TestData] / [Notes|TestData-Notes] | [Building applications with Spring 2 Core and Java 5|JPA Agenda^2-3-managing-objects.pdf] | The JPA helps us persist objects. Spring helps us create and manage objects. In this session, we overview the core of the Spring framework and look at what utility it provides applications. In the lab, we use Spring to create fully-formed objects that we can use with our persistence tests. |

| | | || Day 3 - Designing Views |

||3-1| [dao] / [Notes|dao-Notes] | [Injecting persistence with Spring 2 Core|JPA Agenda^3-1-injecting-persistence.pdf] | JPA support is easy to hard-code into an application. Spring provides support for injecting JPA support into an application, which can simplify finely-grained transaction management and other advanced features. In the lab, we implement a MessageDAO and MessageService using the Spring JPA template. |

||3-2| [Welcome] / [Notes|Welcome-JPA-Notes] | [Building applications with Struts 2 and Java 5|JPA Agenda^3-2-building-s2-apps.pdf] | The "last mile" of development is presenting an interface to the user. In this session, we overview the Struts 2 framework architecture and explore what value it adds to web development. In the lab, we setup a starter Struts 2 project and display a welcome page. |

||3-3| [Login] UI / [Notes|Logon-JPA-Notes] | [Integrating Spring 2 Core and JPA with Struts 2|http://svn.apache.org/viewvc/struts/sandbox/trunk/jpa-mailreader/] | With a web development infrastructure in place, we walk through the Struts JPA MailReader to take a closer look at how it all fits together. (This session reviews live code rather than slides.) In the lab, we add a logon form to our web application. |

||3-3| [Login] UI / [Notes|Login-UI-JPA-Notes] | [Integrating Spring 2 Core and JPA with Struts 2|http://svn.apache.org/viewvc/struts/sandbox/trunk/jpa-mailreader/] | With a web development infrastructure in place, we walk through the Struts JPA MailReader to take a closer look at how it all fits together. (This session reviews live code rather than slides.) In the lab, we add a logon form to our web application. |

||3-4| | [Best Practices|JPA Agenda^3-4-best-practices.pdf] |Following best practices can help make an application faster to create and easier to maintain. ||