JavaTM EE (J2EE) Programming (with Passion!)

Sang Shin, sang.shin@sun.com, www.javapassion.com/j2ee, class forum
From March 6h, 2006:





Message to potential attendees

The 13th session started from the November 19th, 2007. The 14th and the next session will start from July 1st, 2008.  Just like other online courses I teach, this course is offered online only.   For those of you who are not sure what it's like to take this course online, please see What it's like to take Sang Shin's online courses.  Just to set the expectation correctly, there is no real-time webcasting. 

Graduates of this course


The deadline for submitting all homeworks is May 20th, 2008.  If you submitted all homeworks, please send an email to the homework alias (j2eehomeworks@sun.com) with the following information.  The subject of the email should be J2EECourse-2008-Spring.


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.  (Please read registration FAQ before you sign up.)

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...


If you have any further questions on this course, please see the course FAQ (Frequently Asked Questions).



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. Struts 27. JavaServer Faces (JSF)8. Other Web-tier Frameworks9. EJB 2.x,   10. Java EE 5/EJB 3.0/JPA,   11. Design Patterns and Best Practices,   12. Hibernate,   13. Spring framework14. Portal and Portlet

  1. Introduction
  2. Web Core Technologies: Servlet and JSP
  3. JDBC, SQL,
  4. Web-tier Security
  5. Struts
  6. Struts 2
  7. JavaServer Faces (JSF)
      • Converter (0.5 hour lecture + 0.5 hour lab)
  1. Other Web-tier Frameworks
  2. EJB 2.x
  3. Java EE 5, EJB 3.0, Java Persistence API (JPA)
  4. Design patterns, Best practices, Performance tuning, etc
  5. Hibernate
  6. Spring framework
  7. Portlets and Portal
  8. Deployment, Provisioning, and Management




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 - updated Oct. 11th, 2006

                                                                                                                   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)  - updated Oct. 13th, 2006
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)  - updated Oct. 13th, 2006
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. Lab 2 (0.5 hour) - will be provided in the future
3. 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 and homework (1 hour) - since we are not covering this topic in this course, the lab will be provided sometime in the future
3. Lab 2 (1 hour) - optional
4. 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) 









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)

                                                                                                                              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. Lab (1 hour) 
3. 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