Java


Course Information

We, in collaboration with nTier Training, offer highly-customised Java training to technical teams, teaching everything from fundamentals to advanced techniques. The comprehensive catalogue includes Java SE, Java EE, Web Programming, SOAP and RESTful Web Services, EJB, Spring, Hibernate and more.

Java tops the TIOBE index as the world’s most popular programming language, which comes as no surprise to those familiar with Java’s benefits, including the ability to write better code with fewer bugs, lower software maintenance costs, reduced time to market, design patterns, and a library of powerful, well-designed APIs.

Design Patterns Boot Camp

This intense training experience takes a problem-solving approach to learning the 23 design patterns as noted in the book, “Design Patterns: Elements of Reusable Object-Oriented Software” by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Separated into 15 percent lecture and 85 percent hands-on labs, participants will possess a working knowledge of design patterns and their benefits upon completion of this course.

 

Audience: Software developers wanting to fully understand and practice the 23 design patterns as outlined in the Gang of Four book, “Design Patterns: Elements of Reusable Object-Oriented Software”.

 

Course Duration: 5 days

 

Prerequisites:

Software developers who have been using the Java language for at least the last six months in a production environment.

 

Course Objectives:

  • Provide problem-solving skills through 23 different design patterns to develop proper object-oriented code
  • Categorize and recognize the types of patterns needed given code that has been poorly created
  • Recognize object-oriented principles being applied with each of the patterns
  • Discern the pros and cons between the patterns

 

Course Outline:

Each of the 23 patterns will be discussed in its own section:

  • Simple Factory / Factory Method
  • Abstract Factory
  • Builder
  • Template
  • Singleton
  • Prototype
  • Adapter
  • Decorator
  • Bridge
  • Composite
  • Façade
  • Flyweight
  • Proxy
  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Visitor

Introduction to Java Programming

Our Introduction to Java course is intended for programmers with experience in languages other than Java, but who may or may not have any previous Java experience. It focuses on procedural-coding skills first, and then offers meticulous, in-depth coverage of object-oriented concepts and how to apply them to Java software design and development. The latter part of the course moves from these basic skills into key parts of the Core API, including collections, exception handling and object serialization.

Students come to Java from a wide range of backgrounds, and this course is designed to be as flexible as possible for that reason.

 

Course Duration: 5 days

 

Prerequisites:

No prior Java experience is required, but students should be experienced programmers in another third-generation (high-level) language. This course can be customized to fit any skill level.

 

Course Objectives:

  • Chiefly, learn to program effectively in the Java language
  • Understand the Java software architecture and the design decisions that make Java software portable, efficient, secure and robust
  • Learn how to configure a simple Java development environment
  • Know the grammar, data types and flow control constructs of the Java language for simple procedural programming
  • Understand Java as a purely object-oriented language, and implement software as systems of classes
  • Implement and use inheritance and polymorphism, including interfaces and abstract classes
  • Design appropriate exception handling into Java methods
  • Understand the structure of streams in Java, and learn how to use streams to manage file I/O
  • Learn how to use Java Serialization to internalize and externalize potentially complex graphs of objects

 

Course Outline:

  • The Java Environment
    • Overview of Architecture
    • Forms for Java Software
    • Three Platforms
    • Java Virtual Machine
    • The Core API
    • Java Runtime Environment
    • Java SDK
    • Java Class Path
    • Portability and Efficiency
  • Language Fundamentals
    • Source File Format
    • Application Classes
    • Code Grammar and Expressions
    • Identifiers
    • Literals
    • Operators
    • Expressions
    • Calling Methods
  • Data Types
    • Primitive Types
    • Type Conversion
    • Numeric Types
    • Characters and Booleans
    • Java 1.5: Enumerations
    • Object References
    • Comparing and Assigning References
    • Strings
    • Arrays
  • Flow Control
    • The main Method
    • Calling and Returning from Methods
    • Conditional Constructs
    • Looping Constructs
    • Java 1.5: The For-Each Loop
    • Processing Arrays
    • Recursion
  • Object-Oriented Software
    • Complex Systems
    • Abstraction
    • Classes and Objects
    • Responsibilities and Collaborators
    • UML
    • Relationships
    • Visibility
  • Classes and Objects
    • Java Classes
    • Constructors and Garbage Collection
    • Naming Conventions and JavaBeans
    • Packages and imports
    • Relationships Between Classes
    • Using this
    • Visibility
    • Overloading Methods
    • JARs
  • Inheritance and Polymorphism in Java
    • Extending Classes
    • Using Derived Classes
    • Type Identification
    • Compile-Time and Run-Time Type
    • Polymorphism
    • Overriding Methods
    • Superclass Reference
  • Using Classes Effectively
    • Class Loading
    • Static Members
    • Statics and Non-Statics
    • Static Initializers
    • Prohibiting Inheritance
    • Costs of Object Creation
    • Strings and StringBuffers
    • Controlling Object Creation
  • Interfaces and Abstract Classes
    • Separating Interface and Implementation
    • UML Interfaces and Realization
    • Defining Interfaces
    • Implementing and Extending Interfaces
    • Abstract Classes
  • Collections
    • Dynamic Collections
    • Collections vs. Arrays
    • The Collections API
    • Abstraction: The Collection Interface
    • Vector, LinkedList, ArrayList
    • Reading Elements and Downcasting
    • Collecting Primitive Values
    • Algorithmic Programming
    • Iterators
    • Maps
    • Sorted Collections
    • Java 1.5: Generics
    • Java 1.5: Auto-Boxing
    • Java 1.5: Type-Safe Collections
    • Java 1.5: Variable Argument Lists
    • Java 1.5: Formatted Output
  • Exception Handling
    • Reporting and Trapping Errors
    • Exception Handling
    • Throwing Exceptions
    • Declaring Exceptions per Method
    • Catching Exceptions
    • The finally Block
    • Catch-and-Release
    • Chaining Exceptions
  • Inner Classes
    • Passing Behavior
    • Named Inner Classes
    • Outer Object Reference
    • Static Inner Classes
    • Anonymous Inner Classes
  • The Java Streams Model
    • Delegation-Based Stream Model
    • InputStream and OutputStream
    • Media-Based Streams
    • Filtering Streams
    • Readers and Writers
  • Working with Files
    • File Class
    • Modeling Files and Directories
    • File Streams
    • Random-Access Files
  • Advanced Stream Techniques
    • Buffering
    • Data Streams
    • Push-Back Parsing
    • Byte-Array Streams and String Readers and Writers
  • Java Serialization
    • The Challenge of Object Serialization
    • Serialization API
    • Serializable Interface
    • ObjectInputStream and ObjectOutputStream
    • The Serialization Engine
    • Transient Fields
    • readObject and writeObject
    • Externalizable Interface

Intermediate Java

Our intermediate Java training course teaches programming in the Java language – the Java 2 Standard or J2SE platform. It is intended for students with previous Java experience or training who already know the fundamentals of the Java architecture and basic procedural programming. This course provides in-depth coverage of object-oriented concepts and how to apply them to Java software design and development. The latter part of the course moves key parts of the J2SE Core API, including collections, exception-handling, logging, streams and object serialization.

 

Course Duration: 5 days

 

Prerequisites:

Students must be able to write, compile, test and debug simple Java programs using structured programming techniques, strong data types and flow- control constructs such as conditionals and loops. At least six months of Java experience is recommended.

 

Course Objectives:

  • Chiefly, learn to program effectively in the Java language
  • Understand Java as a purely object-oriented language, and implement software as systems of classes
  • Implement and use inheritance and polymorphism, including interfaces and abstract classes
  • Design appropriate exception handling into Java methods
  • Use the standard logging API to write diagnostic information at runtime
  • Understand the structure of streams in Java, and learn how to use streams to manage file I/O
  • Learn how to use Java Serialization to internalize and externalize potentially complex graphs of objects

 

Course Outline:

  • Review of Java Fundamentals
    • The Java Architecture
    • Forms for Java Software
    • Three Platforms
    • The Java Language
    • Numeric Types
    • Characters and Booleans
    • Java 5.0: Enumerations
    • Object References
    • Strings and Arrays
    • Conditional Constructs
    • Looping Constructs
    • Java 5.0: The For-Each Loop
  • Object-Oriented Software
    • Complex Systems
    • Abstraction
    • Classes and Objects
    • Responsibilities and Collaborators
    • UML
    • Relationships
    • Visibility
  • Classes and Objects
    • Java Classes
    • Constructors and Garbage Collection
    • Naming Conventions and JavaBeans
    • Packages and Imports
    • Relationships Between Classes
    • Using this
    • Visibility
    • Overloading Methods
    • JARs
  • Inheritance and Polymorphism in Java
    • Extending Classes
    • Using Derived Classes
    • Type Identification
    • Compile-Time and Run-Time Type
    • Polymorphism
    • Overriding Methods
    • Superclass Reference
  • Using Classes Effectively
    • Class Loading
    • Static Members
    • Statics and Non-Statics
    • Static Initializers
    • Prohibiting Inheritance
    • Costs of Object Creation
    • Strings and StringBuffers
    • Controlling Object Creation
  • Interfaces and Abstract Classes
    • Separating Interface and Implementation
    • UML Interfaces and Realization
    • Defining Interfaces
    • Implementing and Extending Interfaces
    • Abstract Classes
  • Collections
    • Dynamic Collections
    • Collections vs. Arrays
    • The Collections API
    • Abstraction: The Collection Interface
    • Vector, LinkedList, ArrayList
    • Reading Elements and Downcasting
    • Collecting Primitive Values
    • Algorithmic Programming
    • Iterators
    • Maps
    • Sorted Collections
    • Java 1.5: Generics
    • Java 1.5: Auto-Boxing
    • Java 1.5: Type-Safe Collections
    • Java 1.5: Variable Argument Lists
    • Java 1.5: Formatted Output
  • Exception Handling
    • Reporting and Trapping Errors
    • Exception Handling
    • Throwing Exceptions
    • Declaring Exceptions per Method
    • Catching Exceptions
    • The finally Block
    • Catch-and-Release
    • Chaining Exceptions
  • Inner Classes
    • Passing Behavior
    • Named Inner Classes
    • Outer Object Reference
    • Static Inner Classes
    • Anonymous Inner Classes
  • The Java Streams Model
    • Delegation-Based Stream Model
    • InputStream and OutputStream
    • Media-Based Streams
    • Filtering Streams
    • Readers and Writers
  • Working with Files
    • File Class
    • Modeling Files and Directories
    • File Streams
    • Random-Access Files
  • Advanced Stream Techniques
    • Buffering
    • Data Streams
    • Push-Back Parsing
    • Byte-Array Streams and String Readers and Writers
  • Java Serialization
    • The Challenge of Object Serialization
    • Serialization API
    • Serializable Interface
    • ObjectInputStream and ObjectOutputStream
    • The Serialization Engine
    • Transient Fields
    • readObject and writeObject
    • Externalizable Interface

Advanced Java

This advanced Java course focuses on building skill sets frequently used by mature Java developers. After participating, students will be able to better use strategic libraries in order to understand how the core language and various frameworks leverage key concepts like reflection, Aspect Oriented Programming (AOP), generics and concurrency.

 

Course Duration: 3 days

 

Prerequisites:

To succeed in this course, participants need a solid understanding of object-oriented concepts and familiarity with Java and the core libraries.

 

Course Objectives:

  • Gain an overview of the collections framework and its recent updates
  • Understand the exception hierarchy, and know how and when to use custom exceptions
  • Examine the new abilities of Java concurrency
  • Understand what generics are, how to write your own generic class and how to use them properly
  • Use reflection to examine objects at runtime
  • Use reflection to parse variables in external files and create objects “on the fly”
  • Learn basic annotations and how to create your own annotations when needed

 

Course Outline:

  • Collections
    • Dynamic Collections
    • Collections versus Arrays
    • The Collections API
    • Abstraction: The Collection Interface
    • Vector, LinkedList, ArrayList
    • Reading Elements and Downcasting
    • Collecting Primitive Values
    • Iterators
    • Maps
    • Sorted Collections

 

  • Exception Handling
    • Overview of Exceptions
    • Following the Control Flow of an Exception Handler
    • Writing Exception Handlers
    • Checked versus Unchecked Exceptions versus Errors
    • Defining Custom Exceptions
    • Nesting Exceptions

 

  • Threading and Concurrency
    • Overview of java.util.concurrent
    • Locks
    • Executors and Executor Service
    • Latch
    • Cyclic Barrier
    • Queues
    • Synchronizers
    • Callable vs Runnable
    • Future
    • Atomics, Locks, Latches
    • Exchangers

 

  • Generics
    • Motivation for Generics
    • Defining a Simple Generic Class
    • Generic Methods
    • Bounds for Types
    • Limitations on Generics
    • Inheritance Rules for Generics
    • Wildcard Types

 

  • Reflection
    • lang.reflect and Overview
    • Fields
    • Methods
    • Modifier
    • AccessibleObject
    • Reflection and Java Beans
    • A Word About Performance

 

  • Using Annotations
    • Meta-data and Its Usage
    • Aspect Oriented Programming (AOP) Basics
    • Built-In Annotations

Administering the JBoss 5.X Application Server

JBoss Application Server (AS) is one of the most popular open source Java application servers on the market. The JBoss 5 release is a Java EE 5 certified platform for developing and deploying enterprise Java applications and web applications.

While rich in functionality, administering JBoss AS can be somewhat challenging, as it often requires you to manipulate multiple XML configuration files located in multiple locations in a JBoss installation. JBoss AS 5 also differs in a number of ways from previous versions, so this course covers all the important administrative tasks required to administer this new version.

Training will begin with installation, architecture, basic configuration and monitoring, and then moves on to configuration of the many other services that JBoss AS supports, such as the Tomcat-based web container, JDBC and JMS. Coverage also includes the details of securing JBoss AS, as well as advanced topics such as tuning and clustering. This course is written to version 5.1.x of JBoss AS but is in large part consistent with all 5.x versions.

Focused and informative, this course was created by experts in the JBoss AS. It will demystify the many, sometimes obscure, details of running and maintaining the JBoss AS, and leave you well prepared to manage JBoss AS installations. Class time is 50 percent hands-on and 50 percent lecture.

 

Course Duration: 3 days

 

Prerequisites:

At least four to six months of Java experience is recommended.

 

Course Objectives:

  • Understand JBoss AS structure and architecture
  • Install and configure JBoss
  • Understand the Microcontainer and the legacy JMX MicroKernel
  • Assemble, deploy and manage Java EE application components such as EJB, Servlets and JMS
  • Configure JBoss services such as DataSources and Messaging
  • Configure the web container (Tomcat)
  • Understand and use JBoss security
  • Configure runtime security for JBoss services and server-side application components
  • Manage JBoss clusters
  • Tune JBoss performance

 

Course Outline:

  • JBoss Introduction and Installation
    • Java EE Overview and Architecture
    • JBoss Background and Overview
    • Basic JBoss AS Architecture
    • Downloading and Installing JBoss AS
    • Starting and Stopping JBoss
  • JBoss AS Structure and Architecture
    • JBoss AS Directory and File Structure
    • JBoss Standard Configurations and Custom Configurations
    • Configuration Directory and File Structure
    • The JBoss Microcontainer Overview and Architecture
    • Configuring Beans for the Microcontainer
    • JMX and the Legacy JBoss JMX Microkernel and MBean Server
    • JBoss AS JMX-based Services and Service Definitions
    • The Admin Consoles (JMX Console, Web Consoles, Jopr)
  • Deployment
    • Java EE Application Structure (Jars, Wars, Ears, Sars)
    • JBoss AS Deployers
    • Deploying and Redeploying Archives
    • Expanded Deployments and Nested Deployments
    • Deployment Dependencies and Deployment Ordering
    • JBoss Classloading, and Effect on Deployment
  • Web Container, Port Configuration, JNDI, and Datasources
    • Web Container Overview
    • The server.xml and other config file
    • Configuring the HTTP, HTTPS, and AJP Connectors
    • Port Configuratino and ServiceBindingManager
    • JNDI and Naming Overview
    • JBoss Naming Overview and Configuration
    • JNDI Client Configuration
    • DataSoruce and JCA Overview
    • DataSource Configuration and *-ds.xml Files
    • The Hypersonic Database and DefaultDS
  • Other Services
    • Remote Object Invokers and JBoss Remoting
    • Unified Invoker, and RMI Invoker
    • HTTP Invoker
    • JMS – Java Message Service
      • JMS Overview
      • JBossMessaging Overview
      • JBossMessaging Configuration
      • JBossMessaging Invokers
      • Configuring Queues and Topics
    • Web Services
    • Other Services – EJB, JMX Invoker Adapter, RMI Classloading
  • Security
    • Java EE Security Overview
      • Authentication, Authorization, Identity
      • Security Roles
      • Web App Security Constraints
    • JBoss AS Security Architecture
    • JBoss AS Security Domains
    • JBoss AS Login Modules
    • Using UsersRolesLoginModule
    • Using Password Hashing
    • Using DatabaseServerLoginModule
    • Other Login Modules (LDAP, etc)
    • Encypting Datasource Passwords
    • Enabling SSL
      • Setting Up HTTPS, keytool, configuration
      • RMI Over SSL (EJB usage)
      • Other Uses of SSL
    • Securing Other JBoss AS Services – Consoles, Invokers, DataSources, etc.
  • Tuning JBoss
    • JBoss AS and the Java Virtual Machine (JVM)
      • Tuning The Heap (Memory Usage)
      • Garbage Collection (GC) Overview and Generational GC
      • Tuning GC
    • Tuning the Web Tier (Tomcat)
      • Connector Tuning
      • Other Optimizations
    • Database Connection Tuning
    • RMI Invoker and Messaging Tuning
    • Other JBoss AS Optimizations
    • Creating Minimal Configurations
  • Clustering
    • JBoss AS Clustering and JGroups Overview
    • Cluster Configuration and Partitions
    • Troubleshooting Multicast Issues
    • Clustering Architecture (Client Interceptor, Load Balancing and Fault Tolerance, State Replication)
    • Clustered Services (HA-JNDI/High Availability JNDI, EJB, Messaging
    • Farm Service
    • Load Balancers and Clustered Http
    • Using Apache httpd as a Load Balancer

Administering the JBoss 7/EAP 6 Application Server

The JBoss Application Server is one of the most popular open source Java application servers on the market. The latest release, JBoss AS 7, includes many improvements and changes from the widely adopted JBoss 5 platform. The new release has a completely new structure and management model that is covered in-depth in this course. It is a certified implementation of the Java EE 6 Web profile, and contains a review release of the Java EE 6 Full profile.

Course content covers all the important administrative tasks that are required to administer this new version of JBoss AS. It starts with installation, architecture, basic configuration and monitoring. It explores management using the new and expanded web console, as well as the structure of the management model and how to use it via the admin CLI (Command Line Interface) and via scripting. It includes coverage of using the management tools to deploy and configure Web and Enterprise applications, data sources, JMS resources (topics, queues), as well as covering the configuration of the major subsystems, including the Web (HTTP), Web Services, Messaging (including the new HornetQ based provider), Logging, and Security subsystems. You will also learn the structure and contents of the underlying XML configuration files that reflect the actual configuration. The course also covers the use of JBoss in standalone mode (consistent with previous releases of JBoss), and explains the new domain model for managing multiple JBoss nodes from a single management point. The last part of the course delves into the details of clustering JBoss for high availability and load balancing, as well as going into the details of setting up and managing a JBoss domain with the new domain model.

The course was created by experts in the JBoss AS. It will demystify the many new capabilities and structure of JBoss 7, and leave you well prepared to manage JBoss AS installations. It also points out many of the issues that you may run into while migrating applications from JBoss 5.

Class time will be 50 percent hands-on and 50 percent lecture.

 

Course Duration: 4 days

 

Course Objectives:

  • Understand JBoss AS 7 structure and architecture
  • Install and configure AS 7
  • Understand the structure of both standalone installations and domain-based installations
  • Be aware of the modular class loading characteristics of AS 7 and of deployments in the server, and how this differs from JBoss 5
  • Understand the management model and how to use it via the CLI (Command Line Interface) and via scripting
  • Understand and use the web management console for managing AS 7
  • Be familiar with the XML configuration files, their structure and their usage
  • Be able to configure and manage the important subsystems, including the Web, Messaging, and Logging
  • Configure and manage the web container, including the HTTP, HTTPS, and AJP connectors
  • Understand and configure Socket Groups
  • Understand, configure and use Security in AS 7
  • Assemble, deploy and manage Java EE application components such as EJB, Servlets and JMS
  • Configure resources such as data sources, messaging destinations (topics/queues), etc.
  • Configure runtime security for AS 7 services and server-side application components
  • Optimize and adjust JBoss performance
  • Migrate applications from JBoss AS 5 to JBoss AS 7
  • Configure and manage AS 7 domains

 

Course Outline:

  • JBoss AS 7 Introduction and Installation
    • Java EE Overview and Architecture
    • JBoss AS 7 Background and Overview
    • Installing and Starting AS 7
    • Working with AS 7
    • Documentation Overview
  • AS 7 Structure and Architecture
    • AS 7 Directory and File Structure
    • JBoss Modules
    • Server Architecture and Configuration
  • AS 7 Management and Logging
    • Using the CLI (Command Line Interface)
    • Management Model
    • Working with Management Resources
    • Common Management Tasks
    • The Web Admin Console
    • Other Management Capabilities
    • Server Logging
  • Interfaces and Socket Bindings / Port Configuration
    • Interface Configuration
    • Socket Bindings and Socket Binding Groups
    • Setting the Bind Address
  • Application Deployment
    • Java EE Deployment Archives (Jars, Wars, Ears, Sars)
    • Deploying with the CLI and Admin Console
    • Auto-Deployment in AS 7 (Marker Files, Expanded, Archived)
    • Deployment Dependencies
  • Subsystem Configuration
    • Thread Pools
    • Web Container
      • Web Container Overview
      • Web Container Configuration in standalone.xml
      • Querying Container Configuration via the CLI
      • Configuring the HTTP, HTTPS, and AJP Connectors (in standalone.xml, and via the CLI)
    • JNDI and Naming Overview
    • JBoss Naming Overview and Configuration
    • JNDI Client Configuration
    • DataSource and JCA Overview
    • DataSource Configuration (XML, CLI, and Admin Console)
    • The H2 Database and ExampleDS
    • EJB Subsystem
  • Messaging in AS 7
    • JMS (Java Message Service) Overview
    • HornetQ Overview
    • Configuring Connection Factories (XML, CLI, and Admin Console)
    • Configuring Queues and Topics (XML, CLI, and Admin Console)
    • Dead Letter and Redelivery
    • Messaging Security
  • Security
    • Java EE Security Overview
      • Authentication, Authorization, Identity
      • Security Roles
      • Web App Security Constraints
    • AS 7 Security Architecture (PicketBox Security)
    • AS 7 Security Domains
    • AS 7 Login Modules
    • Using PropertiesUsersLoginModule
    • Using DatabaseServerLoginModule
    • Role Mapping Configuration
    • Fine Grained Authorization Policies
    • Other Login Modules (LDAP, etc.)
    • Securing the Management Interfaces
    • Enabling SSL
      • SSL Overview
      • Setting Up HTTPS, keytool, configuration
      • Other Uses of SSL
  • Clustering in AS 7
    • Clustering Overview
    • Clustering Configuration, JGroups Overview
    • Troubleshooting Multicast Issues
    • Managing Clusters
    • Clustered Services (HA-JNDI/High Availability JNDI, EJB, Messaging)
    • Load Balancers and Clustered Http
    • Load Balancing with Apache httpd and mod_cluster
    • Installing and Configuring mod_cluster
    • Load Balancing Between Nodes
    • Managing with the CLI
  • AS 7 Domain Mode
    • Domain Mode Overview
    • domain.xml and host.xml
    • Domain Controllers, Host Controllers, Server Groups, Servers
    • Domain Configuration – domain.xml, Controller, and Server Configuration
    • Domain Management
  • Tuning JBoss AS 7
    • JBoss AS and the Java Virtual Machine (JVM)
      • Tuning The Heap (Memory Usage)
      • Garbage Collection (GC) Overview and Generational GC
      • Tuning GC
    • Tuning the Web Tier (Tomcat)
      • Connector Tuning
      • Other Optimizations
    • Database Connection Tuning
    • Messaging Tuning
    • Other JBoss AS Optimizations
    • Creating Minimal Configurations
  • Migration
    • Configuration and Management Differences
    • Classloading and Modules
    • Database / Datasource
    • Security
    • Messaging

AJAX for Java Developers

AJAX (Asynchronous JavaScript and XML) is a browser-based technology for creating highly interactive web applications by updating parts of a web page with new data without reloading the whole page. This results in a more responsive and interactive interface, already seen powering popular websites like Google Maps and Google Mail.

There is no formal definition of AJAX, but using XMLHttpRequest/JavaScript has become the dominant AJAX technology. This course starts with an overview of XMLHttpRequest and a brief introduction to JavaScript fundamentals. It includes in-depth coverage of programming with AJAX to send and retrieve data to/from a server, updating a web page with JavaScript and using CSS to modify the look of a web page.

The course includes detailed coverage of how to handle AJAX requests using Servlets/JSP and Java web applications, provides extensive coverage of frameworks and much more. Class time will be divided equally between hands-on labs and lecture, with labs completed using the Eclipse IDE. Participants will build working AJAX applications in order to quickly build understanding and experience.

 

Course Duration: 4 days

 

Prerequisites:

Basic knowledge of HTML and JavaScript is required, as are practical Java and Servlet/JSP programming skills.

 

Hardware and Software Requirements:

  • Tomcat
  • JBoss AS
  • IBM WebSphere/RAD
  • Eclipse/MyEclipse

 

Course Objectives:

  • Understand the principles of interactive web applications and how AJAX is used to create them
  • Understand how XMLHttpRequest works and use it with JavaScript to update a web page
  • Use JavaScript and DOM with AJAX to manipulate the structure of a web page
  • Use Servlets/JSP to handle AJAX requests
  • Be familiar with AJAX technologies and frameworks such as Prototype, script.aculo.us, Dojo, JSON libraries, DWR (Direct Web Remoting) and GWT (Google Web Toolkit)
  • Understand the basics of CSS and use it with AJAX to dynamically change the web page look
  • Understand and use JSON (JavaScript Object Notation)
  • Be familiar with using AJAX with XML
  • Use AJAX with HTML, JSON or XML on both the client-side and server-side (Java)
  • Use DWR (Direct Web Remoting) to invoke server side Java from the browser
  • Use AJAX with JSF
  • Understand issues with using AJX technology, including design and security issues

 

Course Outline:

  • Overview of AJAX
    • What are Rich Internet Applications?
    • What is AJAX?
    • AJAX, JavaScript, and DHTML
    • How AJAX Works
    • Overview of AJAX Technologies

 

  • Basics of JavaScript for Browsers
    • JavaScript and DHTML Overview
    • Using JavaScript in an HTML Page
    • Basic JavaScript Programming
    • Functions in JavaScript
    • Debugging JavaScript
    • Accessing HTML Elements and Modifying with innerHTML

 

  • XMLHttpRequest
    • The XMLHttpRequest Object
    • Using XMLHttpRequest
    • Working with Browser Differences
    • Your First AJAX Application
    • Using AJAX Data to Modify the Page

 

  • Using Servlets and JSP with AJAX
    • Servlet/JSP Overview
    • Handling AJAX Requests
    • Returning Data to AJAX Requests
    • Using JSP Pages to Generate AJAX Data

 

  • More JavaScript for AJAX
    • Browser Events
    • Using AJAX with Browser Events
    • Using Built-in Objects
    • Objects and Arrays in JavaScript
    • Objects as Function Arguments
    • Defining Classes in JavaScript
    • Defining Modules and Namespaces in JavaScript

 

  • Client-Side AJAX Frameworks
    • Overview – Prototype, Dojo, script.aculo.us and others
    • Prototype Overview
    • Using Prototype ($(), AJAX.Request)
    • aculo.us Overview
    • Using script.aculo.us AJAX autocompleter
    • Servlet/JSP (server-side) Generation of Data
    • Dojo Toolkit Overview
    • YUI (Yahoo User Interface Toolkit) Overview
    • Google Maps and Google AJAX Search API Overview

 

  • Cascading Style Sheets (CSS)
    • CSS Overview
    • Defining and Using Styles and Style Sheets
    • Using CSS to Customize AJAX Data Display

 

  • JavaScript Object Notation (JSON)
    • JSON Overview
    • JSON Data Structure
    • Objects and Arrays in JSON
    • Creating/Working with JSON on the Server using Java
    • Working with JSON in the browser
    • Other JSON Tools Overview

 

  • XML and AJAX
    • XML Overview
    • XML – The X in AJAX
    • Working with XML on the Browser
    • Generating XML Data on the Server with Java
    • HTML vs XML vs JSON

 

  • Direct Web Remoting (DWR)
    • Overview – Invoking Java via AJAX
    • DWR Architecture
    • Invoking Java Functions from the Browser
    • Registering Callbacks
    • Additional Capabilities
    • Overview of Other Technologies (JSON-RPC, Google Web Toolkit)

 

  • AJAX and JavaServer Faces (JSF)
    • JSF Overview
    • JSF and AJAX
    • Demo Lab: Using AJAX with JSF

 

  • Patterns and Best Practices
    • JavaScript Best Practices
    • State of AJAX
    • AJAX Design Patterns
    • AJAX Security Issues
    • Other AJAX Issues
    • Recap of AJAX Technologies and Their Uses

Enterprise JavaBeans 3.0

The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification intended to improve the EJB architecture by reducing its complexity from the developer’s point of view. It leverages annotations (introduced in Java 5) and Object-Relational Mapping (ORM) technologies to eliminate the dependence on complex EJB APIs, allow POJO (Plain Old Java Object)-based development and provide an effective technology for creating distributed, transactional components for mapping relational data to an object schema.

This course provides thorough coverage of the EJB3 technology. It starts with the basic concepts and APIs of EJB and then continues with complex topics such as message-driven beans and transactions. New concepts such as the use of annotations and the use of dependency injection to initialize references are also covered in-depth.

The course uses hands-on labs and a well-paced approach to make this complex technology understandable in an accelerated fashion. Participants will come away with a comprehensive understanding of EJB and the important issues that need to be considered to use it in real world applications.

This course is available for the following platforms:

  • Java EE Servers: JBoss AS; GlassFish; IBM WebSphere/RAD; BEA Weblogic
  • Development Environments: Eclipse; IntelliJ IDEA; IBM RAD

 

Course Duration: 3 days

 

Prerequisites:

Solid Java programming skills are required. Some experience with distributed systems development, especially object-based systems such as Java RMI, CORBA or COM,  is helpful. Knowledge of JDBC and XML is also useful.

 

Course Objectives:

  • Understand the EJB 3 architecture and API, and know how it fits into the overall Java EE architecture
  • Understand and use the EJB 3 annotations
  • Create, deploy and use stateful and stateless session beans
  • Use EJB 3 dependency injection to initialize resources
  • Understand and use Interceptors (Lifecycle and Business Method)
  • Use JNDI (Java Naming and Directory Interface)
  • Write EJB clients (remote and local)
  • Understand, deploy and use message-driven beans
  • Understand distributed transactions, the Java Transaction API and the EJB transaction model
  • Understand and use the EJB security model
  • Understand the new Java Persistence API (JPA)
  • Create deploy and use JPA persistent Entities
  • Map relational schemas to persistent entities, including the use of primary keys
  • Understand and use the EntityManager
  • Understand and use Java Persistence Query Language
  • For more advanced classes, optional additional coverage of JPA allows you to be familiar with more advanced JPA concepts such as entity relationships (1-1, 1-N, N-N, unidirectional, bidirectional), and inheritance
  • Understand practical architectural issues associated with EJB applications

 

Course Outline:

  • Introduction
    • Overview of EJB and Java Persistence API (JPA)
      • Goals of EJB, EJB in the Java EE architecture
    • EJB 3.0 Overview
      • Session Beans, Persistent Entities, Message Driven Beans
    • Lab – Server setup and introduction

 

  • Session Beans
    • Session Bean Overview
      • Services provided, Stateless and Stateful Beans
      • Defining a Session Bean – EJB 3 Annotations
      • The Bean Implementation, Remote and Local Business Interface
    • Packaging and Deployment
      • Ejb-jar file, Deployment Descriptors in EJB 3
      • EAR file
      • The EJB Container
    • Lab – Creating a Stateless Session Bean
    • JNDI Overview
      • Distributed Naming and Lookup
      • Context and InitialContext
      • Using JNDI
    • Writing an EJB 3 Client
      • Client View of a Session Bean
      • PortableRemoteObject and Casting
      • Running the Client
    • Lab – Creating an EJB Client

 

  • Additional Capabilities
    • Resources and Dependency Injection
      • EJB referencing Another EJB
      • Referencing Resources, Environment Entries
      • Connection Factories (DataSource and others)
    • Lab – Using Dependency Injection
    • Lab – Creating and Using Environment Entries
    • Session Bean Lifecycle and Interceptors
      • Stateless Session Bean Lifecycle
      • Business Method Interceptors, InvocationContext, Lifecycle Callback Interceptors, Interceptor Classes
    • Lab – Working with Interceptors
    • Stateful Session Beans
      • Overview
      • Defining, Client Relationship
      • Lifecycle, Activation, Passivation
    • Lab – Stateful Session Beans
    • Timer Service
      • Overview and Usage

 

  • Message-Driven Beans
    • Overview of Messaging Systems
      • Messaging, Loose Coupling
      • Pub/Sub, Point2Point
    • Overview of JMS API
      • Overview and Structure
      • ConnectionFactory and Destination
      • JMS Producer and Consumer Client example
      • JMS Messages
    • Message-Driven Beans (MDB)
      • Overview and Goals
      • @MessageDriven and MDB example
      • Configuring with activationConfig
      • State Diagram and Interceptors
    • Lab – Message Driven Beans

 

  • Transactions and Security
    • Overview of Transactions and Transactional Systems
      • ACID, Transaction Managers, Resource Managers
    • Transactions in EJB 3
      • Declarative Transaction Management
      • Transaction Attributes and Transactional Scope
      • Transaction Scenarios and Bean-Managed Tx
    • Lab – Working with Transactions
    • Security
      • Java EE Security Overview (Role-based)
      • @RolesAllowed, @PermitAll
      • Programmatic Security
    • Lab – Integrating EJB and Java EE Security
  • Exceptions
    • Exception Overview
      • Checked and Unchecked Exceptions
    • Exceptions in EJB 3
      • Application Exceptions, System Exceptions
    • EJB 3 Best Practices
      • When to Use, Coarse-Grained Business Interfaces, Session Facade, Transaction Guidelines, Clustering

 

  • Introduction to Java Persistence API (JPA)
    • Overview
      • Persistence Layers, Object-Relational Mapping (ORM), JDBC
      • JPA Overview
    • Mapping with JPA
      • Entities and @Entity, ids and @Id,
      • Generated Id Values
      • Basic Mapping Types
    • Lab – Mapping an Entity Class
    • EntityManager
      • Persisting to the DB, the EntityManager,
      • Persistence Units and Configuration
      • Injecting an EntityManager
      • Retrieving Persistent Entities
    • Lab – Using the EnityManager to Persist and Find an Entity
  • Updates and Queries
    • Inserting and Updating
      • Transient, Persistent, Detached, Removed
      • Persisting New Entities, Updating a Persistent Instance
    • Lab – Inserting and Updating an Entity
    • Querying and JPQL
      • Object-Based Queries, Select Statements, WHERE clause
      • Named Queries
    • Lab – Creating and Using JPQL Queries
    • Versioning and Optimistic Locking
    • Detached Instances
    • Versioning and Optimistic Locking in EJB

 

  • [Optional] Overview of Entity Relationships
    • Object Relationships Overview
    • Mapping Overview (1-1, 1-N, N-1, N-N)
    • Unidirectional and Bidirectional
    • Owner, Invoice and Join Columns
    • Lazy and Eager Loading, and Cascading
    • Inheritance Mapping Overview
  • [Optional] Additional JPA Capabilities
    • Versioning Overview
    • Queries – Projection, Aggregate, Bulk Update/Delete
    • Embedded Objects
    • EJB 3 and Java SE

Enterprise JavaBeans 3.0 (EJB3) and the Java Persistence API (JPA) on the JBoss Application Server

The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity from the developer’s point of view. It leverages annotations (introduced in Java 5) and Object-Relational Mapping (ORM) technologies to eliminate the dependence on complex EJB APIs, allow POJO (Plain Old Java Object) based development, and provide an effective technology for creating distributed, transactional components and for mapping relational data to an object schema.

This course provides thorough coverage of the EJB3 technology. It starts with the basic concepts and APIs of EJB and then continues with complex topics such as message-driven beans and transactions. New concepts such as the use of annotations and the use of Dependency Injection to initialize references are covered in-depth. The course also includes managing persistence using the Java Persistence API (JPA), and it provides additional coverage of JPA as compared to our Fast Track to EJB3 course.

The course uses hands-on labs and a well-paced approach to make this complex technology understandable in an accelerated fashion. You will come away with a comprehensive understanding of EJB and the important issues that need to be considered to use it in real world applications.

 

Course Duration: 4 days

 

Course Objectives:

  • Understand the EJB 3 architecture and API, and know how it fits into the overall Java EE architecture
  • Understand and use the EJB 3 annotations
  • Create, deploy and use stateful and stateless session beans
  • Use EJB 3 dependency injection to initialize resources
  • Understand and use Interceptors (lifecycle and business method)
  • Use JNDI (Java Naming and Directory Interface)
  • Write EJB clients (remote and local)
  • Understand, deploy and use message-driven beans
  • Understand distributed transactions, the Java Transaction API and the EJB transaction model
  • Understand and use the EJB security model
  • Understand practical architectural issues associated with EJB applications
  • Understand the new Java Persistence API (JPA)
  • Create deploy and use JPA persistent Entities
  • Map relational schemas to persistent entities, including the use of primary keys
  • Understand and use the EntityManager
  • Understand and use Java Persistence Query Language
  • Use optimistic locking and versioning
  • Use advanced JPA capabilities such as entity relationships (1-1, 1-N, N-N, unidirectional, bidirectional), inheritance and embeddable classes
  • Learn best practices associated with JPA applications

 

Course Outline:

  • Introduction
    • Overview of EJB and Java Persistence API (JPA)
      • Goals of EJB, EJB in the Java EE architecture
    • EJB 3.0 Overview
      • Session Beans, Persistent Entities, Message Driven Beans
    • Lab – JBoss AS Server Setup and Introduction
  • Session Beans
    • Session Bean Overview
      • Services Provided, Stateless and Stateful Beans
      • Defining a Session Bean
      • The Bean Implementation, Remote and Local Business Interface
    • Packaging and Deployment
      • ejb-jar file, Deployment Descriptors in EJB 3
      • EAR File
      • The EJB Container
    • Lab – Creating a Stateless Session Bean
    • JNDI Overview
      • Distributed Naming and Lookup
      • Context and InitialContext
      • Using JNDI
    • Writing an EJB 3 Client
      • Client View of a Session Bean
      • PortableRemoteObject and Casting
      • Running the Client
    • Lab – Creating an EJB Client
  • Additional Capabilities
    • Resources and Dependency Injection
      • EJB Referencing Another EJB
      • Referencing Resources, Environment Entries
      • Connection Factories (DataSource and Others)
    • Lab – Using Dependency Injection
    • Lab – Creating and Using Environment Entries
    • Session Bean Lifecycle and Interceptors
      • Stateless Session Bean Lifecycle
      • Business Method Interceptors, InvocationContext, Lifecycle Callback Interceptors, Interceptor Classes
    • Lab – Working with Interceptors
    • Stateful Session Beans
      • Overview
      • Defining, Client Relationship
      • Lifecycle, Activation, Passivation
    • Lab – Stateful Session Beans
    • Timer Service
      • Overview and Usage
  • Message-Driven Beans
    • Overview of Messaging Systems
      • Messaging, Loose Coupling
      • Pub/Sub, Point2Point
    • Overview of JMS API
      • Overview and Structure
      • ConnectionFactory and Destination
      • JMS Producer and Consumer Client example
      • JMS Messages
    • Message-Driven Beans (MDB)
      • Overview and Goals
      • @MessageDriven and MDB example
      • Configuring with activationConfig
      • State Diagram and Interceptors
    • Lab – Message Driven Beans
  • Transactions and Security
    • Overview of Transactions and Transactional Systems
      • ACID, Transaction Managers, Resource Managers
    • Transactions in EJB 3
      • Declarative Transaction Management
      • Transaction Attributes and Transactional Scope
      • Transaction Scenarios and Bean-Managed Tx
    • Lab – Working with Transactions
    • Security
      • Java EE Security Overview (Role-based)
      • @RolesAllowed, @PermitAll
      • Programmatic Security
    • Lab – Integrating EJB and Java EE Security
  • Exceptions
    • Exception Overview
      • Checked and Unchecked Exceptions
    • Exceptions in EJB 3
      • Application Exceptions, System Exceptions
    • EJB 3 Best Practices
      • When to Use, Coarse-Grained Business Interfaces, Session Facade, Transaction Guidelines, Clustering
  • Introduction to Java Persistence API (JPA)
    • Overview
      • Persistence Layers, Object-Relational Mapping (ORM), JDBC
      • JPA Overview
    • Mapping with JPA
      • Entities and @Entity, ids and @Id,
      • Generated Id Values
      • Basic Mapping Types
    • Lab – Mapping an Entity Class
    • EntityManager
      • Persisting to the DB, the EntityManager,
      • Persistence Units and Configuration
      • Injecting an EntityManager
      • Retrieving Persistent Entities
    • Lab – Using the EnityManager to persist and find an Entity
  • Updates and Queries
    • Inserting and Updating
      • Transient, Persistent, Detached, Removed
      • Persisting new Entities, Updating a Persistent Instance
    • Lab – Inserting and Updating an Entity
    • Querying and JPQL
      • Object Based Queries, Select statements, WHERE clause
      • Named Queries
    • Lab – Creating and Using JPQL Queries
    • Versioning and Optimistic Locking
      • Overview
      • Detached Entities
      • Creating Versioned Entities
    • Lab – Optimistic Locking
  • Entity Relationships
    • Relationships Overview
      • Object Relationships, Participants, Roles, Directionality, Cardinality
    • Relationship Mapping
      • Mapping Overview (1-1, 1-N, N-1, N-N)
      • Unidirectional and Bidirectional
      • Mapping One-One, One-Many
      • Join Columns
      • Relationship Inverses
    • Lab – Mapping Entity Relationships
      • Many-Many Relationships
      • Lazy and Eager Loading
      • Cascading
      • Queries Across Relationships (Inner Joins, Outer Joins, Fetch Joins)
    • Lab – Querying Across Relationships
    • Inheritance Mapping
      • Entity Inheritance
      • Single Table, Joined (Table per Subclass), Table per Concrete Class
      • Pros and Cons
    • Lab – Mapping Inheritance
  • Additional JPA Capabilities
    • Queries – Projection, Aggregate, Bulk Update/Delete
    • Embedded Objects
    • EJB 3 and Java SE
    • Best Practices
      • Primary Keys, Named Queries, Lazy/Eager Loading, Transactional Semantics, Encapsulation, Report Queries

Enterprise JavaBeans 3.0 (EJB3) and the JBoss Application Server

The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity from the developer’s point of view. It leverages annotations (introduced in Java 5) and Object-Relational Mapping (ORM) technologies to eliminate the dependence on complex EJB APIs, allow POJO (Plain Old Java Object)-based development and provide an effective technology for creating distributed, transactional components and mapping relational data to an object schema.

This course provides thorough coverage of the EJB3 technology, presented in a clear and effective manner. It starts with the basic concepts and APIs of EJB and then continues on with complex topics such as message-driven beans and transactions.

The course uses hands-on labs and a well-paced approach to make this complex technology understandable in an accelerated fashion. All labs are done using the JBoss 4 or JBoss 5 Application Server as the server platform and included detailed instructions using JBoss. Labs are done with the Eclipse IDE and also include Eclipse instructions.

 

Course Duration: 3 days

 

Course Objectives:

  • Understand the EJB 3 architecture and API, and know how it fits into the overall Java EE architecture
  • Understand and use the EJB 3 annotations
  • Create, deploy and use stateful and stateless session beans
  • Use EJB 3 dependency injection to initialize resources
  • Understand and use interceptors (lifecycle and business method)
  • Use JNDI (Java Naming and Directory Interface)
  • Write EJB clients (remote and local)
  • Understand, deploy and use message-driven beans
  • Understand distributed transactions, the Java Transaction API and the EJB transaction model
  • Understand and use the EJB security model
  • Understand the new Java Persistence API (JPA)
  • Create deploy and use JPA persistent entities
  • Map relational schemas to persistent entities, including the use of primary keys
  • Understand and use the EntityManager
  • Understand and use Java Persistence Query Language
  • For more advanced classes, optional additional coverage of JPA allows you to be familiar with more advanced JPA concepts such as entity relationships (1-1, 1-N, N-N, unidirectional, bidirectional) and inheritance
  • Understand practical architectural issues associated with EJB applications

 

Course Outline:

  • Introduction
    • Overview of EJB and Java Persistence API (JPA)
      • Goals of EJB, EJB in the Java EE architecture
    • EJB 3.0 Overview
      • Session Beans, Persistent Entities, Message Driven Beans
    • Lab – JBoss and AS Server Setup
  • Session Beans
    • Session Bean Overview
      • Services Provided, Stateless and Stateful Beans
      • Defining a Session Bean
      • The Bean Implementation, Remote and Local Business Interface
    • Packaging and Deployment
      • ejb-jar file, Deployment Descriptors in EJB 3
      • EAR file
      • The EJB Container
    • Lab – Creating a Stateless Session Bean
    • JNDI Overview
      • Distributed Naming and Lookup
      • Context and InitialContext
      • Using JNDI
    • Writing an EJB 3 Client
      • Client View of a Session Bean
      • PortableRemoteObject and Casting
      • Running the Client
    • Lab – Creating an EJB Client
  • Additional Capabilities
    • Resources and Dependency Injection
      • EJB referencing another EJB
      • Referencing Resources, Environment Entries
      • Connection Factories (DataSource and Others)
    • Lab – Using Dependency Injection
    • Lab – Creating and Using Environment Entries
    • Session Bean Lifecycle and Interceptors
      • Stateless Session Bean Lifecycle
      • Business Method Interceptors, InvocationContext, Lifecycle Callback Interceptors, Interceptor Classes
    • Lab – Working with Interceptors
    • Stateful Session Beans
      • Overview
      • Defining, Client Relationship
      • Lifecycle, Activation, Passivation
    • Lab – Stateful Session Beans
    • Timer Service
      • Overview and Usage
  • Message-Driven Beans
    • Overview of Messaging Systems
      • Messaging, Loose Coupling
      • Pub/Sub, Point2Point
    • Overview of JMS API
      • Overview and Structure
      • ConnectionFactory and Destination
      • JMS Producer and Consumer Client example
      • JMS Messages
    • Message-Driven Beans (MDB)
      • Overview and Goals
      • @MessageDriven and MDB example
      • Configuring with activationConfig
      • State Diagram and Interceptors
  • Lab – Message Driven Beans

 

  • Transactions and Security
    • Overview of Transactions and Transactional Systems
      • ACID, Transaction Managers, Resource Managers
    • Transactions in EJB 3
      • Declarative Transaction Management
      • Transaction Attributes and Transactional Scope
      • Transaction Scenarios and Bean-Managed Tx
    • Lab – Working with Transactions
    • Security
      • Java EE Security Overview (Role-based)
      • @RolesAllowed, @PermitAll
      • Programmatic Security
    • Lab – Integrating EJB and Java EE Security
  • Exceptions
    • Exception Overview
      • Checked and Unchecked Exceptions
    • Exceptions in EJB 3
      • Application Exceptions, System Exceptions
    • EJB 3 Best Practices
      • When to Use, Coarse-Grained Business Interfaces, Session Facade, Transaction Guidelines, Clustering
  • Introduction to Java Persistence API (JPA)
    • Overview
      • Persistence Layers, Object-Relational Mapping (ORM), JDBC
      • JPA Overview
    • Mapping with JPA
      • Entities and @Entity, ids and @Id,
      • Generated Id Values
      • Basic Mapping Types
    • Lab – Mapping an Entity Class
    • EntityManager
      • Persisting to the DB, the EntityManager,
      • Persistence Units and Configuration
      • Injecting an EntityManager
      • Retrieving Persistent Entities
    • Lab – Using the EnityManager to Persist and Find an Entity
  • Updates and Queries
    • Inserting and Updating
      • Transient, Persistent, Detached, Removed
      • Persisting New Entities, Updating a Persistent Instance
    • Lab – Inserting and Updating an Entity
    • Querying and JPQL
      • Object-Based Queries, Select Statements, WHERE Clause
      • Named Queries
    • Lab – Creating and Using JPQL Queries
    • Versioning and Optimistic Locking
      • Detached Entities
  • Creating Versioned Entities
    • Overview of Entity Relationships
    • Object Relationships Overview
    • Mapping Overview (1-1, 1-N, N-1, N-N)
    • Unidirectional and Bidirectional
    • Owner, Invoice and Join Columns
    • Lazy and Eager Loading, and Cascading
    • Inheritance Mapping Overview

 

  • Additional JPA Capabilities
    • Versioning Overview
    • Queries – Projection, Aggregate, Bulk Update/Delete
    • Embedded Objects
    • EJB 3 and Java SE

Groovy and Grails

Groovy and GrailsGroovy is a leading dynamic language for the Java platform. It offers a flexible, Java-like syntax that is easily learned and simplifies many common programming tasks, such as working with collections, while also adding many new exciting capabilities like dynamic method invocation, closures and metaprogramming. Since it compiles to Java bytecodes, it’s fully compatible with existing Java frameworks such as Spring and Hibernate, which Grails utilizes extensively, while at the same time enhances them via its simplified programming model.

Although Groovy is syntactically simpler than Java, it is not “Java-Lite,” and this course will emphasize that, especially in the Grails portion, which leverages closures and metaprogramming extensively.

Grails is an advanced and innovative web application framework that delivers new levels of developer productivity by applying proven architectural principles such as MVC, ORM, and SOA to modern application development techniques such as Convention over Configuration. Grails helps development teams embrace agile methodologies, deliver quality applications in less time, and focus on what really matters: creating high-quality, easy-to-use applications that delight users. Grails naturally complements Java application development since it is based on Groovy.

In this five-day training, students will cover the core fundamentals of application development with Groovy and Grails. After an introduction to the technology, participants are taken through the intermediate and more advanced aspects of the Groovy programming language and Grails framework. This training is designed to help developers quickly master the basics and move on to the most powerful aspects of Groovy and Grails.

 

Course Duration: 5 days

 

Course Outline:

  • Getting Started with Groovy
    • Lab – HelloWorld Groovy

 

  • Language Basics and Data Types
    • Lab Using an IDE (eclipse) Creating Number and Other Datatypes
    • String and GString
    • Lab – Strings
    • Methods and Method Signatures
    • Lab – Calling Methods
    • Groovy Truth
    • Lab – What is True and What is False?
    • Regular Expressions
    • Lab – Expressions

 

  • Collections
    • Lists, Sets and Ranges
    • Lab – Working with Collections
    • Using Sort, Reverse, Join and the Spread Dot Operator
    • Lab – Collection Operations
    • Using any, every find and findAll
    • Lab – Using Groovy Truth
    • Map Elements
    • Lab – Map Operations

 

  • Closures
    • Basics
    • Parameters
    • Iteration
    • Lab – Iterating Using Closures
    • Maps and Closures
    • Sort collect find and findAll
    • Lab – Map Operations

 

  • Conditionals and Loops
    • If else, switch, Elvis and Safe De-Reference Operators
    • Lab – Conditional Operators
    • For Loops and Iterations

 

  • Classes
    • Class Definition
    • Packages, Variables and Groovy Beans
    • Lab – Creating Classes
    • Methods and Constructors
    • Lab – Constructors and Methods
    • Exceptions
    • Duck Typing
    • Lab – Polymorphism
    • AST Transformations
    • Lab – AST

 

  • Builders and Parsers
    • MarkUpBuilder and JsonBuilder
    • Lab – Using Builders
    • XmlSlurper
    • Lab – Using Parsers

 

  • Database Access
    • Queries and Updates
    • SQL
    • Lab – Query and Inserts

 

  • Grails Overview and Supporting Frameworks
    • MVC – Overview of Domain Classes, Controllers, GSPs, Services
    • Hibernate
    • Spring
    • Convention Over Configuration
    • Grails Toolset – The Grails Commands
    • Grails Application Structure
    • Dynamic Scaffolding
    • Lab – Your First Grails Application

 

  • Domain Classes
    • Configuring a DataSource, dev/test/prod Environments
    • Lab – Configure a Data Source
    • Properties, id, version, dateCreated, lastUpdated
    • Lab – Creating Domain Classes
    • Constraints and Validation, Unit Testing of Validation Constraints
    • Custom Validators
    • Using JUnit and Mocks
    • Lab – Validation
    • Inserting and Retrieving Domain Objects
    • Lab – Domain Object Persistence
    • Updating Domain Objects
    • Integration Testing versus Unit Testing
    • Lab – Integration Testing

 

  • Domain Class Relationships
    • One-to-Many
    • Unidirectional versus Bidirectional Relationships
    • Lab – Modeling Relationships
    • Transitive Persistence
    • Many-to-Many
    • Sorting
    • Lazy and Eager Fetching of Relationships, Batch Fetching
    • Lab – Fetching Strategies

 

  • Queries
    • Dynamic Finders
    • Lab – Using Dynamic Finders
    • HQL, Aggregate Functions, Tuple Queries, Explicit and Implicit Joins
    • Lab – HQL
    • Query Parameters for Sorting, Fetching, etc.

 

  • Legacy Schemas
    • Mapping Domain Classes onto Existing Tables
    • Lab – Legacy Schema Mappings
    • Mapping Relationships
    • Lab – Mapping Relationships
    • Dynamic Scaffolding (revisited), Static Scaffolding
    • Lab – Scaffolding

 

  • Controllers
    • URL Mappings
    • Writing Actions
    • Role of SpringMVC DispatcherServlet
    • Alternative Output Formats
      • Returning Data in XML and JSON Format
    • Lab – Request Parameters
    • Sharing Data Between Components: scopes – request, flash, session, application
    • Lab – Using Scopes
    • Forward vs. Redirect
    • Request Processing
    • Lab – A True MVC approach

 

  • Groovy Server Pages
    • Basics, MVC (revisited), Sharing Data between Components (revisited)
    • Rendering Data and Links
    • Lab – Rendering Data
    • Lab – Controllers and Actions
    • Rendering Errors
    • Externalized Messages and Internationalization (I18N)
    • Lab – Rendering Errors
    • Static Scaffolding

 

  • Services
    • Role of Services
    • Writing Services
    • Lab – Define a Service
    • Service Scope and Lifecycle
    • Injection into Controllers and Unit/Integration Tests
    • Lab – Dependency Injection of Services into Integration Tests and Controllers

 

  • Deployment
    • Java EE Deployment Overview
    • Exporting Grails Application into WAR File, Customizing/Deploying the WAR
    • Using Server-Configured DataSources
    • Exporting Generated Schema (in Domain-Driven Development)
    • Lab – Create and Customize a WAR

Hibernate Training for Java Database Access

Hibernate is an open source object/relational (OR) persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idioms – including association, inheritance, polymorphism, composition and the Java collections framework.

The Hibernate Query Language designed as a minimal object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based criteria and example queries.

Hibernate is now the most popular OR mapping solutions for Java, and it has become a de facto standard in Java OR mapping. JBoss has integrated Hibernate into its JEMS (Java Enterprise Middleware System) product line. The Java Persistence API (EJB 3) specification derives a great deal of its architecture from Hibernate, and the Hibernate annotations are compatible with the Java Persistence annotations. This promises to make Hibernate an even more important technology.

This course covers everything you need to know to begin working with Hibernate in a very short time. It covers all the important concepts necessary to access and update data stored in relational databases. It includes an extensive series of labs to exercise all major capabilities.

All labs are done with the Eclipse IDE. Lab instructions are also available for other major IDEs, such as IntelliJ IDEA.

Supported platforms include Java 5, 6, and 7, Eclipse and IBM RAD among others.

 

Course Duration: 3-4 days

 

Prerequisites:

Intermediate knowledge of Java programming is required. Some familiarity with the Java Database Connectivity (JDBC) interfaces, relational databases and SQL is recommended.

 

Course Objectives:

  • Understand the benefits of Hibernate
  • Understand the Hibernate architecture
  • Create Hibernate based applications
  • Understand and use Hibernate mapping to map persistent objects to the database
  • Understand and work with collections and associations
  • Understand value and entity types
  • Use Hibernate’s versioning support
  • Map inheritance hierarchies using Hibernate
  • Work with Hibernate queries, HQL and criteria
  • Performance tune your Hibernate applications
  • Understand Hibernate transaction support
  • Understand the relationship between Hibernate and the Java Persistence API (JPA)
  • Use the JPA annotations to do OR mapping
  • Configure second level caching
  • Integrate Hibernate with Java Web Apps and EJB
  • Integrate Hibernate and Spring

 

Course Outline:

  • Introduction to Hibernate
    • Issues with Persistence Layers and Object-Relational Mapping (ORM)
    • Hibernate Overview and Benefits
    • Hibernate Architecture Overview
    • Configuring Hibernate
      • cfg.xml file, Connection Properties, Database Dialect
      • SessionFactory, Configuration, Session
    • Mapping a Class
      • Persistent Entity Class, Hibernate Mapping File, Mapping the Entity Class
      • Primary Keys: Id property, Generated Id
      • Hibernate Type System
    • Working with Sessions and Persistent Objects
    • Logging: hibernate.show_sql, log4j Overview and Configuration for Hibernate
  • Updates and Queries
    • Inserting, Updating and Deleting Entities
    • HQL – Hibernate Query Language Overview
    • The Query Interface
    • Creating and Working with Queries
    • Named Queries, Projection Queries, Aggregate Queries

 

  • The Persistence Lifecycle
    • Transaction Overview and Transactions in Hibernate
    • Hibernate Transaction API (in Managed and Non-Managed Environments)
    • The Lifecycle of Managed Objects
    • Persistent, Transient and Detached objects
    • The Persistence (Session) Context (Lifespan, Relation to Managed Objects, Propagation)
    • Contextual Sessions
    • Synchronization to the Database
    • The Session as Cache
    • Optimistic Locking / Versioning
      • Detached Objects and Optimistic Locking
      • Versioning Overview and Using Versioning
      • Locking Objects

 

  • Relationships
    • Object Relationship Overview
    • Mapping Collections of Value Objects
    • Entity Relationships: 1-N, N-1, N-N, 1-1
    • Mapping Entity Relationships
    • Uni- and Bi-directional Relationships
    • The Relationship “Inverse”
    • Cascading Over Relationships
    • Queries Across Relationships (Lazy and Eager)
    • Inheritance Mapping
      • Entity Inheritance with Hibernate
      • Table per Class Mapping
      • Table per Subclass Mapping
      • Table per Concrete Class Mapping

 

  • Additional Querying Capabilities
    • Projection Queries, Aggregate Queries, Bulk Updates and Deletes, Native SQL Queries
    • Query Filters
    • The Criteria API
      • Overview of the Criteria API
      • Working Querying with the Criteria API
      • Query by Example

 

  • Hibernate and Java Persistence / EJB 3
    • Overview of Java Persistence / EJB 3
    • Relationship Between Java Persistence and Hibernate
    • Mapping Entities with JPA Annotations
    • The EntityManager, Persistence Context and Persistence Unit
    • Working with Transactions – EntityTransaction, Managed and Unmanaged Environments
    • Inserts and Updates
    • JPQL – Java Persistence Query Language
    • Versioning
    • Relationships

 

  • Caching
    • Understand Caching Advantages and Behavior
    • The Persistence Context as First Level Cache
    • The Second Level Cache
    • Entity and Collection Caching

 

  • Integration Considerations
    • Data Access Objects
    • Integrating Hibernate and Java Web Apps
    • Open Session in View Pattern
    • Hibernate / EJB-JPA Integration

 

  • Additional Topics
    • Components and Multi-Table Mapping
    • equals() and hashCode()
    • Design Considerations
    • Hibernate Toolset

 

  • Hibernate and Spring Integration
    • Spring Introduction
    • Dependency Injection Overview
    • Spring’s Hibernate Support
    • Spring Transaction Management

Introduction to JSP and Servlets

Our Introduction to JSP and Servlets training course develops skills in JavaServer Pages, or JSP, which is the standard means of authoring dynamic content for web applications under the Java Enterprise platform. This course presents the important concept of the separation of programmatic and declarative development, i.e., use of configuration and context information in lieu of hard-coded values, resource locations and so on to make the web application as portable and easy to administer as possible.

The course introduces JavaBeans as a standard for business and data objects that can be shared among servlets and JSPs, and develops techniques for sharing such objects at session scope or by request forwarding. Students will learn how to implement filters to adapt existing servlets by pre- and post-processing the request and response. At the end of the course, students will be well prepared to author JSPs for small- or large-scale web applications, either “by hand” (they use only a text editor in class) or using an authoring tool.

 

Course Duration: 5 days

 

Prerequisites:

Students should complete an introductory Java class or have at least three months of Java programming experience before taking this course.

 

Course Objectives:

  • Explain the fundamentals of HTML and HTTP
  • Describe JavaServer Pages and their relationship to servlets and J2EE
  • Describe how a JSP is translated into a servlet and processed at runtime
  • Explain the use of directives on JSPs and outline the principal directives
  • Implement simple JSPs that use Java code in declarations, expressions and scriptlets
  • Enumerate and use the implicit objects available to scripting elements
  • Implement an interactive web application using HTML forms and JSP
  • Use Java exception handling and JSP error pages to handle errors in JSP applications
  • Implement session management for a JSP application
  • Manage cookies to store client-specific information at various scopes and durations
  • Use JavaBeans to implement effective interactive JSP applications
  • Describe custom tags in JSP and explain how they are implemented, both using Java and JSP itself, and how they are used
  • Discuss threading issues in JSP and describe the use of directives to control how threading is handled
  • Describe the various uses of XML in JSP applications
  • Deploy a logical web application to a web server in a WAR file
  • Describe the use of the JSP expression language to simplify dynamic page output
  • Write JSP expressions and implement JSPs that use them in favor of scripts
  • Implement JSPs that use basic JSTL actions to simplify presentation logic
  • Decompose a JSP application design into fine-grained, reusable elements including JavaBeans, custom tag handlers and tag files that use JSTL
  • Use core JSTL actions to complement standard actions, custom actions, and JSP expressions for seamless, script-free page logic
  • Direct conditional and iterative processing of page content by looping through ranges of numbers, over elements in a collection or over tokens in a master string
  • Set locale and time zone information in JSPs and use them to correctly format numbers, dates and times for all clients
  • Use resource bundles to manage application strings and produce the appropriate strings at runtime for a particular client locale
  • Locate a data source, query for relational data and parse result sets
  • Perform updates, inserts and deletes on relational data using SQL actions
  • Manage queries and updates in transaction contexts
  • Derive information from parsed XML content using XPath expressions
  • Implement conditional processing and loops based on XML information
  • Apply XSLT transformations to XML content
  • Implement a simple web service that reads and writes SOAP
  • Understand and appreciate the role of Java Servlets in the overall Java 2 Enterprise Edition architecture and as the best Java solution to HTTP application development
  • Use request and response objects provided to a servlet to read CGI parameters and to produce an HTML response
  • Develop interactive web applications using HTML forms and servlets
  • Manage complex conversations with HTTP clients using session attributes
  • Understand the role of JDBC in Java persistence code and use JDBC for persistence in servlet applications
  • Preserve portability and ease of administration for a servlet application by parameterizing servlet code, using initialization parameters, properties files and JNDI
  • Use JavaBeans classes to share complex business data between components
  • Implement filters to adapt existing servlets with new features and to maximize the decomposition of logic between vertical business functions and horizontal facilities

 

Course Outline:

  • Web Basics
    • HTML Review – Tags and Document Structure
    • HTTP Overview
      • Requests (GET/POST)
      • Responses
      • URLs
      • Resource Mappings
      • Request Parameters
    • Web Applications
      • Structure
      • WAR File
      • Context Root
      • Deployment
  • Servlet Basics
    • Overview and API
      • Static versus Dynamic Content
      • Servlets
        • Role in a Web App
        • Servlet Interface
        • GenericServlet Class
        • HttpServlet Class
      • Mapping a URL to a Servlet Class
      • Web Container
    • Requests and Responses
      • HttpServletRequest
        • Reading HTTP Request Headers
        • HTML Forms
        • Reading HTTP Request Parameters
      • HttpServletResponse
        • Setting HTTP Response Headers
      • Monitoring Requests and Responses
  • Advanced Servlets
    • Servlet Lifecycle
      • Overview
      • Instantiation
      • Initialization
        • init(ServletConfig) Method
        • init() Method
        • Lazy Initialization
      • Service
        • Service() Method
        • Relationship of service() to doGet()/doPost()
      • Destruction
        • Destroy()
    • Servlet Configuration
      • ServletConfig Interface
      • Reading Initialization Parameters
    • Deployment Descriptors
      • Web.xml
        • Element
        • Element
        • Element
      • Vendor-web.xml
    • Servlet Threading
      • Servlets are Singletons
      • Servlets are Multithreaded
      • Synchronization Techniques
  • Session Tracking
    • HttpSession
      • Need for Sessions
      • HttpSession Class
      • Accessing the Session
      • Session Invalidation
      • Session Timeout
    • Cookies
      • Overview
      • Cookie Class
      • Cookie Expiration
      • Sending Cookies to the Client
      • Retrieving Cookies from the Client
      • JSESSIONID
    • URL Rewriting
      • Overview and Need for URL Rewriting
      • URL Rewriting and HttpSession
    • Scopes
      • Request Scope – ServletRequest Class
      • Session Scope – HttpSession Class
      • Application Scope – ServletContext Class
      • API for Using the Scopes
  • JSP Basics
    • Overview and Motivation
      • Problems with Servlets
      • Motivation for JSPs
      • JSP Runtime Behavior
    • Scripting Elements
      • Syntax Rules
      • Comments
      • Scriptlets
      • JSP Implicit Objects
      • Expressions
      • Directives
        • @page directive
        • @include directive
      • Declarations
  • Model-View-Controller (MVC)
    • Interactions
    • Model, View, Controller
      • Advantages of MVC
    • Model 1 and Model 2
    • Model 1 Disadvantages
    • Model 2
      • Controller = Servlet
      • View = JSP
      • Model = JavaBeans, EJBs, Web Services, Spring, Database Entities, etc.
    • Redirects and Forwards
      • Servlet Redirects
      • JSP Redirects
      • Redirect Side Effects
      • Servlet Forwards
      • Forward and Include Side Effects
      • Redirect versus Forward
  • JSP Tags
    • Overview
      • Standard Tags, JSTL Tags, Custom Tags
      • Tag Syntax
      • Motivation for Tags
    • Accessing JavaBeans
      • JavaBeans review
      • sp:useBean
        • Purpose
        • Id Attribute
        • Scope Attribute
        • Class Attribute
        • Type Attribute
        • Relationship to Accessing the Scopes Directly
      • jsp:getProperty
        • Purpose
        • Name Attribute
        • Property Attribute
        • Relationship to Using Expressions or Scriptlets Instead
      • jsp:setProperty
        • Purpose
        • Name Attribute
        • Property Attribute
        • Setting Properties from Request Parameters
        • Relationship to Using Scriptlets Instead
      • Forwards and Includes
        • jsp:include
          • Contrast with @include directive
          • Relationship to RequestDispatcher.include()
        • jsp:forward
          • Relationship to RequestDispatcher.forward()
  • JSP Standard Tag Library (JSTL)
    • Overview
      • JSTL Defined
      • Tag Groups and Namespaces
      • Using JSTL
        • J2EE 1.4 vs. Java EE 5
        • @taglib Directive
    • JSP Expression Language (EL)
      • EL Moved from JSTL to JSP 2.0
      • Motivation
      • EL Expressions and Usage
      • EL Operators
      • EL Implicit Objects
      • Automatic Type Conversion and Casting
      • Resolving Access to the Scopes
    • Core Tags
      • Overview
      • c:out
      • c:set
      • c:remove
      • c:forEach
        • Using with Maps
      • c:if
      • c:choose c:when c:otherwise
      • c:url and c:param
      • c:redirect
    • Formatting Tags
      • Overview
      • fmt:formatNumber
      • fmt:formatDate
    • XML and SQL Tags
      • Overview
      • Discouraged When Using an MVC Architecture
      • XML Tags
        • Uses
      • SQL Tags
        • Uses
  • Filters
    • Overview
      • Preprocessing and Post Processing
      • Uses
      • Filter Chains
        • Chain of Command Design Pattern
    • Filter API
      • Filter Interface
        • Similarities and Differences to Servlets
        • init(FilterConfig) Method
          • FilterConfig Object
        • destroy() Method
        • doFilter() Method
      • FilterChain Object
        • Controlling Flow Through the Filter Chain
    • Configuring Filters
      • Element
      • Element
      • Configuring a Filter Chain
  • Custom Tags
    • Overview
      • Tag Libraries
      • Capabilities and Uses
      • Motivation
      • Using Custom Tags
        • @taglib directive
    • Implementing Custom Tags
      • Implementation Choices
        • Tag Files
          • Runtime Behavior
        • Tag Handlers – Simple and Classic
          • Runtime Behavior
        • Tag Library Descriptor (TLD)
      • SimpleTag Interface and SimpleTagSupport Base Class
        • doTag() Method
        • Tag Attributes
        • Tag Body Content
      • Tag Library Descriptors
        • Defining the URI
        • Defining Tags in The Library
        • Location of TLD in Deployment
  • Appendix A – Learning Resources

Java 8 Training

This course provides a comprehensive introduction to Java suitable for programmers with existing experience. It can be taught to audiences with less experience by reducing coverage of the optional, more advanced topics.

In addition to teaching the fundamentals needed to be productive in basic Java programming, this course provides a solid understanding of the core OO and Java concepts needed to create well designed Java programs. It covers all the key OO capabilities and how to use them in Java, including material on creating well-designed Java classes using encapsulation, building more complex functionality with composition and using inheritance to share functionality and create specialized types. It also covers more advanced concepts such as using interfaces, working with the Java Collections Framework and overviews of accessing databases with JDBC and JPA (including labs using JPA).

This course is suitable for environments using Java 8 but almost all the labs can also be done with Java 7. The material and labs include coverage of useful new Java capabilities such as default/static methods in interfaces, try-with-resources (Java 7) and lambda expressions. It also stresses the use of good coding practices for all the examples and labs.

The course can be customized to fit your needs. Supported platforms include Java 8, Eclipse, IBM RAD (requires Java 8 support) and other IDEs upon request.

 

Course Duration: 5 days

 

Prerequisites:

Experience with Java programming is essential.

 

Course Objectives:

  • Understand Java’s importance, uses, strengths and weaknesses
  • Understand Java language basics
  • Write, compile and run Java programs
  • Understand the object model and object-oriented programming
  • Understand and use classes, inheritance, polymorphism
  • Create well-designed classes and use them in your Java programs
  • Use composition and delegation to create objects from other objects
  • Understand and use packages to organize code
  • Understand interfaces, their importance and their uses
  • Use interfaces to implement abstraction
  • Learn good Java coding style
  • Create well-structured Java programs
  • Compile and execute programs with the JDK development tools and with an Integrated Development Environment (IDE) of your choice
  • Use the core Java libraries (java.lang, java.util)
  • Understand and use exceptions for error handling
  • Understand the basics of using JDBC and JPA, and use them to access databases from Java
  • Use the Java Collections Framework
  • Be aware of and use the new features of Java 8, as well as important advanced features of earlier Java versions
  • Understand and use basic I/O streams (optional)

 

Course Outline:

  • A First Look
    • A Simple Java Class
    • Java’s “Hello World” Program
    • Lab – Hello World:  A Simple Application

 

  • Java Basics
    • Language and Platform Features
    • Program Life Cycle
    • The Java SE Development Kit (JDK)
    • Lab – Working with the Development Environment

 

  • Class and Object Basics
    • The Object Model and Object-Oriented Programming
    • Classes, References and Instantiation
    • Adding Data to a Class Definition
    • Adding Methods (Behavior)
    • Lab – Exploring Types and Object Instances
    • Lab – Writing and Using a Class Definition with Fields and Methods

 

  • More on Classes and Objects
    • Accessing Data, The “this” Variable
    • Encapsulation and Access Control, Public and Private Access
    • Constructors and Initialization
    • Static Members of a Class
    • Scopes, Blocks, References to Objects
    • Type-Safe Enums
    • Lab – Encapsulation / Access Protection
    • Lab – Writing and Using Constructors
    • Lab – (Optional) Static Members
    • Lab – Using Enums
    • Lab – Using the Debugger

 

  • Flow of Control
    • Branching: if, if-else, switch
    • Iteration: while, do-while, for, break, continue
    • Lab – Flow of Control / Data Validation

 

  • Strings and Arrays
    • String, StringBuffer, StringBuilder
    • Arrays, Primitive Arrays, Arrays of Reference Types
    • Varargs
    • Labs – Using Strings and Arrays

 

  • Packages
    • Package Overview – Using Packages to Organize Code
    • Import Statements
    • Creating Packages, Package Statement, Required Directory Structure
    • Finding Classes, Packages and Classpath
    • Lab – Using Packages to Organize Code

 

  • Composition and Inheritance
    • Using Composition to Deal with Complexity
    • Composition/HAS-A, Delegation
    • Using Inheritance and Polymorphism to Share Commonality
    • IS-A, Extends, Inheriting Features, Overriding Methods, Using Polymorphism
    • Class Object
    • Abstract Classes
    • Lab – (Optional) Working with Composition
    • Lab – Using Inheritance to Specialize Classes

 

  • Interfaces
    • Using Interfaces to Define Types
    • Interfaces and Abstract Classes
    • Default Methods and static Methods (Java 8)
    • Lab – Using Interfaces to Remove Implementation Dependencies

 

  • Exceptions
    • Exceptions and the Exception Hierarchy
    • try and catch
    • Handling Exceptions
    • Program Flow with Exceptions
    • finally
    • Lab – Throwing and Handling Exceptions

 

  • Java Collections and Generics
    • The Collections Framework and its API
    • Collections and Java Generics
    • Collection, Set, List, Map, Iterator
    • Autoboxing
    • Collections of Object (non-generic)
    • Using ArrayList, HashSet and HashMap
    • for-each Loop
    • Processing Items with an Iterator
    • More About Generics
    • Lab – Using Lists and Generics
    • Lab – Using Sets

 

  • Database Access with JDBC and JPA
    • JDBC Overview
      • JDBC Architecture and API
      • Using DriverManager, Connection, Statement and ResultSet
    • JPA Overview
      • JPA Architecture and Programming View
      • Entity Classes and Annotations
      • Mapping an Entity Class
      • EntityManagerFactory and EntityManager
      • Working with JPA (Find by primayry key and inserts)
    • Lab – Mapping an Entity Class
    • Lab – Working with JPA

 

  • Additional Java Features
    • Assertions
    • Annotations
    • Lambda Expressions and Method References (Java 8)
    • Additional Features

 

  • Session 14: I/O Streams (Optional)
    • Readers and Writers
    • Filter Streams
    • Byte Streams
    • Formatted Output
    • New I/O (NIO) APIs
    • Lab – Formatting Output

 

  • Appendix: JDBC
    • JDBC Overview
    • JDBC Architecture and API
    • Database Connections
    • Issuing Statements and Processing Data

Java Development for Secure Systems

This advanced course shows experienced developers of Java web applications how to secure those applications and apply best practices with regard to secure enterprise coding. Authentication, authorization and input validation are major themes, and students will get good exposure to basic Java cryptography for specific development scenarios, as well as participate in thorough discussions of HTTPS configuration and certificate management, error handling, logging and auditing.

 

Course Duration: 3 days

 

Course Objectives:

  • Generally, be prepared to develop secure Java web applications or to secure existing applications by refactoring as necessary
  • Define security constraints and login configurations that instruct the web container to enforce authentication and authorization policies
  • Validate user input aggressively for general application health and to foil injection and XSS attacks
  • Configure a server and/or application to use one-way or two-way HTTPS
  • Apply application-level cryptography where necessary.
  • Secure log files and establish audit trails for especially sensitive information or actions

 

Course Outline:

  • Secure Web Applications
    • Threats and Attack Vectors
    • Server, Network and Browser Vulnerabilities
    • Secure Design Principles
    • GET versus POST
    • Container Authentication and Authorization
    • HTML Forms
    • Privacy Under /WEB-INF
    • HTTP and HTTPS
    • Other Cryptographic Practices
    • SOA and Web Services
    • The OWASP Top 10

 

  • Authentication and Authorization
    • HTTP BASIC and DIGEST Authentication Schemes
    • Declaring Security Constraints
    • User Accounts
    • Safeguarding Credentials in Transit
    • Replay Attacks
    • Authorization Over URL Patterns
    • Roles
    • FORM Authentication
    • Login Form Design
    • EJB Authorization
    • Programmatic Security
    • Programmatic Security in JSF
  • Secure Application Design
    • Single Points of Decision
    • Cross-Site Scripting
    • Validation vs. Output Escaping
    • Forceful Browsing
    • Cross-Site Request Forgery
    • Request Tokens
    • Injection Attacks
    • Protections in JDBC and JPA
    • Session Management
    • Taking Care of Cookies
    • Validating User Input
    • Validation Practices
    • Regular Expressions
    • JSF Validation
  • HTTPS and Certificates
    • Digital Cryptography
    • Encryption
    • SSL and Secure Key Exchange
    • Hashing
    • Signature
    • Keystores
    • Keytool
    • Why Keys Aren’t Enough
    • X.509 Certificates
    • Certificate Authorities
    • Obtaining a Signed Certificate
    • Configuring HTTPS
    • Client-Side Certificates and Two-Way SSL
    • PKCS #12 and Trust Stores
    • CLIENT-CERT Authentication
  • Application-Level Cryptography
    • The Java Cryptography Architecture
    • Secure Random Number Generation
    • The KeyStore API
    • The Signature Class
    • The SignedObject Class
    • The MessageDigest Class
    • The Java Cryptography Extensions
    • The SecretKey and KeyGenerator Types
    • The Cipher Class
    • Choosing Algorithms and Key Sizes
    • Dangerous Practices
  • Secure Development Practices
    • Secure Development Cycle
    • Error Handling and Information Leakage
    • Failing to a Secure Mode
    • Logging Practices
    • Appropriate Content for Logs
    • Auditing
    • Strategies: Filters, Interceptors, and Command Chains
    • Penetration Testing
    • Back Doors

Java Enterprise Edition (JEE5 with EJB3)

Java Enterprise Edition (Java EE 5) is a powerful platform for building web applications. The Java EE platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This course tells students what they need to know to design and build their own web applications. Participants will explore details of the key Java EE technologies and how to leverage the strengths of each with special focus on Servlets and JSP. At the same time, they’ll learn about the big picture of Java EE and how to design web applications that are robust, efficient and maintainable. If you want to deliver an application on the web, you’ll find this course essential.

The course begins with a discussion of web application architecture. A major part of the course is spent on Servlets and JavaServer Pages (JSP) with special focus on using the JSTL. It then covers JDBC, Java’s database access technology. The course concludes with an introduction to EJB and other important Java EE technologies. Throughout the course, students will create code for a online store. Students will learn not only specific topics and APIs but also how to fit the pieces together into a complete application.

Supported platforms include Eclipse/Tomcat, GlassFish, JBoss AS, IBM Rational Application Developer (RAD) / Websphere AS and Weblogic AS.

 

Course Duration: 5 days

 

Prerequisites:

Students should have an understanding of Java, Servlets, JSPs and EJBs.

 

Course Objectives:

  • Design and build robust and maintainable web applications
  • Create dynamic HTML content with Servlets and Java Server Pages, using the JSP Standard Tag Library (JSTL)
  • Make Servlets and JSP work together cleanly
  • Use JSTL and other Custom Tag Libraries to separate Java and HTML code
  • Access databases with JDBC
  • Use Enterprise JavaBeans effectively from Servlets and JSP
  • See the full descriptions for detailed content

 

Course Outline:

  • Java EE Introduction
    • Java EE Overview
    • Java EE Technologies
    • Java EE Architecture
    • MVC
  • Servlets and JSP with JSP Standard Tag Library (JSTL) Web Application Basics
    • How the Web Works, Thin Clients, TCP/IP
    • HTTP Overview, Brief HTML Review
    • Overview of J2EE
    • Web Application Structure and Contents
    • Servlet Basics and Capabilities
    • Basics of Writing a Servlet
    • Labs – Setup Development Environment and Server
      • Create a Simple Web Application
      • Create a Simple Servlet
  • Servlet API
    • HTML Forms Review
    • HTTP Review
      • Request-Response, Headers, GET, POST
    • How Servlets Work
      • Servlet Lifecycle: init (), service (), destroy ()
      • API – Servlet, ServletConfig, ServletRequest, ServletResponse, GenericServlet,
      • Requests and Responses – Using ServletRequest and ServletResponse
      • HTTP Servlets – HttpServlet, HttpServletRequest, HttpServletResponse
      • Accessing Parameters
      • More About web.xml
    • Labs – Using Client Input, Retrieving Parameters
  • Additional Servlet Capabilities
    • Working with HttpServletResponse
      • Status/Errors
      • Response Headers
      • MIME Types
    • Initialization
      • Overview
      • Using ServletConfig and ServletContext
      • Init Parameters – Servlet and Web App
    • Error Handling, Error Pages and Their Configuration
    • Labs – Using Model Classes, Generating Simple Output
  • JavaServer Pages
    • Basics and Overview
      • JSP Architecture
      • JSP Tags and JSP Expressions
      • Fixed Template Data
      • Lifecycle of a JSP
    • Model View Controller (MVC)
      • Overview
      • Java EE Model 2 Architecture: Servlet Controllers, JSP Views, JavaBeans Glue
    • Servlets as Controllers
      • Using RequestDispatcher
      • Forwarding and Including
    • Data Sharing in a Web App
      • Object Scopes or “Buckets”
      • Using JavaBeans to Hold Data
      • Using the Scope Objects – get/set/remove Attributes
      • Request, Application, Session and Page Scope
    • JSP Expression Language (EL) and Data Access
      • JSP EL Overview
      • JavaBeans and the EL
      • Predefined JSP EL Implicit Objects (pageContext, param, header, scope objects)
      • , ,
    • jsp:include, jsp:forward, the page Directive
    • Lab – Create a Simple JSP Page
      • Put Data on a Scope and Forward to a JSP
      • Use the JSP Expression Language
  • Using Custom Tags
    • Custom Tags Overview
    • Reducing JSP Complexity
    • Tag Libraries
      • Overview and TLD (Tag Library Descriptor)
      • Taglib Directive – Using a Tag Library
    • JSTL
      • Overview
      • c:out, c:forEach
      • c:url, c:param
    • Labs – Use c:forEach for Iteration
      • Working with Links and c:url
  • HTTP Session Tracking
    • HTTP Session Overview
      • HTTP as a Stateless Protocol
      • Hidden Form Fields
    • Cookies
      • Overview and Servlet API
      • Using Cookies, Persistent and Session Cookies
      • Issues
    • Sessions
      • Servlet/JSP Session Support, HttpSession
      • Using Sessions – Putting Data in, Retrieving Data From
      • How Sessions Work
    • Labs – Storing and Using Session Data
  • More JSP Capabilities
    • Error Pages
      • Error Pages and Exception Handling
      • The Implicit Exception Object
      • JSP 2.0+ Error Handling and errorData Object
      • Directives (page, include, others)
    • JSPs as XML Documents
    • Scriptlets – Overview and Usage
    • Labs:
      • Using Error Pages
      • {Optional} Using Scriptlets
  • More JSTL and EL
    • More About the JSTL
      • Core, Formatting, SQL, XML, Functions Libraries
      • Custom Tag Architecture and Tag Library Structure
      • c:if, c:choose, c:import
      • Formatting: formatNumber, formatDate, Resource Bundles
      • Using Common Tags
      • XML Action Example
    • More About the JSP EL
      • Syntax, Identifiers, Literals, Operators
      • Implicit Objects
      • The pageContext in Detail
      • Type Coercion
      • String Concatenation
    • Using Common Tags
      • c:if, c:choose
      • c:set
      • fmt:formatDate, fmt:formatNumber
    • Labs – Using c:if, c:choose, c:when and c:otherwise
      • [Optional]: Using the Function Library
      • JSTL Format Tags
  • Security
    • J2EE Security Overview
    • Role Based Security
    • Declarative Security
    • Web Authentication – Basic, Form-Based, Digest, HTTPS Client
    • Using Basic Authentication
    • Using Form-Based Authentication
    • Programmatic Security – HttpServletRequest, Retrieving Roles
    • Labs – Securing a Web App, Setting Up and Using a Security Domain
  • Additional Topics
    • Design Issues
      • Dividing Responsibilities Between Servlets/JSP
      • Network Overhead
      • Scalability – Clustering, Serving Static Content
      • Using the Technology Well
    • Custom Tags Using Tag Files
      • Overview and Writing Tag Files
      • Tag Attributes
      • The Tag Directive
    • Servlet Filter Overview
      • Filtering Examples, Lifecycle and Filter Chains
      • Filter API, Modifying a Request, Modifying a Response
    • Java ServerFaces (JSF) Overview
      • Advanced MVC – JSF Overview
      • JSF Components
      • Process Flow
      • Advantages and Disadvantages
  • JDBC
    • JDBC Introduction
    • Relational Database and JDBC Overview
      • Overview, Table Relationships, Web-Based Data Access, JDBC Characteristics
    • JDBC Architecture, JDBC API Overview
      • DriverManager, JDBC Drivers
      • Naming Databases with JDBC URLs
    • Connecting to a Database
      • Connection interface, Establishing a Connection
    • DataBaseMetaData
    • Handling Database Exceptions
  • Data Access with JDBC
    • Data Access Objects (DAO), O-R Mapping, Value Objects
    • Processing Database Data
      • Executing Statements, Precompiled Statements and Stored Procedures
      • Processing ResultSets
      • Dealing with Null Sata
      • Updating, Inserting, Retrieving Data
      • Controlling Transactions
    • JDBC Driver Types
    • Labs – Creating DAO using JBDC
  • Advanced Topics
    • Java Persistence API Overview
    • Advanced JDBC Features
      • Batch Updates, Srollable Result Sets, Rowsets, User Defined Types, BLOBS, CLOBS
  • Database Integration and Additional Technologies
    • Java EE Database Integration
    • Environment Naming Context (ENC) and Resource Injection
    • JNDI Overview and the ENC
    • Connecting Servlets to a Database via DataSource
    • Connection Pooling
  • Additional Topics
    • EJB
      • Overview of EJB
      • High-Level EJB Architecture
      • Roles within EJB
      • Client View of a Session Bean
      • JNDI (Java Naming and Directory Interface)
      • Remote and Home Interfaces
      • Writing an EJB Client
    • XML and Web Services Overview
      • XML and Web Services
      • JAX-WS Web Services Overview
    • Design Considerations: Web Design, System Architecture, Scalability, Clustering
    • Lab – Accessing a Database from a Servlet
      • Other Optional Labs (Depends on Platform Support)

Java Enterprise Edition (JEE5) with Servlets JSP and JDBC

Java Enterprise Edition (Java EE 5) is a powerful platform for building web applications. The Java EE platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This course tells participants what they need to know to design and build their own web applications. They’ll learn the details of the key Java EE technologies and how to leverage the strengths of each, with special focus on Servlets and JSP, and at the same time, they’ll cover the big picture of Java EE and how to design web applications that are robust, efficient and maintainable. If you want to deliver an application on the web, you’ll find this course essential.

The course begins with a discussion of web application architecture. A major part of the course is spent on Servlets and JavaServer Pages (JSP) with special focus on using the JSTL. It then covers JDBC, Java’s database access technology. The course concludes with an introduction to EJB and other important Java EE technologies. Throughout the course, students will create code for an online store. Students will learn not only specific topics and APIs but also how to fit the pieces together into a complete application.

Supported platforms include Eclipse/Tomcat, GlassFish, JBoss AS, IBM Rational Application Developer (RAD) / Websphere and Weblogic AS.

 

Course Duration: 5 days

 

Course Objectives:

  • Design and build robust, maintainable web applications
  • Create dynamic HTML content with Servlets and Java ServerPages using the JSP Standard Tag Library (JSTL)
  • Make servlets and JSP work together cleanly
  • Use JSTL and other custom tag libraries to separate Java and HTML code
  • Access databases with JDBC
  • Use enterprise JavaBeans effectively from servlets and JSP

 

Course Outline:

  • Java EE Introduction
    • Java EE Overview
    • Java EE Technologies
    • Java EE Architecture
    • MVC
  • Web Application Basics
    • How the Web Works, Thin Clients, TCP/IP
    • HTTP Overview, Brief HTML Review
    • Overview of J2EE
    • Web Applications Structure and Contents
    • Servlet Basics and Capabilities
    • Basics of Writing a Servlet
    • Labs – Setup Development Environment and Server
      • Create a Simple Web Application
      • Create a Simple Servlet
  • Servlet API
    • HTML Forms Review
    • HTTP Review: Request-Response, Headers, GET, POST
    • Overview: How Servlets Work
      • Servlet Lifecycle: init(), service(), destroy()
      • API: Servlet, ServletConfig, ServletRequest, ServletResponse, GenericServlet,
      • Requests and Responses – Using ServletRequest and ServletResponse
      • HTTP Servlets: HttpServlet, HttpServletRequest, HttpServletResponse
      • Accessing Parameters
      • More About web.xml
    • Lab – Using Client Input, Retrieving Parameters
  • Additional Servlet Capabilities
    • Working with HttpServletResponse
      • Status/Errors
      • Response Headers
      • MIME Types
    • Initialization
      • Overview
      • Using ServletConfig and ServletContext
      • Init Parameters – Servlet and Web App
    • Error Handling: Error Pages and Their Configuration
    • Labs – Using Model Classes, Generating Simple Output
  • JavaServer Pages
    • Basics and Overview
      • JSP Architecture
      • JSP Tags and JSP Expressions
      • Fixed Template Data
      • Lifecycle of a JSP
    • Model View Controller (MVC)
      • Overview
      • Java EE Model 2 Architecture
      • Servlet Controllers, JSP Views, JavaBeans Glue
    • Servlets as Controllers
      • Using RequestDispatcher
      • Forwarding and Including
    • Data Sharing in a Web App
      • Object Scopes or “Buckets”
      • Using JavaBeans to Hold Data
      • Using the Scope Objects
      • Request, Application, Session and Page Scope
    • JSP Expression Language (EL) and Data Access
      • JSP EL Overview
      • JavaBeans and the EL
      • Predefined JSP EL Implicit Objects (pageContext, param, header, scope objects)
      • , ,
    • jsp:include, jsp:forward, the page Directive
    • Labs – Create a Simple JSP Page
      • Put Data on a Scope and Forward to a JSP
      • Use the JSP Expression Language
  • Using Custom Tags
    • Custom Tags Overview
    • Reducing JSP Complexity
    • Tag Libraries
      • Overview and TLD (Tag Library Descriptor)
      • Taglib Directive – Using a Tag Library
    • JSTL
      • Overview
      • c:out, c:forEach
      • c:url, c:param
    • Lab – Use c:forEach for Iteration
      • Working with Links and c:url
  • HTTP Session Tracking
    • HTTP Session Overview
      • HTTP as a Stateless Protocol
      • Hidden Form Fields
    • Cookies
      • Overview and Servlet API
      • Using Cookies, Persistent and Session Cookies
      • Issues
    • Sessions
      • Servlet/JSP Session Support, HttpSession
      • Using Sessions – Putting Data in, Retrieving Data From
      • How Sessions Work
    • Labs – Storing and Using Session Data
  • More JSP Capabilities
    • Error Pages
      • Error Pages and Exception Handling
      • The Implicit Exception Object
      • JSP 2.0+ Error Handling and errorData Object
      • Directives (Page, Include, Others)
    • JSPs as XML Documents
    • Scriptlets – Overview and Usage
    • Labs – Using Error Pages
      • {optional} Using Scriptlets
  • More JSTL and EL
    • More About the JSTL
      • Core, Formatting, SQL, XML, Functions Libraries
      • Custom Tag Architecture and Tag Library Structure
      • c:if, c:choose, c:import
      • Formatting: formatNumber, formatDate, Resource Bundles
      • Using Common Tags
      • XML Action Example
    • More About the JSP EL
      • Syntax, Identifiers, Literals, Operators
      • Implicit Objects
      • The pageContext in Detail
      • Type Coercion
      • String Concatenation
    • Using Common Tags
      • c:if, c:choose
      • c:set
      • fmt:formatDate, fmt:formatNumber
    • Labs – Using c:if, c:choose, c:when and c:otherwise
      • [Optional] Using the Function Library
      • JSTL Format Tags
  • Security
    • J2EE Security Overview
    • Role Based Security
    • Declarative Security
    • Web Authentication – Basic, Form-Based, Digest, HTTPS Client
    • Using Basic Authentication
    • Using Form-Based Authentication
    • Programmatic Security – HttpServletRequest, Retrieving Roles
    • Labs – Securing a Web App, Setting Up and Using a Security Domain
  • Additional Topics
    • Design Issues
      • Dividing Responsibilities Between Servlets/JSP
      • Network Overhead
      • Scalability – Clustering, Serving Static Content
      • Other Guidelines – Using the Technology Well
    • Custom Tags Using Tag Files
      • Overview and Writing Tag Files
      • Tag Attributes
      • The tag Directive
    • Servlet Filter Overview
      • Filtering Examples, Lifecycle, Filter Chains
      • Filter API, Modifying a Request, Modifying a Response
    • Java ServerFaces (JSF) Overview
      • Advanced MVC – JSF overview
      • JSF Components
      • Process Flow
      • Advantages and Disadvantages
  • JDBC Introduction
    • Relational Database and JDBC Overview
      • Overview, Table Relationships, Web Based Data Access, JDBC Characteristics
    • JDBC Architecture, JDBC API Overview
      • DriverManager, JDBC Drivers
      • Naming Databases with JDBC URLs
    • Connecting to a Database
      • Connection Interface, Establishing a Connection
    • DataBaseMetaData
    • Handling Database Exceptions
  • Data Access with JDBC
    • Data Access Objects (DAO), O-R Mapping, Value Objects
    • Processing Database Data
      • Executing Statements, Precompiled Statements and Stored procedures
      • Processing ResultSets
      • Dealing with Null Data
      • Updating, Inserting, Retrieving Data
      • Controlling Transactions
    • JDBC Driver Types
    • Labs – Creating DAO using JBDC
  • Advanced Topics
    • Java Persistence API Overview
    • Advanced JDBC Features
      • Batch Updates, Srollable Result Sets, Rowsets, User Defined Types, BLOBS, CLOBS
  • Java EE Database Integration
    • Environment Naming Context (ENC) and Resource Injection
    • JNDI Overview and the ENC
    • Connecting Servlets to a Database via DataSource
    • Connection Pooling
  • Additional Topics
    • EJB
      • Overview of EJB
      • High-level EJB architecture
      • Roles within EJB
      • Client View of a Session Bean
      • JNDI (Java Naming and Directory Interface)
      • Remote and Home Interfaces
      • Writing an EJB client
    • XML and Web Services Overview
      • XML and Web Services
      • JAX-WS Web Services Overview
    • Design Considerations: Web Design, System Architecture, Scalability, Clustering
    • Labs – Accessing a Database from A Servlet
      • Other Optional Labs (Depends on Platform Support)

Java Persistence (JPA) Training

As part of the complete overhaul of the Enterprise JavaBeans (EJB) specification, database persistence was broken out into a completely separate specification, the Java Persistence API (JPA). JPA replaces entity beans with powerful new Object-Relational Mapping (ORM) capabilities based on proven technologies such as Toplink and Hibernate. This course includes all-important features from JPA 2 and is also suitable for users of the 1.0 release.

JPA supports a POJO (Plain Old Java Object)-based model using annotations, which lets you develop persistent classes following common Java idioms. It supports entity relationships, inheritance, polymorphism, composition and much more. The Java Persistence Query Language (JPQL), which is based on SQL but operates on the object model, provides a powerful bridge between the object and relational worlds. JPA also allows you to express queries using native SQL, including the capability to map the SQL query results to persistent entities.

This course concisely covers everything you need to know to begin working with the Java Persistence API. All the important concepts necessary to access and update data stored in relational databases are reviewed and an extensive series of labs is included to exercise all major capabilities.

 

Prerequisites:

Students should be proficient is OOP (Object-Oriented Programming) and Java.

 

Course Objectives:

  • Understand the JPA architecture
  • Create JPA based applications
  • Understand and use JPA to map persistent objects to the database
  • Create JPA persistence units and understand JPA persistence contexts and the entity lifecycle
  • Use the JPA EntityManager
  • Work with queries and JPQL (Java Persistence Query Language) as well as the Criteria API (JPA 2)
  • Understand and work with collections and associations
  • Use versioning support for optimistic locking
  • Map inheritance hierarchies using JPA
  • Performance tune your JPA applications
  • Understand JPA transaction support
  • Understand the relationship between JPA / EJB3
  • Use JPA entities from session beans (Optional)
  • Be familiar with Spring support for JPA (Optional)

 

Course Outline:

  • Introduction to Java Persistence API (JPA)
    • Overview
      • Persistence Layers, Object-Relational Mapping (ORM), JDBC
      • JPA Overview
  • Mapping with JPA
      • Entities and @Entity, ids and @Id,
      • Generated Id Values
      • Basic Mapping Types
  • Persistence Unit and EntityManager
      • Persisting to the DB, the EntityManager API
      • Persistence Units, Config, Persistence Context
      • Retrieving Persistent Entities with find()
  • More About Mappings
      • Default Mappings, @Basic, @Column
      • Field versus Property Access
      • Temporal (Date/Time) Mappings
  • Logging Options (Provider Based)
  • Updates and Queries
    • Inserting and Updating – Persisting New Entities, Updating an Instance, Removing an Instance Querying and JPQL
      • Entity Based Queries, SELECT ,WHERE
      • Query Interface, Executing Queries, Generic Queries (JPA 2)
      • JPQL Operators, Expressions and Parameters
      • Named Queries
  • Additional Query Capabilities
      • Projection Query, Ordering, Aggregate Query, Build Update and Delete
  • Embedded Objects
      • @Embeddable, @Embedded
      • Defining and Using Embedded Objects
  • Compound Primary Keys – @EmbeddedID, @IDClass, Defining Compound Keys
  • The Persistence Lifecycle
    • Transaction Overview and Transactions in JPA
      • Transaction Overview
      • EntityTransaction API (including JTA and resource-local EntityManager)
  • The Persistence Lifecycle
      • JPA Entity States (New, Managed, Detached, Removed), and Entity State Diagram
      • Persistence Context – Lifespan, Propagation
      • Synchronization to the DB
  • Versioning and Optimistic Locking
      • Overview, Detached Instances
      • Versioning, @Version, Optimistic Locking
  • Lifecycle Callbacks
      • @PrePersist, @PostPersist, etc.
      • Entity Listeners, @EntityListeners
  • Entity Relationships
    • Relationships Overview – Object Relationships, Participants, Roles, Directionality, Cardinality Relationship Mapping
      • Mapping Overview (1-1, 1-N, N-1, N-N)
      • Unidirectional and Bidirectional
      • @ManyToOne, @OneToMany, Table Structures
      • Relationship Inverse
      • Collection Types (List, Set, etc.)
      • Cascading Over Relationships (Including orphanRemoval – JPA 2)
      • @ManyToMany, @OneToOne
      • Lazy and Eager Loading
      • Queries Across Relationships (Inner Joins, Outer Joins, Fetch Joins)
  • Entity Inheritance Mapping
      • Overview
      • Single Table Mapping
      • Joined (Table per Subclass) Mapping
      • Table per Concrete Class Mapping
      • Pros and Cons
  • Element Collections (JPA 2)
      • Overview, Collections of Value Objects, @ElementCollection, @CollectionTable
      • Using Element Collections
      • Collections of Embeddable
  • The Criteria API (JPA 2)
    • Overview of the Criteria
    • API Path Expressions, Building Queries (CriteriaBuilder, CriteriaQuery, Subquery, Predicate, Expression, Order, Selection, Join) Executing Queries and Accessing Results
  • Additional JPA Capabilities
    • XML Mapping Files
    • Bean Validation (JPA 2)
    • Best Practices
      • Primary Keys, Named Queries, Lazy/Eager Loading, Transactional Semantics, Encapsulation, Report Queries
  • Integration
    • Data Access Objects (DAO) and Java SE Integration (Optional)
      • DAO Overview
      • JpaUtil Class for EntityManager Management in Java SE
      • Lifecycle Considerations
  • Integration with EJB (Optional)
      • Using JPA with Session Beans
      • Container Managed (Injected) Entity Manger
      • JTA Transactions and Lifecycle Considerations
      • Extended Persistence Contexts
  • Using JPA with Java Web Apps
      • Using EntityManager in Web Apps
      • Lazy Loading – Open EntityManager in View Pattern
  • Integration with Spring (Optional)
      • Injection of EntityManger, EntityManagerFactory
      • LocalEntityManagerFactoryBean
      • JPA/Spring Based DAO

Java Programming with Eclipse

Our Java Programming with Eclipse training course provides an introduction to developing Java applications with Eclipse. Participants will learn how to create and debug various Java applications in this popular IDE.

 

Course Duration: 5 days

 

Prerequisites:

None prerequisites required but any programming experience is helpful.

 

Course Objectives:

  • Understand Eclipse’s architecture and workbench
  • Developing basic applications in Eclipse
  • Learn to debug in Eclipse
  • Understand how to testing code in Eclipse
  • Review object-oriented principles and practices

 

Course Outline:

  • Eclipse Introduction
    • Eclipse Overview
    • Installing and Running Eclipse
    • Workbench Overview
  • Object-Oriented Concept
    • Objects
    • Classes, Instances, Fields and Methods
    • Encapsulation
    • Polymorphism
    • Inheritance
    • Dynamic Binding
  • Java Overview
    • Java Introduction
    • Java Syntax
    • Java Basics
    • Arrays
    • Eclipse Scrapbook
  • Classes
    • Classes in Java
    • Static Fields and Methods
    • Commonly Used Classes in Java
    • Searching Java classes in Eclipse
  • Java IDE
    • Building and Running Java Classes
    • Unit Testing
  • Debugging
    • Debugging Tips and Tricks in Eclipse
  • Control Statements
    • Java Control Statements
    • Eclipse Shortcuts
  • Inheritance
    • Inheritance – How and Why
    • Interfaces
    • Type Hierarchy in Eclipse
  • Collections
    • Generic Collections
    • ArrayList
    • HashMap
    • Iterator
    • Vector
    • Enumeration
    • Hashtable
  • Exceptions
    • Definition
    • Exception Types
    • Exception Hierarchy
    • Catching Exceptions
    • Throwing Exceptions
    • Defining Exceptions
    • Common Exceptions and Errors
  • Javadoc
    • Doclets
    • Comments
    • Placement
    • Sections
    • Tags
    • Running Javadoc

Java Server Faces (JSF)

JSF is a J2EE technology that focuses on simplifying the building of web based user interfaces in Java. It builds on existing technologies, such as Servlets and JSP, but solves many of the issues that arise when using them directly by providing a standard component based user interface (UI) framework that can be leveraged by tools to provide a rich and easy-to-use development environment.

This course includes numerous hands on labs that will have you building working JSF applications very quickly as well as important architectural concepts and practical instruction on how to use the many capabilities of the JSF framework.

Broad coverage of the most important JSF capabilities – including the JSF architecture, working with managed beans, the JSF Expression Language, the JSF core and HTML tag libraries, data tables, validation and conversion – are also included. An overview of advanced technologies, such as using JSF and AJAX, close out the course.

All labs are done with the Eclipse IDE Java EE version deploying to the Tomcat server.

 

Course Duration: 3 days

 

Prerequisites:

Java Programming and JavaServer Pages knowledge strongly recommended. Programming experience with Java servlets is also helpful.

 

Course Objectives:

  • Understand the shortcomings of servlets/JSP and the need for a framework like JSF
  • Understand MVC and the JSF architecture
  • Create and configure applications using JSF, including the FacesServlet, and the faces-config.xml file
  • Understand and use managed beans to manage application data
  • Configure navigation rules for your web application
  • Create web pages using the JSF core and html tags and the JSF expression language
  • Lay out tables using the JSF h:datatable and associated tags
  • Handle action events, value change events and data model events
  • Use JSF validators to validate your input data
  • Understand and use JSF data conversion
  • Understand the JSF request lifecycle and write phase listeners
  • Understand how AJAX and JSF can be used together

 

Course Outline:

    • Overview of Java EE and Java Web Applications
      • Java EE and Web App Overview
      • Servlet, Servlet Scopes
      • JSPs, JSP Lifecycle
      • Custom Tags, Tag Libraries, taglib directive
      • Model View Controller
    • Getting Started with JSF
      • JSF Overview
        • Purpose and Goals
        • JSF Architecture
        • JSF Views, Managed Beans, Controller, Configuration
      • Downloading and Installing JSF
      • Your First JSF Application – Setup, Configuration, Deployment
      • Server Setup and Use
    • Managed Beans
      • Defining a Managed Bean
      • Managed Bean Lifecycle
      • Elements in faces-config.xml
      • Managed Beans and JSF Forms
      • Managed Beans as Value Binding Expressions
      • JSF Expression Language (EL) and the Unified EL (JSF 1.2)
      • Value Binding Expressions
      • Method Binding Expressions
      • Implicit Objects
    • JSF Navigation
      • Configuration Issues
      • and Nested Elements
      • How to Use the Navigation Rules
    • The JSF Tag Libraries
      • JSF Tag Library Overview
      • JSF Core tags
      • JSF HTML tags
      • Using the Most Common Form Controls
    • h:dataTable
      • Tag and Nested Tags
      • Working with Collections of Type List or array
      • Table Headers and Footers, f:facet
    • More About JSF Tags
      • Using and
      • Using the h:selectXxx Tags (e.g h:selectManyListbox)
      • JSF Event Model
        • Action, Value Change and Data Model Listeners
    • JSF Validation
      • Standard Validators
      • Required, validateDoubleRange, validateLongRange
      • Creating, Configuring and Using Custom Validators
    • JSF Conversion
      • Standard JSF Converters
      • convertDateTime, convertNumber
      • Custom Converters
    • JSF Lifecycle
      • Lifecycle Overview
      • Initial Requests and Postbacks
      • Restore View, Apply Request Values, Process Events, Process Validations, Update Model Values, Invoke Application, Render Response
      • renderResponse() and renderComplete()
      • Phase Listeners
    • Additional Topics
      • Backing Beans / UIComponents
      • JSF and CSS
      • JSF and JavaScript
      • Localization and Resource Bundles
      • Ajax4jsf – Using Ajax with JSF

Java Server Faces (JSF) with JBoss

JSF is a J2EE technology that focuses on simplifying the building of web based user interfaces in Java. It builds on existing technologies, such as Servlets and JSP, but solves many of the issues that arise when using them directly by providing a standard component based user interface (UI) framework that can be leveraged by tools to provide a rich and easy-to-use development environment.

This course will quickly bring you up to speed with JSF. It includes numerous hands on labs that will have you building working JSF applications as well as important architectural concepts and practical instruction on how to use the many capabilities of the JSF framework.

The course includes a broad coverage of the most important JSF capabilities, including the JSF architecture, working with managed beans, the JSF Expression Language, the JSF core and HTML tag libraries, data tables, validation and conversion. It also includes overview of advanced technologies, such as using JSF and AJAX.

Upon completion on this course, participants will be ready to use JSF to create their own solutions in the most demanding situations. Note that class time will be equally divided between lecture and hands-on labs, and all labs are done using the JBoss Application Server as the server platform.

 

Course Duration: 3 days

 

Prerequisites:

Three to six months of hands-on Java web development strongly recommended.

 

Course Objectives:

  • Understand the shortcomings of servlets/JSP and the need for a framework like JSF
  • Understand MVC and the JSF architecture
  • Create and configure applications using JSF, including the FacesServlet and the faces-config.xml file
  • Understand and use managed beans to manage application data
  • Configure navigation rules for your web application
  • Create web pages using the JSF core and html tags and the JSF expression language
  • Lay out tables using the JSF h:datatable and associated tags
  • Handle action events, value change events and data model events
  • Use JSF Validators to validate your input data
  • Understand and use JSF data conversion
  • Understand the JSF request lifecycle and write phase listeners
  • Understand how AJAX and JSF can be used together

 

Course Outline:

  • Overview of Java EE and Java Web Applications
    • Java EE and Web App Overview
    • Servlet, Servlet Scopes
    • JSPs, JSP Lifecycle
    • Custom Tags, Tag Libraries, Taglib Directive
    • Model View Controller
  • Getting Started with JSF
    • JSF Overview
      • Purpose and Goals
      • JSF Architecture
      • JSF Views, Managed Beans, Controller, Configuration
    • Downloading and Installing JSF
    • Your First JSF Application
      • Setup, Configuration, Deployment
    • Server Setup and Use
    • Setting Up and Running JBoss AS
  • Managed Beans
    • Defining a Managed Bean
    • Managed Bean Lifecycle
    • Elements in faces-config.xml
    • Managed Beans and JSF Forms
    • Managed Beans as Value Binding Expressions
    • JSF Expression Language (EL) and the Unified EL (JSF 1.2)
    • Value Binding Expressions
    • Method Binding Expressions
    • Implicit Objects
  • JSF Navigation
    • Configuration Issues
    • and Nested Elements
    • How to Use the Navigation Rules
  • The JSF Tag Libraries
    • JSF Tag Library Overview
    • JSF Core tags
    • JSF HTML tags
    • Using the Most Common Form Controls
  • h:dataTable
    • Tag and Nested Tags
    • Working with Collections of Type List or Array
    • Table Headers And Footers, f:facet
  • More About JSF Tags
    • Using and
    • Using the h:selectXxx Tags (e.g., h:selectManyListbox)
    • JSF Event Model (Action, Value Change and Data Model Listeners)
  • JSF Validation
    • Standard Validators
    • Required, validateDoubleRange, validateLongRange
    • Creating, Configuring and Using Custom Validators
  • JSF Conversion
    • Standard JSF Converters
    • convertDateTime, convertNumber
    • Custom Converters
  • JSF Lifecycle
    • Lifecycle Overview
    • Initial Requests and Postbacks
    • Restore View, Apply Request Values, Process Events, Process Validations, Update Model Values, Invoke Application, Render Response
    • renderResponse() and renderComplete()
    • Phase Listeners
  • Additional Topics
    • Backing Beans / UIComponents
    • JSF and CSS
    • JSF and JavaScript
    • Localization and Resource Bundles
    • Ajax4jsf – Using Ajax with JSF

Patterns in Frameworks Workshop

Our Patterns in Frameworks course is a three-day intensive workshop focused on the design patterns found in many common frameworks such as Spring, Struts and Java Server Faces (JSF). Common usage in JEE/J2EE is also included such as the servlet framework and EJB (2 and 3). The course is delivered in a 70 percent hands-on coding with minimal lecture.

Lessons are delivered in a “Socratic” fashion whereby:

  • Students are given a problem and asked to solve it
  • A short lecture / demo is given in order to show our solution
  • Students are given time to refactor their solution as needed

Our goal is to provide a “real life” experience in which the participants code a single problem domain throughout the class and use the patterns in context to solve common recurring problems.

This course can be customized to focus on a particular framework of your choosing.

 

Course Duration: 3 days

 

Course Objectives:

  • Enable students to learn the frameworks more quickly
  • Equip students to leverage common frameworks and the JEE environment to their fullest extent
  • Understand and practice refactoring
  • Ground students in key patterns that they can reuse

 

Course Outline:

  • Encapsulation Of Construction
    • The Importance of Hiding Creation
    • The Intent of Factories
    • Factories and Pseudo-Factories
    • Hiding What Changes
    • Factories in the Frameworks
  • Encapsulation of Variation
    • Finding What Varies
    • Understanding the Context
    • The Intent of Strategies
    • Using the Strategy Pattern to Encapsulate Business Rules
    • Strategies in the Frameworks
  • Abstracting Common Flow
    • Same Steps Different Procedures
    • Skeletons and Internal Access
    • The Intent of the Template Method
    • Strategy vs. Template Method
    • The Template Method
  • Model View Controller
    • Understanding Application Flow
    • The Intent of MVC
    • MVC in the Frameworks
  • Encapsulating Request
    • Parameterize clients
    • The Intent of the Command Pattern
    • Understanding the Command Pattern
    • Command Pattern Usage in the Frameworks
  • Controlling Access
    • Access for Business Objects
    • Delegation Before and After Execution
    • The Intent of the Proxy Pattern
    • Variation of Proxies
    • Proxy Usage in Frameworks
  • Aspect Oriented Programming
    • Object Replacement
    • The Intent of the Dynamic Proxy
    • Before and After Advice
    • Dynamic Proxy Usage in Frameworks

SOA and Java Web Services (JAX-WS) on the JBoss Application Server

Web services are designed to allow Web-based access to distributed software and business services. They bring standard, open service architecture to component development that allows them to be accessed over the Web with standard protocols such as HTTP and standard XML formats for messages and service descriptions. This course will give you a thorough understanding of the current Web services architecture, and the technologies that support Web services including the new Java APIs such as JAX-WS and JSR-181.

 

Topics include:

  • SOAP – An XML based messaging mechanism.
  • WSDL – Web services Description Language – An XML language that describes the interface and semantics of a Web service.
  • JAX-WS – Accessing Web services using the latest Java APIs including JAX-WS, JSR-181, JAXB
  • SAAJ – Soap with Attachments API for Java
  • Soap Handlers
  • JAXB – Java Architecture for XML Binding
  • XML Web Services – Working with Web services directly at the XML level
  • MTOM – Handling binary message data in an interoperable way
  • Security – Basic Authentication, HTTPS, and Web Services Security (WS-Security)
  • EJB based Web Services
  • The WS-* Standards – A Brief Overview

We will look at the current state of the art of web services, what works and what doesn’t work, and also at newer standards, and how they fit into the Web services picture. This course is hands on, and students will actually build and deploy Web services during the course.

All labs are done using the JBoss 5 Application Server as the server platform, and the lab instructions include detailed directions on using JBoss.

Supported platforms include JBoss AS, Weblogic AS, GlassFish and RAD/WebSphere.

 

Course Duration: 3 days

 

Course Outline:

  • Service Oriented Architecture (SOA) and Web Services
    • SOA (Service Oriented Architecture) Overview
    • Web Services Overview / Relationship to SOA
    • Web services Architecture
    • SOAP and WSDL Overview
  • Introduction to Java Web Services
    • Java Web Services
    • JAX-WS and JSR-181
    • A Simple Service definition with @WebService
  • JSR-181
    • Overview
    • @WebService, Modifying the Generated Service
    • Other Annotations (@WebMethod, @SOAPBinding)
    • The SEI (Service Endpoint Interface
    • Lab: Defining a Service with an SEI
  • JAX-WS Capabilities
    • Overview
    • WSDL to Java Mapping
    • Capabilities (XML Messaging, Handlers, SOAP/HTTP, Client Programming
    • JAX-WS Clients
    • Programming Model, Generating Classes from WSDL
    • Writing a JAX-WS Client
    • Dynamic Clients
    • Lab: JAX-WS Client and Dynamic Client
  • WSDL – Web Services Description Language
    • Introduction
    • XML Namespace and XML Schema Overview
    • Namespaces and Schema in WSDL Documents
    • WSDL Structure and Elements
    • A WSDL Document
      • Definitions, Types, Messages, PortTypes, and Operations
      • Bindings, Ports, and Services
    • SOAP 1.1 Binding for WSDL
  • SOAP
    • SOAP Overview
    • Message Structure
      • Envelope/Header/Body
      • Detailed Soap message structure
    • SOAP Faults, Attachments
    • SOAP Messaging and HTTP Binding
    • SOAP Styles and Encoding
  • SAAJ, DOM, and SOAP Handlers
    • SAAJ Overview, Message Structure and API
    • Creating/Sending Messages
    • DOM Overview
    • Using DOM with SAAJ
    • SOAP Handlers
      • Overview and Processing
      • Logical and Protocol Handlers
      • Writing/Configuring a SOAP Protocol Handler
      • Writing/Configuring a Logical Handler
    • JAXB – Java Architecture for XML Binding
      • Overview and Architecture
      • Generating Java Classes from XML Schema
      • Customizing Generated Java
      • Generating XML Schema from Annotated Java Classes
      • Web Services, WSDL, and JAXB
    • Start From WSDL / Start from WSDL & Java
      • Starting From WSDL
      • Binding Customizations
      • Starting From WSDL and Java
    • XML-Based (Bare) Web Services
      • XML Messaging Overview
      • JAX-WS Providers
      • A SOAP Provider and Source Provider
      • XML Clients with Dispatch
      • XML/HTTP Messaging with Provider
      • Overview of REST and JAX-RS
    • Handling Binary Data
      • Overview and Issues
      • Default handling
      • MTOM Overview
      • Using MTOM in Services and Clients
      • Using DataHandler
    • Security
      • Java EE Security / Role Based Security
      • Securing Web Services with BASIC Authentication
      • Transport Security / HTTPS
      • Securing Web Services with HTTPS
      • WSS (WS-Security) Overview
    • EJB-Based Web Services
      • EJB Overview
      • Programming EJB
      • Creating/Configuring EJB-Based Web Services
      • Lab: Creating an EJB-Based Web Service
    • WS-* Overview
      • WS-Interoperability (WS-I)
      • The WS-I Basic Profile
      • WS-Addressing
    • Best Practices
      • Coarse Grained Web Services
      • Optimization and Caching
      • XML Handling
      • Interoperability
      • Top Down / Bottom Up

Systems Management with JBoss Operations Network

JON (JBoss Operations Network) is an enterprise management solution for JBoss servers and other middleware products. It is based on RHQ, which is the upstream open-source product that JON is built on. All the capabilities covered for JON are applicable to working with RHQ also.

The course provides an in-depth, hands-on introduction to JON, with a focus on using it to manage JBoss server installations/clusters (JBoss EAP 6, JBoss AS 7, and/or WildFly 8) as well as associated products such as Apache httpd/mod cluster. The course starts with the basics, including the somewhat complex installation, and goes on to cover all the important capabilities of JON.

 

Course Duration: 2 days

 

Course Objectives:

  • Understand the JON/RHQ architecture and capabilities.
  • Install and configure a JON installation
  • Configure plugins, and set up agents
  • Understand and work with inventory – import resources, browse and search, control their display
  • Configure JBoss AS 7 / EAP 6 for management by JON/RHQ
  • Use the monitoring capabilities
  • Create and configure alerts and notifications
  • Define bundles (e.g. a JBoss server with your applications), and provision them to a destination (e.g. a target host)
  • Monitor running applications
  • Understand and use the capabilities for managing configuration “drift”

 

Course Outline:

  • Introduction and Installation
    • Overview and Architecture
      • Introduction and Capabilities
      • Key Components and Architecture
      • Web Console
    • Installation and Configuration
      • Acquiring and Installing
      • Setting up the Database
      • Setting up / Configuring the Server
      • Installing the Server and Agent
      • Running JON, Working with the Web Console
    • Provisioning Plugins
      • Investigating Agent Plugins
      • Obtaining, and Provisioning Agent Plugins
  • Managed Resources
    • Inventory
      • Inventory Overview (Resource Hierarchies, Status)
      • Auto-Discovery and Importing
      • Working with Inventory
    • Monitoring and Alerts
      • Monitoring Overview
      • Data Aggregation, Metrics, Graphing
      • Configuring Data Collection
      • Response Time Monitoring
      • Alerts and Notifications
    • Configuration and Management
      • Resource Configuration and History
      • JBoss Server Configuration
      • Resource Operations
      • Resource Groups
      • Provisioning Bundles
    • Provisioning System Overview and Use Cases
      • Understanding all the Pieces
      • Ant Bundle Recipe
      • Application Deployment
      • Server Deployment
    • JON CLI
      • Overview

Test-Driven Development (TDD) for Java

The intensive hands-on course will teach you how to integrate Test Driven Development (TDD) to fully harness the power of modern best practices to provide the most valuable software possible. TDD is about return-on-investment; this course shows you how to implement TDD for results! Derived from our 2 week “Effective Software Development Boot Camp”, this course is highly customizable to fit your specific needs – just ask!

This class is tailored to serve the following audiences: Software Developers, Technical team leaders and Managers needing to better understand the technologies they oversee.

Default language focus is on Java, but the training can be delivered relevant to: Java, C#, VB.net, & C++ languages.

 

Course Duration: 3 days

 

Prerequisites:

Students should complete at least 3-6 months experience with the programming language you want to learn TDD in before taking this course.

 

Course Objectives:

  • Learn to integrate TDD
  • Acquire hands-on, intensive practice using TDD principles
  • Equip your project team to give the best ROI possible

 

Course Outline:

  • Definitions and Uses of Test Driven Development
    • Why Test Driven Development?
    • What is Test Driven Development?
    • TDD Benefits, Best Practices, and Anti-Patterns
    • TDD Microcycle
    • Development environment discussion
  • Testable Designs
    • TDD and Collaborating Objects – testing the code in the middle
    • Test Fakes, Subs, Doubles, Mocks
  • Managing External Dependence
    • Self-Validating Mock Objects
  • Delegation
    • Delegation and Why it is so Powerful
    • How Various Design Patterns Leverage Delegation
  • Intro to Refactoring
    • Test Smells, Code Smells
    • Critical Skills
    • Incremental Improvement
  • Architectural Vision and Incremental Delivery
    • The Big Picture
    • Vertical Slices
    • From Specific to General

Testing with JUnit

The Testing with JUnit course not only covers the JUnit API and mechanics of the tool, it also gives students a strong understanding of best practices. Additionally, the course covers a basic introduction to Test Driven Development (TDD).

 

Course Duration: 2 days

 

Course Objectives:

  • Gain an understanding of what JUnit is and how to use it
  • Get hands on practice writing test methods and test fixtures
  • Understand how TDD can help you write better code, faster
  • Learn about common best practices and pitfalls

 

Course Outline:

  • Unit Testing Overview
    • Basic Principles
    • Automated Test
    • Testing The Right Things
  • Testing With JUnit
    • An Overview Of JUnit
    • JUnit Features and Advantages
    • Writing JUnit Test
    • Assertions
    • Test Methods
    • Exception Testing
    • Fixtures
    • The JUnit Test Lifecycle
    • Invocation Order
  • Best Practices
    • Test Are Real Code
    • Be Thorough
    • Test Your Inputs
    • Small vs Large
    • Break It
    • Bug Fixes
    • Goals
    • Anti-Patterns
  • Test Suites
    • Creating Test Suites
    • Executing Suites
    • Categories
  • Test Driven Development (TDD)
    • Overview
    • Principles and Techniques
    • Benefits and Limitations
    • Best Practices
    • TDD Anti-Patterns
  • Testable Design
    • Testable Code
    • Test Fakes, Stubs and Doubles
    • Mock Objects

The JSP Standard Tag Library (JSTL)

This two-day module introduces the JSTL, or JSP Standard Tag Library, actually a set of four custom tag libraries that establish a portable standard for common processing tasks in JSP. JSTL is a major part of the “scriptless” authoring style encouraged (and enabled) by the JSP 2.0 specification. This module covers all four JSTL libraries in depth:

  • The core actions, which support JSP expressions for JSP 1.x containers, flow control for procedural processing in JSPs, and resource access
  • The formatting and internationalization/localization actions, which standardize formatted numeric and date/time output as well as multi-language support
  • The SQL actions, which dramatically simplify access to relational data from a JSP
  • The XML actions, which give JSPs a simple, powerful framework by which to parse, address and transform XML data using XPath and XSLT

Each individual tag in each library is covered, with precise syntactic rules shown in a standard format in the student guide, and JSTL techniques and best practices are discussed for each library. An extensive set of example applications illustrates common usage of each major group of actions, and the module culminates with a wrap-up workshop that brings core, SQL, and XML techniques to bear in a single application.

 

Course Duration: 2 days

 

Prerequisites:

Students should be well versed in Java Web Programming.

 

Course Objectives:

  • Describe the use of the JSP expression language to simplify dynamic page output
  • Write JSP expressions and implement JSPs that use them in favor of scripts
  • Implement JSPs that use basic JSTL actions to simplify presentation logic
  • Decompose a JSP application design into fine-grained, reusable elements including JavaBeans, custom tag handlers and tag files that use JSTL
  • Use core JSTL actions to complement standard actions, custom actions, and JSP expressions for seamless, script-free page logic
  • Direct conditional and iterative processing of page content by looping through ranges of numbers, over elements in a collection, or over tokens in a master string
  • Import external resources by URL for processing, or redirect the JSP container to an external resource to handle the current request
  • Set locale and time zone information in JSPs, and use them to correctly format numbers, dates and times for all clients
  • Use resource bundles to manage application strings, and produce the appropriate strings at runtime for a particular client locale
  • Locate a data source, query for relational data, and parse result sets
  • Perform updates, inserts and deletes on relational data using SQL actions
  • Manage queries and updates in transaction contexts
  • Parse XML content from a variety of sources
  • Derive information from parsed XML content using XPath expressions
  • Implement conditional processing and loops based on XML information
  • Apply XSLT transformations to XML content
  • Implement a simple Web service that reads and writes SOAP

 

Course Outline:

  • JSTL Overview
    • The JSP Standard Tag Library
    • The JSP Expression Language
    • EL Syntax
    • Type Coercion
    • Error Handling
    • Implicit Objects for EL
    • JSTL Namespaces
    • Using JSTL in a Page
  • The Core Actions
    • Going Scriptless
    • Object Instantiation
    • Sharing Objects
    • Decomposition
    • Parameterization
  • The Core Actions
    • The JSTL Core Library
    • Gotchas
    • Conditional Processing
    • Iterative Processing
    • Iterating Over Maps
    • Tokenizing Strings
    • Catching Exceptions
    • Resource Access
  • The Formatting and i18n Actions
    • The JSTL Formatting Library
    • Locales
    • Determining Locale
    • Time Zones
    • Setting Locale and Time Zone
    • Formatting and Parsing Dates
    • Formatting and Parsing Numbers
    • Internationalization
    • Working with Resource Bundles
    • Supporting Multiple Languages
  • The SQL Actions
    • The JSTL SQL Library
    • Using Relational Data
    • Connecting with a DriverManager
    • Connecting via a DataSource
    • The Result Interface
    • Making a Query
    • Inserts, Updates and Deletes
    • Parameterized SQL
    • Transactions
  • The XML Actions
    • The JSTL XML Library
    • Using XML
    • XML Data Sources
    • Parsing and Addressing
    • Using XPath in JSTL
    • XPath vs. EL
    • XPath Context
    • Implicit Objects for XPath
    • Conditional Processing
    • Iterative Processing
    • Changing XPath Context
    • Working with XML Namespaces
    • Using XSLT
    • Chaining Transformations
    • Reading XML from the Request Body
    • XML and SOAP Web Services