JavaTM EE (J2EE) Programming (with Passion!) Basics

Sang Shin, sangshinpassion@gmail.com, www.javapassion.com/j2ee, class forum



 



Message to potential attendees


Announcement from Sang Shin (Feb. 1st, 2010):  In the near future, the courses in javapassion.com will be available as a subscription-based service. (Yes, it is a painful decision on my part.)  If you want to receive course announcement in the future, please send an blank email to javapassion-announcement+subscribe@googlegroups.com.


If you have any further questions, please see http://www.javapassion.com/coursefaq.html#conversion


Graduates of this course


How to register for this course

In order to register for this course, all you have to do is sending a blank email to the following email alias. 

Basically, when you send a blank email to the above, you are subscribing our class forum. This forum can be used for posting questions/answers.  Please use this forum for all class related communication (technical or non-technical).  If you have any further questions on this course, please see the course FAQ below


Topics and Schedule


Note that only the topics with the dates assigned will be covered in this course. (You need to submit homeworks only on the topics that have dates.)  It is my plan to provide presentation slides and hands-on labs for the topics that do not have dates whenever I find time.

1. Introduction,   2. Web Core Technologies: Servlets and JSP,   3. JDBC/SQL/Ant/JUnit/Version Control,   4. Web-tier Security,   5. Struts,   6. JavaServer Faces (JSF)

  1. Introduction
  2. Web Core Technologies: Servlet and JSP
  3. JDBC, SQL,
  4. Web-tier Security
  5. Struts
  6. JavaServer Faces (JSF)
      • Converter (0.5 hour lecture + 0.5 hour lab)

The advanced topics such as Java EE 5, JPA, Hibernate, Spring framework, etc. are going to be covered in the Java EE Programming Advanced (with Passion!) course.




Introduction




Introduction of this course

1. Presentation slides (0.5 hour)


Java EE Overview

The objective of this session is to give you a big picture of Java EE architecture and platform and get yourself prepared for the rest of the course.  You don't have to understand everything that is described in the presentation below.  If you get reasonably good idea on what Java EE is, that should be good enough to proceed.  Please browse through the Resources below.

There is no homework in the week #1.

1. Presentation slides (1 hour)

2. Resources

                                                                                                                              return to topics





Web Core Technologies: Servlets, JSP, and JSTL





Web Application Structure

In this session, you will learn how a typical Web application is built.  You will also learn the internal structure of Web application as well as web.xml file.

1. Presentation slides (1 hour)

2. Lab (1 hour) and homework - The hands-on lab is updated with NetBeans 6.1.

                                                                                                                   return to topics

Servlet Basics


You are getting into a very important topic, Servlet.  I expect many of you who get exposed to the Servlet for the first time might feel overwhelmed by the amount of things you feel you have to absorb. Given that the Servlet technology is the most-used functionality of J2EE platform, there are in fact lots of things to learn. 

1. Presentation slides (2 hours)

2. Lab and homework (1 hour) 
3. Resources
                                                                                                                              return to topics

JSP Basics


I assume by now, most of you are relatively comfortable with building and deploying Servlet based Web applications.  In this session, you will learn basic concept of JSP (JavaServer Pages) which is as equally important Web-tier technology as Servlet.  You will also learn how to build a simple JSP pages using JavaBeans.

1. Presentation slides (2 hours)

2. Lab and homework (2 hours)
3. Resources
                                                                                                                              return to topics

Using NetBeans for Developing Web Applications


In this session, you are going to do a lab during which you exercise various features of NetBeans IDE. 

1. Lab and homework (1 hour)
2. Resources
                                                                                                                     return to topics

Servlet Advanced


By now, you have reasonably good idea on how you can use basic features of Servlets and JSP to build Web applications.  In this session, you are going to learn advanced features of Sevlets, mainly filters and life-cycle events.

1. Presentation slides - ServletAdvanced (1 hour)

2. Presentation slides - Servlet 2.4 Enhancements
3. Lab and homework (1 hour) 
4. Resources

                                                                                                                              return to topics

Session Tracking


Session tracking is a mechanism that servlets use to maintain state about a series of requests from the same user (that is, requests originating from the same browser) across some period of time.

1. Presentation slides (1 hour)

2. Lab and homework (1 hour) 
3. Resources
                                                                                                                              return to topics

Expression Language


A primary feature of JSP technology version 2.0 is its support for an expression language (EL). An expression language makes it possible to easily access application data stored in JavaBeans components. For example, the JSP expression language allows a page author to access a bean using simple syntax such as ${name} for a simple variable or ${name.foo.bar} for a nested property.

1. Presentation slides


2. Lab and homework (0.5 hour)
3. Resources

                                                                                                                              return to topics

JSP 1.2 Custom Tags - We are not covering this topic in this course


Since the introduction of JSP 2.0 style tag files, the JSP 1.2 style development of custom tags should be avoided whenever possible meaning if you can develop your custom tags using tag files, you should use tag files.  Because of that reason, we are skipping this topic in this course. 

1. Presentation slides (2 hours)


2. Lab
3. Resources


                                                                                                                   return to topics

JSP 2.0 Custom Tags


In this session, you are going learn how to build and use simple tag handler and tag file features of JSP 2.0.

1. Presentation slides (1 hour)

2. Lab and homework(1 hour) 
3. Resources
                                                                                                                              return to topics

JSTL


The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many JSP applications. Instead of mixing tags from numerous vendors in your JSP applications, JSTL allows you to employ a single, standard set of tags. This standardization allows you to deploy your applications on any JSP container supporting JSTL and makes it more likely that the implementation of the tags is optimized.

1. Presentation slides (2 hours)

2. Labs (2 hours) 
3. Resources
                                                                                                                              return to topics

Building BookStore Sample Application


In this session, you will build the "Duke's Bookstore" sample application, which is reasonably sophisticated application using different Web-tier technologies, first by using Servlets only, second by using JSP pages only, third by using JSP pages and custom tags, fourth by using JSP pages and JSTL in native format, fifth by using JSPpages and JSTL in XML format

1. Labs (2 hours) 

Applets


1. Presentation slides (2 hours)

2. Labs (2 hours) 
3. Resources
                                                                                                                              return to topics








JDBC, SQL





SQL

SQL is a standard computer language for accessing and manipulating relational databases.  Even though Java persistence technologies such as EJB 3.0 Java Persistence API (JPA) or Hibernate could insulate developers from having to know the detailes of SQL, it is still important to know the intricacies of SQL in order to be able to write highly performant Java EE applications which involves persisting data to the relational database.

1. Presentation slides (1 hour)


2. Lab (1 hour)

Since the SQL tutorial from w3cschools.com seems to be the best tutorial, I have decided to use the material as the hands-on lab for the topic of SQL.  There is no homework on this topic.
3. Resources
4. Configuration paramater values for databases
                                                                                                                             return to topics

JDBC

JDBC is standard Java API for accessing amdn manipulating relational database through SQL.  Even though Java persistence technologies such as EJB 3.0 Java Persistence API (JPA) or Hibernate could provide higher layer abstraction than JDBC, JDBC is still one of the most popular Java APIs for persisting data to the relational database.

1. Presentation slides (1 hour)


2. Lab (1 hour)
3. Resouces
                                                                                                                              return to topics





Web-tier Security



 
                                                                                                                  

Security Basics

Security is one of the most important areas of distributed computing. 


1. Presentation slides (1 hour)

2. Resouces
                                                                                                                              return to topics

Web Application Security

1. Presentation slides (1 hour)

2. Lab (1 hour) 
3. Resouces
                                                                                                                              return to topics

SSL

1. Presentation slides (1 hour)

2. Resources
                                                                                                                              return to topics

Web Application Security Threats and Counter-Measures

1. Presentation slides (1 hour)


2. Labs (1 hour) 
3. Resources
                                                                                                                              return to topics




Struts





MVC (Model-View-Controller) Framework

1. Presentation slides (1 hour)


                                                                                                                              return to topics

Struts Basics


In its short existence, Struts has established itself as a popular web application framework that is based on MVC (Model-View-Controller) architecture.  Even though new generation of Web application frameworks such as JavaServer Faces (JSF) and Tapestry are providing more advanced features, Struts is still being used widely in the field.

1. Presentation slides (1 hour)

2. Lab (2 hours) 
3. Resources
                                                                                                                              return to topics

Step by Step Guide for Building a Simple Struts Application


1. Presentation slides (1 hour)

2. Resources
                                                                                                                              return to topics

Struts Sample Applications


1. Lab (2 hours)  - the contents will be updated in the future
                                                                                                                              return to topics

Struts Tags


1. Presentation slides (1 hour)

2. Labs (2 hours)  - the contents will be updated in the future
                                                                                                                              return to topics

Struts Advanced


1. Presentation slides (1 hour)

2. Labs (2 hours) - they are not ready yet!
                                                                                                                              return to topics

Struts Validation Framework

1. Presentation slides (1 hour)

2. Lab (1 hour) - the contents will be updated in the future
                                                                                                                              return to topics

Tiles Framework

1. Presentation slides (1 hour)


2. Lab (1 hour)  - the contents will be updated in the future
3. Resources
                                                                                                                              return to topics

Struts Testing, Debugging, Logging, and Performance

1. Presentation slides (1 hour)


2. Lab (1 hour) 
3. Resources
                                                                                                                              return to topics

Struts Best Practices

1. Presentation slides (1 hour)

2. Best practices

                                                                                                                              return to topics

Struts and Databases

1. Presentation slides (1 hour)


2. Resources
                                                                                                                              return to topics


Struts Security

1. Presentation slides (1 hour)




                                                                                                                              return to topics




JavaServer Faces (JSF)





Building "Hello World" JSF applications


This is to build and run a simplest possible JSF application step by step and make sure the software is working correctly.

1. Lab  (1 hour)

                                                                                                                    return to topics

Step by step for building "Guess a Number" JSF application

You are going to build a simple "Hello World" sample JavaServer Faces (JSF) application exercising the basic features of a typical MVC-based Web application framework of JSF architecture such as request dispatching, navigation, event handling, and so on.  These features will be more clearly explanined in the following presentation - JSF Basics - but the goal is to build an application first and see how it works.


1. Presentation slides

2. Lab  1 - Do Exercise 1 & 2! (1 hour)

                                                                                                                    return to topics


JSF basics

The basic concepts of JSF architecture and features will be discussed.

1. Presentation slides (1.5 hour)

2. Resources

                                                                                                                    return to topics


JSF Component Model

1. Presentation slides (1.5 hour)

2. Lab (1 hour)

In JSF framework, a component tree gets constructed whenever a page (that contains JSF UI components are used) is accessed.  Since this component tree is a fundamental piece of JSF architecture, it is important to understand the concept of it.  This lab lets you access and display this component tree.
3. Resources


JSF tags

One popular markup language that your application will support is obviously HTML.  In this session, you will learn various JSF-based tags for the HTML browser client.


1. Presentation slides (1 hour)

2. Lab 1 (0.5 hour)
3. Lab 2
4. Resources

                                                                                                                    return to topics


Managed Beans


1. Presentation slides (1 hour)

2. Lab 1 - Do the exercise 3 (1 hour)
3. Resources

                                                                                                                    return to topics


Navigation

1. Presentation slides (1 hour)

2. Lab 1 - Do the exercise 4 (1 hour)
3. Lab 2
4. Resources

                                                                                                                    return to topics


Event model

1. Presentation slides (1.5 hour)  - todo: add differences between action and actionListerner in JSF 1.2

2. Lab (1.5 hour)
3. Resources


                                                                                                                    return to topics

Life-cycle and PhaseListener

1. Presentation slides (1.5 hour)

2. Lab 

3. Resources

                                                                                                                    return to topics

Immediate Attribute

1. Presentation slides (0.5 hour)

2. Lab 

3. Resources

                                                                                                                    return to topics

Styling with CSS

1. Presentation slides (1.5 hour)

2. Lab

3. Resources

                                                                                                                    return to topics




Validation

1. Presentation slides (1.5 hour) - todo: make sure all validation strategies are covered

2. Lab 1 - Do the exercise 5! (20 minutes)
3. Lab 2
3. Resources

                                                                                                                    return to topics


Client-side Vadliation

1. Presentation slides (1.5 hour)

2. Lab

3. Resources

                                                                                                                    return to topics

Converter

1. Presentation slides (1.5 hour) - todo: list all built-in converters

2. Lab
3. Resources

                                                                                                                    return to topics


Data Table

1. Presentation slides (1.5 hour)

2. Lab
3. Resources

                                                                                                                    return to topics

JSF and Persistence (JPA)

1. Presentation slides (1.5 hour)

2. Lab
3. Resources

                                                                                                                    return to topics

Walk-through of CarStore Sample Application

1. Presentation slides (1.5 hour)

2. Lab 

                                                                                                                    return to topics


Walk-through of BookStore6 Sample Application


Java EE 5 tutorial comes with sample JSF application called bookstore6 in the form of NetBeans project.

1. Lab 

                                                                                                                    return to topics


Building Some JSF Sample Applications


1. Lab

                                                                                                                    return to topics

Tiles

1. Presentation slides (1.5 hour) - todo: How tiles are integrated with JSF

2. Lab 

3. Resources

                                                                                                                 return to topics

NetBeans Visual Web Pack Basics

1. Presentation slides (1.5 hour)

2. Lab 
3. Resources

                                                                                                                 return to topics

NetBeans Visual Web Pack Advanced


1. Lab 
2. Resources

                                                                                                                 return to topics


Building a JSF Component

1. Presentation slides (1.5 hour)

2. Presentation slides - this is JavaOne 2007 presentation by Kito Man

3. Lab 1

4. Lab  2

5. Resources

                                                                                                                    return to topics



RenderKit

1. Presentation slides (1.5 hour)

2. Lab  

Shale Dialog

1. Presentation slides (1.5 hour)

2. Lab
3. Lab 2
4. Resources


                                                                                                                              return to topics

Facelets

1. Presentation slides  (originally by Çagatay Çivici, modified slightly by Sang Shin)

2. Lab 1 (1.5 hour)
3. Lab 2 (1 hour)
4. Lab 4 (1 hour) - Optional
5. Resources
                                                                                                                              return to topics

Spring Web Flow and JSF

1. Presentation slides (1 hour)


2. Presentation slides (1.5 hour) - This is JavaOne 2007 presentation
3. Lab  
4. Resources

                                                                                                                    return to topics

Spring framework and JSF integration

1. Presentation slides (1.5 hour) - This is JavaOne 2007 presentation by Kito Mann and Chris Richardson

2. Lab
4. Resources

                                                                                                                    return to topics




JSFTemplating

1. Presentation slides (1.5 hour) - This is JavaOne 2007 presentation by xxx

2. Lab  
3. Resources

                                                                                                                    return to topics

Building Useful Components (from Core JSF book)

1. Presentation slides (1.5 hour)

2. Lab  1


Tomahawk JSF Components (from MyFaces Apache project)


1. Lab 
2. Resources

                                                                                                                    return to topics

ADF components


1. Lab
 
2. Resources

                                                                                                                    return to topics


Misc. 3rd party JSF components


1. Resources

                                                                                                                    return to topics



DynaFaces 


1. Presentation slide - Introduction to DynaFaces

2. Presentation slide - Using DynaFaces

3. Labs (2 hours)
3. Resources

                                                                                                                    return to topics


Ajax4jsf


1. Lab 



                                                                                                                    return to topics




JSF and Portlets

1. Presentation slides (1.5 hour)

2. Lab 
3. Resources


                                                                                                                    return to topics

Testing tools

1. Presentation slides (1.5 hour)

2. Lab  
3. Resources

                                                                                                                    return to topics

Localization

1. Presentation slides (1.5 hour)

2. Lab  
3. Resources

                                                                                                                    return to topics





EJB 2.x (as part of J2EE 1.4)





EJB 2.x Overview

1. Presentation slides (1 hour)

2. Lab and homework (2 hours) - work in progress
                                                                                                                              return to topics

Message Driven Bean (MDB)


                                                                                                                              return to topics

JMS

1. Pre-class reading

2 Presentation slides (1 hour)

3. Lab and homework (2 hours)
4. Resources

                                                                                                                              return to topics

Session Bean (EJB 2.x)

1. Presentation slides (1 hour)

                                                                                                                              return to topics

Entity Beans (EJB 2.x)

1. Presentation slides (1 hour)

                                                                                                                              return to topics