- Tel: +44(0)1275 859666
EC26 - Java SE / EE for Experienced C++ / C# Programmers - 5 Days
View Dates and LocationsCourse Description
This course covers all major aspects of client / server programming with Java. It is essentially a condensed version of courses EC21 (Java SE Primer), EC22 (Java SE Programming) and EC31 (Java EE Server-Side 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
- 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
- IntelliJ
- NetBeans
- Websphere Studio Application Developer
- Rational Application Developer
- JBuilder
Customisation
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.
On-site course enquiry (from £165 pp per day)Course Details
View Dates and Locations- 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
- More ways to Sort Objects:
- java.util.Collections, java.util.Arrays
- Collections Method Reference
- INNER CLASSES, ANONYMOUS CLASSES AND LAMBDA EXPRESSIONS
- 'Regular' Inner Classes
- Referencing the Outer and Inner classes from within the Inner class
- Example of 'Regular' Inner Class In Use
- Method-Local Inner Classes
- Anonymous Inner classes
- Implementing Interfaces with Anonymous Inner Classes
- Anonymous Inner Classes within Method calls
- Lambda Expressions (Java 8)
- Sorting Using the Comparator Interface - pre Java 8
- Sorting Using the Comparator Interface - Lamba
- Using Method References - Java 8
- Functional Interfaces - Java 8
- Built-In Functional Interfaces
- Built-In Functional Interfaces - Functions
- Built-In Functional Interfaces - Predicates
- Other Built-In Functional Interfaces
- 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
- JAVA 8 Features
- Interface improvements / Functional interfaces
- Lambda expressions
- The java.util.function package
- The java.util.stream package
- The java.time package
- Collections API additions
- Concurrency API additions
- IO/NIO API additions
- JUNIT INTRODUCTION
- JUnit Example
- JUnit assert Methods
- Testing for exceptions
- Testing Collections
- JUNIT 4
- Testing with JUnit4
- Other JUnit 4 Features
- JAVADOC
- What Does Javadoc Generate?
- Javadoc Tags
- Where Can Tags Be Used?
- 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)
- SQLJ (If Requested)
- SQLJ Programming - Development Cycle using DB2
- SQLJ Cursor Techniques
- 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?
- Other JSP Design Patterns
- MORE JSP CAPABILITIES
- JavaBeans
- Using JavaBeans
- Form / Bean / JSP Interaction
- Variable and JavaBean Scopes
- Invoking a JSP from a Servlet
- Passing Objects from Servlet to JSP
- Passing JavaBeans from Servlet to JSP
- Error Handling and JSP Error Pages
- Full Shopping Cart Example
- CUSTOM TAG OVERVIEW
- Why use Custom Tags?
- How are Custom Tags implemented?
- Custom Tag Elements, the Tag Library Descriptor (TLD)
- The Tag Handler Class, using JavaBeans to Implement Tags
- TAG FILES
- Defining tag files
- Using Tag Files in your JSP
- Using Tag Files for Simple Templating
- JAVASERVER PAGES STANDARD TAG LIBRARY (JSTL)
- JSTL Expression Language
- Core Tags
- Internationalisation (I18N) Tags
- Functions
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.