Enterprise Architecture Java Java EE 101 Training Awareness

  • Slides: 16
Download presentation
Enterprise Architecture Java / Java EE 101 Training Awareness M. Reha, Enterprise Architecture 2009

Enterprise Architecture Java / Java EE 101 Training Awareness M. Reha, Enterprise Architecture 2009 -04 -10, v 0. 1 Confidential and Proprietary AAA NCNU © 2008, 2009

> > > Agenda Course #1: • Introduction to the Java Programming Language •

> > > Agenda Course #1: • Introduction to the Java Programming Language • “Hello World” Java class Encapsulation, Inheritance, Interfaces • Course #2: • Introduction to the Java EE Platform • “Hello World” Java EE web application Closing Questions • References • 2

Background on Java SE and Java EE 3

Background on Java SE and Java EE 3

Introduction to the Java Programming Language > > > Java is a programming language

Introduction to the Java Programming Language > > > Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun made available most of their Java technologies as free software under the GNU General Public License. 4

History of the J 2 EE Platform: • • • Java Platform Edition JPE

History of the J 2 EE Platform: • • • Java Platform Edition JPE announced in May 1998 J 2 EE 1. 2 released in December 1999 (peak of the. COM era) J 2 EE 1. 3 released in September 2001 (end of. COM era) J 2 EE 1. 4 released in November 2003 EE 5 released in May 2006 EE 6 scheduled release for the end of 2008 (approval of JCP specification) Lots of enterprises are still on J 2 EE 1. 3 from 2002! The Portlet Specification was not released until October 2003. 5

J 2 EE Platform from post. COM era (2002 -2004) Client (mostly browser based)

J 2 EE Platform from post. COM era (2002 -2004) Client (mostly browser based) Utilities and Core Services Logging (Wrapper) Tracing (Wrapper) Exception Framework Base Classes/Frameworks Alert (like HP Open View) Cache (Wrapper) Static Data Security/SSO * Web Application Server Governance Standards, Best Practices/Guidelines Architecture Review Boards etc. Struts 1. x (MVC) JSTL (Tag Library) My. Faces/Sun JSF RI Apache Commons (Utility) Apache Log 4 j (Logging) Hibernate(Persistence) i. Batis (Persistence) i. Text (PDF) POE (MS Docs) Quartz (Timer Service) Castor (XML Framework) Apache Xerces/Xalan (XML) Apache Axis (Web Services) SSO OSCache/EHCache (Cache) * Web EJB JSP Servlet Session Entity MDB JCA JTA Mail JMS JAAS JMX JAXB Integration/Middleware Business Rule Engine ETL Messaging/MQ FTP Web Services Proprietary Scripts etc. Screen Scraping * J 2 SE 1. 3 – 1. 4 JNI RMI JNDI JDBC Java. Bean Java 3 D Java 2 D Swing AWT MVC DAO Command Factory Business Delegate Business Façade Decorator Value Object * * Open Source J 2 EE 1. 3 – 1. 4 JAX-R Design Patterns Containers and Services for UI, Business, Database Security Administration and Deployment Value Add Services (Proprietary Frameworks etc. ) JAX-RPC SDLC and Development Tools XP, Scrum, RUP, Waterfall Eclipse, IBM WSAD/RAD, Net. Beans, JBuilder, Intelli. J Code Analyzers (Checkstyle, Find. Bugs), Unit Test Frameworks (JUnit, Test. NG) UI: HTML, CSS/DHTML, Java. Script, AJAX, Applets, Flash Application Logic, Business Logic, Data Access Logic Enterprise Application Integration (EAI) 6

> > > J 2 EE Platform Observations from 2002 -2004 Leveraged lots of

> > > J 2 EE Platform Observations from 2002 -2004 Leveraged lots of open source libraries to fill in the J 2 EE specification gaps (like Web MVC Framework, XML, Web Services). Soon there would be competing and redundant technologies such as XML, Web Services, Logging, etc. . The Enterprise and Application Architect definitely had their work cut out for them. What technologies do we use? Some J 2 EE specifications were of little value to the enterprise (for example, Entity Beans (CMP or BMP) and Stateful EJB’s…. . J 2 EE 1. 2 only supported remote Session Beans!). Enterprise Integration was tightly coupled and reuse of enterprise assets not fully thought out or realized. Application Servers often provided proprietary (and competing) technologies and frameworks (Portlets, Web, Security, etc. ). Lots of programming models to learn. Governance was often over looked causing lots of inconsistencies in architecture and duplication of code/frameworks. Most development methodologies were still very “water fall”. XP was just taking off. Development Tools needed improving. Generally there was very high TCO for 1 st generation (MVC-1) and 2 nd generation (MVC-2) applications. De-facto Standard Application Servers: Web. Logic, Web. Sphere, and some Oracle. Increasing frustration with J 2 EE standard (some of it was justified and some was not). 7

J 2 EE Web 1. 5/2. 0 Application Architecture (2005 -present) Client (not just

J 2 EE Web 1. 5/2. 0 Application Architecture (2005 -present) Client (not just browser based anymore) Web Application Open Source Struts 2 (MVC) Apache Commons (Utility) i. Batis (Persistence) i. Text (PDF) POE (MS Docs) Quartz (Timer Service) Apache Axis (Web Services) OSCache/EHCache (Cache) * Struts 2 Framework Presentation Rails/Grails Framework HTML, CSS, Java. Script, AJAX JSF, Spring. MVC, JSP, Servlets, JSTL Facelets, Seam, Spring Web. Flow Business Rule Engine GWT Framework Utilities and Core Services Logging/Tracing (Wrapper) Exception Framework Base Classes/Frameworks Alert (like HP Open View) Cache (Wrapper) Static Data Security/SSO * Object Model Application Domain Model Business POJO (via Spring or Session) Message Driven Beans Timer Beans Web Services SOA EAI ESB, BPM WS-* UDDI WSDL XML JCA ETL JMS/MQ Data Access JDBC, SQL, SP JPA/Hibernate/Top. Link/i. Batis OLTP DB J 2 EE Application Server (now some open source) EE 5 J 2 SE 5 Spring DI AOP Spring. MVC Web. Flow Security Open JDK Java, Ruby, Groovy, Python, Scala 8 Legacy Systems And Legacy DB Or DW

> > > > > Observations from 2005 -2007 Move away from Struts 1.

> > > > > Observations from 2005 -2007 Move away from Struts 1. x or proprietary frameworks to newer web frameworks like JSF (plus Facelets, Seam, and Ajax 4 Jsf) or Struts 2 or Spring. MVC (with Web. Flow). Move toward annotation based configuration (versus mass of XML configuration files). Less Open Source required (due to maturity of EE specification, Spring, and open source application servers like JBoss, Glassfish, Tomcat 5/6). Apache Foundation, Spring, Craig Mc. Clanahan (JSF), Rod Johnson(String/EJB 3), Gavin King(Hibernate/JPA) were really influencing and pushing the Java/J 2 EE platform forward. Spring getting lots of traction in the industry (dependency injection (simple but powerful!), POJO based for simpler programming model, AOP (for security, transactions, tracing, etc), wrappers for integration with EJB, WS, etc. ). Net. Beans IDE is becoming a viable and powerful IDE (Eclipse finally has some competition). Eclipse Foundation followed suite and also released Eclipse Europa. No need to buy a J 2 EE IDE now. Rather then reinvent we must reuse in the Enterprise, move from vertical applications to Enterprise wide applications => SOA and leverage full Web Service stack, ESB, BPM. New EE web applications can be built much quicker and with much less code. My last project, using JSF and Spring and i. Batis, was built with 50% less code, delivered on time (actually over delivered by adding more features requested from our customer), and was 25% under budget. Google influence => Google Web Toolkit, Google Docs, Google Maps, etc. Sun and Microsoft finally working together (WS-* in 2006) => that is a good thing for everybody! 9

Course #1 – Java SE 101 10

Course #1 – Java SE 101 10

“Hello World” in the Java Programming Language Name of Object In Java == Object.

“Hello World” in the Java Programming Language Name of Object In Java == Object. java or a Class Hello. World Object private String message; Data / State private Font font; The Objects internal data or state Behavior public say. Hello(); / Operations The Objects behavior or operations 11

“Hello World” in the Java Programming Language 12

“Hello World” in the Java Programming Language 12

More “Hello World” in the Java Programming Language Extends the behavior of Hello. World

More “Hello World” in the Java Programming Language Extends the behavior of Hello. World Base. Hello private String message; public say. Loud. Hell. Io(); public say. Hello(); 13

More “Hello World” in the Java Programming Language 14

More “Hello World” in the Java Programming Language 14

Course #2 – Java EE 101 15

Course #2 – Java EE 101 15

References Anonymous. 2009. Wikipedia. Retrieved April 10, 2009 from http: //www. wikipedia. com 16

References Anonymous. 2009. Wikipedia. Retrieved April 10, 2009 from http: //www. wikipedia. com 16