| EC26 - Java / J2EE for Experienced C++ / C# Programmers |
| Duration | 5 Days (customisation) |
| Availability |
|
Course Description
This course covers all major aspects of client / server programming with Java. It is essentially a condensed version of courses EC21 (Java Primer), EC22 (Java Programming) and EC31 (Java Servlet Programming) and is aimed at highly competent programmers who have detailed knowledge of similar programming techniques using C++ or C#.
Pre-requisites
It is stressed that due to the condensed agenda for this course, students must have a strong working knowledge of C++ or C#.
Objectives
The aim of this course is to give experienced C++ or C# students a fully rounded general knowledge of client / server programming with Java providing not just basic skills but moving onto more advanced topics including Collections, Threads, I/O, Servlets and JavaServer Pages.
During the course the student will write many applications, classes, servlets and JSPs ensuring that the statements taught are fully understood and practical experience is gained.
On completion of this course the student will be able to:
- understand the fundamental language differences between C++ or C# and Java
- Take advantage of and understand Interfaces
- Use the Collections Framework (both Java 1.1 and Java 1.2 implementations)
- Create and handle Exceptions
- Use the Java Input/Output classes
- Understand and use Serialization to achieve persistence
- Understand multi-threading and synchronization and use the various techniques available to create separate threads
- Write Servlets that interact with HTTP clients
- Understanding servlet multi-threading issues / pitfalls, session tracking and JavaBean manipulation.
- Write Applications/Servlets that manipulate records in a Database using JDBC
- Code effective JavaServer Pages using Model, View, Controller design pattern methodologies.
Environment
Development will be performed using:
- Eclipse
- NetBeans
- Websphere Studio Application Developer
- Rational Application Developer
- JBuilder
- the Java Development Kit (JDK) plus a text editor
For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.
Course Details
- INTRODUCTION TO JAVA
- What is Java?
- The Java Programming Language
- The Java Platform, Java installation - Path requirements
- What Can Java Do?
- Overview of the many subjects covered by Java
- Advantages of using Java
- Creating a java class
- Running Simple Applications
- A simple first example - The "Hello World" Application
- THE JAVA AND C++ / C# DIFFERENCES
- Variables
- Usage Types, Data Types, Literal Values, Naming Standards, Scope, Initialisation, Constants, Escape Characters
- Arrays & Multi-Dimentional Arrays
- Strings
- Strings are objects!, Concatenation, Testing for String equality, Manipulation
- Creating & Manipulating Objects, Calling Methods, Passing Arguments and Method Overloading, Returning Values from Methods
- Constructors, Static Code
- Inheritance - Extending a Class
- What does a Subclass Inherit?
- Methods in java.lang.Object
- Garbage Collection & Finalization
- Enums (Java 5)
- PACKAGES
- Packages, Using Package Members, Importing
- ABSTRACT CLASSES AND INTERFACES
- Abstract Classes and Methods
- Interfaces
- Defining an Interface, Implementing an Interface
- JAVA KEYWORD SUMMARY
- Accessibility Modifiers
- Declaration Parameters
- Class modifiers, Variable modifiers, Method modifiers
- CONVERSION, FORMATTING AND PRECISION
- Data Type Conversion, Wrapper Classes
- Autoboxing (Java 5)
- Decimal Precision and the BigDecimal class
- Numeric Formatting, Date Formatting
- Formatting (Java 5)
- CASTING
- Literal Values, Implicit & Explicit Casting, Casting With Operators
- Casting Objects, Narrowing & Widening
- THE ECLIPSE/RAD/WSAD DEVELOPMENT ENVIRONMENT (if applicable)
- The Workbench
- Perspectives, Views, Toolbars, Editors
- Importing and exporting, Searching
- Rearranging Views, Fast Views
- Working With Java
- Working with buildpaths and classpaths
- Fixing Problems, Creating new Classes and Interfaces
- The Java Editor
- Editing code and elements, Content/Code Assist, Code Formatter
- Managing Imports, Local History, Refactoring
- Other Views
- The Type Hierarchy, Using the Outline View
- Running and Debugging apps
- COLLECTIONS
- Collection Interfaces And Implementations
- Summary & Comparison Of Collection Implementations
- Lists: ArrayList, Vector, LinkedList
- Maps: HashMap, Hashtable, TreeMap, LinkedHashMap
- Sets: HashSet, TreeSet, LinkedHashSet
- Iterator And Enumeration Interfaces
- Other Collections: Stacks, Properties
- Sorting Objects
- The Comparable Interface, Comparators
- GENERICS
- Parameterised Collections
- Parameterised Types And Iterators
- Parameterised Maps
- Passing Parameterised Types As Method Arguments
- Sorting Data With Generics
- THE FOR-IN STATEMENT
- What the for-in statement can be used with
- Writing Your Own Iterable Classes
- THREADS & SYNCHRONIZATION
- What is a Thread?
- Creating Threads
- Method 1 - Extending the Thread Class
- Method 2 - Implementing the Runnable Interface
- Controlling Threads
- Thread Priority, Terminating Threads, Daemon Threads, Thread Synchronization
- Applet Animation and Threads
- Animation Flickering, Double Buffering to avoid flickering
- Using an Inner Class to Handle Multiple Threads
- ERROR HANDLING
- Java Exceptions
- Runtime and Checked Exceptions, Try / Catch Processing, The Finally Block
- Passing Exceptions up the Stack
- The throws statement
- Creating new Exceptions
- The Throw Statement, Error and Exception Classes, User Defined Exceptions
- JAVA I/O
- The Java I/O API
- The File class, Input and Output Streams, Readers and Writers
- Reading from System Input, Reading from Files, Standard Output Stream - System.out
- Types of I/O classes
- Buffering input/output, ByteArrays, CharArrays, DataStreams
- Serialization - Persistence of Objects
| - DATABASE ACCESS
- What is JDBC?
- What alternatives are there? JDBC vs SQLJ
- How does JDBC work?
- JDBC Drivers and the JDBC API, Statements & Prepared Statements
- Working with data
- Accessing data - Working with Result Sets
- Handling Warnings, Errors and NULL Values
- Scalability Issues
- Transaction Control and Isolation Levels
- Configuring and using DataSources (using JNDI)
- SERVLETS
- Servlet Overview
- Servlet vs CGI Advantages
- The Java Servlet API
- Servlet Life Cycle
- Multi-threading issues / pitfalls
- What Servlets Are
- Non-Http Servlets - Implementing the Servlet Interface
- Non-Http Servlets - Extending the GenericServlet class
- Http Servlets - Extending the HttpServlet class
- What Servlets do
- HTML Get and Post Requests & Catering for both
- Getting data to Servlets - the HttpRequest Object
- Sending HTML back to the client - the HttpResponse Object
- Using the Data sent to a Servlet
- Form Validation
- Data Validation
- Servlets can invoke other servlets
- Dispatching a Resource from within a Servlet
- USING ECLIPSE/WSAD/RAD TO CODE SERVLETS (if applicable)
- The J2EE Heirarchy
- Web Projects, Where Servlets should go
- Creating Servlets
- Testing Web Applications
- Server Perspective, Servers, Server Configurations and Instances
- Debugging Servlets
- ACCESSING DATABASES VIA SERVLETS
- Servlets, JDBC and Connection Pooling
- DataSource Definitions and Getting Database Connections via a DataSource
- DATA SCOPE / PERSISTENCE
- Variable Scope & Protection
- Instance variables are shared!
- Thread Safety - Synchronized Code
- What is Request Scope?
- Storing Objects for the lifetime of the Request
- What is Session Scope?
- Storing Objects for the lifetime of the Session
- Session Tracking using Cookies, URL Rewriting, HiddenFields
- Session Tracking API
- Session Creation and Lookup, Storing and Retrieving Session API Information, Lifecycle, session tracking without Cookie support
- Session Binding
- What is Application Scope?
- Sharing Data between different Servlets
- JAVASERVER PAGES
- JSP Overview
- The Problem with Servlets - Why use JSPs?
- How JSP Pages Are Executed
- Writing a JavaServer Page
- JSP Tags, Directive Tags, Scripting Tags & Scriptlets, Action Tags
- JSP Pre-Defined Objects
- Including Static and Dynamic Content
- Forwarding execution to Servlets, JSP’s or HTML pages.
- JSP Initialisation and Cleanup
- USING ECLIPSE/WSAD/RAD FOR JSP DEVELOPMENT (if applicable)
- Overview
- HTML Page Designer, Creating and editing HTML files
- Testing JSPs
- Testing and Debugging JSPs
- JSP DESIGN PATTERNS
- MVC Architecture
- Where are JSPs used?
- JSP Design Patterns
- Stand alone JSPs, JSPs calling Servlets, JSPs accessing JavaBeans
- Getting data from HTML Forms to JSPs
- Handling HTML Forms
- JavaBeans
- Using JavaBeans
- Form / Bean / JSP Interaction
- Accessing JavaBeans from JSPs - JavaBean Tags
- Getting Data from the Bean to the JSP Page
- Variable and JavaBean Scopes
- JSP Variable Scopes
- JavaBean Scopes
- Moving around!
- Invoking a JSP from a Servlet
- Passing Objects from Servlet to JSP
- Passing JavaBeans from Servlet to JSP
- Error Handling
- The JSP Error Page
- Full Shopping Cart Example
|
Course Format
Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given. During these sessions the delegate will build a simple but complete application.
Examples are used extensively, ranging from simple code 'snippets' to full applications with complete ‘real world’ functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and ‘experiment’ with these under the instructor’s guidance as they are introduced.
These examples are available to take away, along with the delegate’s own work.
The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.
|