Advanced Java Programming
Duration: 5 days |
Participants: This course is intended for programmers who are familiar with Java and who want to learn about the advanced features of Java and begin to code Java server side programming. |
Objectives:
Upon successful completion of this course you will be able to:
- Access and update relational databases using Java and JDBC. - Write simple servlets and JSPs that receive and send data to web pages. - Use industry-tested design patterns to write excellent Java code. - Use the file I/O classes to read and write files. - Use the many advanced Java features including autoboxing, generics, annotations, collections, object serialization, reflection, etc. - Write Java controlled regular expression processing. - Use Java to parse and generate XML documents. - Contrast and use the various collection classes efficiently (Vectors, Linked List, Array List (vs. Array), Hash Set, Tree Set, Map Class, Stack Class, etc.). |
Overview:
This intensive hands-on course explores advanced Java language features and packages. Java programmers will be able to take the content learned and immediately apply it to the problems encountered on the job. Good coding practices and efficiencies are emphasized throughout this course, with emphasis on industry-tested design patterns. Server-side Web programming is introduced using servlets and JSPs. Extensive hands-on workshops will use either TextPad or Eclipse as the IDE, as well as Apache Tomcat and an RDBMS, such as MS Access or IBM DB2 for the relational database. |
Prerequisites: A good understanding of Object-Oriented Programming using Java Programming and some Java development experience are required. |
Future Courses for Additional Advanced Topics:
- Struts - Java Servlets Programming - JSPs (Java ServerPages) - JSFs (Java Server Faces) - OO and UML |
Format: Lecture and discussion with hands-on exercises. |
Topic Outline:
- Using Eclipse Running Eclipse for the First Time Editors, Views, and Perspectives Setting up a Project Creating a New Java Application Running a Java Application Shortcut Key Sequences Setting the Classpath Importing Existing Java Code into Eclipse - Design Patterns What are Design Patterns and why use them? Creational Patterns Singleton Factory Method Builder Structural Patterns Façade Adapter Composite Behavioral Patterns? Template State Observer - Collections Java Implementation and Performance Strategies Searching and Sorting Arrays of Primitives Sorting Arrays of Objects Iterators Operations on Collections Thread Safety Conversions - Advanced and New Coding Techniques Generics Generics concepts and usage Type Erasure Type Boundaries Wildcards Generic Methods Strengths and Weaknesses of Generics Legacy Code and Generics Java.lang.Comparable Extending generic classes For/In loop Erasure Reflection Uses for Meta-Data The Reflection API The Class<T> Class The java.lang.reflect Package Reading Type Information Navigating Inheritance Trees Dynamic Instantiation Dynamic Invocation Reflecting on Generics Annotations Aspect-Oriented Programming and Java The Annotations Model Annotation Types and Annotations Built-In Annotations Annotations vs. Descriptors (XML) Standard annotations Writing own annotations Reflecting annotations Assertions When to use Assertions Enabling Assertions Autoboxing/unboxing When to use or avoid Performance Under the covers Type Safe Enums Simple and complex enums Adding methods Switching on enums Under the covers Static Imports When to use and when to avoid Use with enums Variable-length argument lists Bit manipulation Central exception handling - Threads Java Thread Model Creating and Running Threads Manipulating Thread State Thread Synchronization Volatile Fields vs. Synchronized Methods wait and notify join and sleep The Concurrency API Atomic Operations Thread class and Runnable Interface Creating / starting threads Timers Deadlock Performance Issues - Object Serialization What is Serialization? Serializable Objects Writing an Object Reading an Object Handling Exceptions - File I/O Files and streams I/O exceptions File object File class methods Text and binary Object I/O File locking - Regular Expressions Methods of the Matcher Class Syntax of Regular Expressions - XML and Java XML Syntax Elements Attributes Comments Unicode and Character Sets Character References Entity References Character Data Sections (CDATA) Processing Instructions Parsing XML – DOM and SAX JAXP - A Plugability Layer Trees and Nodes Processing Child Nodes Error Handling Building the Node Tree - JavaBeans JavaBean concepts JavaBean Properties Packaging JavaBeans JavaBean Persistence and lifecycle Multithreading Considerations - JDBC SQL Programming RDBMS JDBC Connectivity Model Database Programming Connecting to the Database The reflection classes Creating a SQL Query Getting the Results Updating Database Data Error Checking, SQLException Class, and the SQLWarning Class The Statement Interface The ResultSet Interface Updatable Result Sets JDBC Types Executing SQL Queries ResultSetMetaData Executing SQL Updates JDBC SQL Escape Syntax The PreparedStatement Parameterized Statements Stored Procedures Batch Updates RowSets Large Objects Savepoints CachedRowSets DataSources - Model View Controller Pattern - Introduction to Servlets and JSPs for web application development HttpServlet API HTML form processing Transferring data from html forms to java Session management Using JavaBeans Multi-threading issues Servlets vs. JSPs - Reflection Introduction to Reflection The Class <T> Class The reflect Package Constructors Fields Methods Exception Handling and Reflection Introduction to Reflection JavaBeans Dynamic Programming - Java 6 Highlights - Appendix – Review (if necessary) Interfaces Inheritance, abstract classes Inner classes Arrays Strings StringBuffer Converting Strings to Numbers Line Input Tokenizer Classes Deprecated Methods Data types Passing Data types to a method Method names Constructors and initialization Object Cloning Garbage collection Static blocks CLASSPATH Packages and JAR files |
|