SlideShare a Scribd company logo
Application Architectures -
 Where We Have Been,
  Where We Are Going



       Srini Penchikala
    Detroit Java User Group
      December 17, 2008
Speaker Bio
Srini Penchikala
Enterprise Architect, Flagstar Bank

•    Writer: InfoQ, TSS, ONJava, DevX Java, java.net
•    Using Java/JEE since 2000
•    SOA/Web Services since 2006
•    PowerPoint since September 2008
Goals for this Presentation

• Give an:
  – Overview of application architectures of the past,
    present and future
  – Update on the most important trends affecting
    Enterprise Java development
Contents
• Introduction
• Current Architecture
• Future Architecture
     –   DI, AOP, Annotations
     –   Spring
     –   Java as a platform
     –   OSGi
     –   Cloud Computing
     –   Database Layer
• What’s next for J2EE/JEE?
Presentation Format
• Interactive
• Demos
• Duration: ~60 minutes
Current Architecture – J2EE Way
• JSP/Servlet/Struts
• EJB 2.x
  • Session Beans with Business Logic
• JMS
  • Unit testing constraints
• POJO’s as a last resort
• EAR
• J2EE application servers
Current Architecture Constraints
• Business:
  • Not enough communication between Business Units and IT
    teams.
  • Architects/Developers are thinking only about infrastructure.
  • We have lost real OOP
• Technology:
  •   Unit testing constraints
  •   EJB 2.x (deployment descriptors)
  •   Transaction Management
  •   J2EE (EAR/WAR)
New Architecture – Back to Basics
• POJO’s as first-class citizen components
  • Controller components
  • Facade classes (POJO’s w/ Transactions managed
    via Annotations)
  • Domain Classes (with State and Behavior)
  • Message Driven POJO’s (JMS)
• Deployed as WAR files (no need for EAR)
• Light-weight JEE containers
Arch Layer             Current              New

UI/Application JSP/Servlet/Struts   POJO (Spring MVC)

Facade         EJB 2.x              POJO (EJB3, Spring)
               • Session Beans

Domain         Anemic               Rich (POJO based)
Model

Deploy         EAR                  WAR, JAR

Server         J2EE App Servers     OSGi container
Design Recipe
• Object Oriented Programming (OOP)
• Dependency Injection (DI)
• Aspect-Oriented Programming (AOP)
• Annotations
OOP Principles
   Domain Element          State/Behavior

Entity                 State and Behavior
Value Object
Aggregate
Data Transfer Object   State only

Service                Behavior only
Repository
Dependency Injection
• Decouple and manage the dependencies of the
  components in the application
• DI Frameworks:
  • Spring
  • Google Guice
  • Pico Container
Demo
• Data Access Object (DAO) example
Aspect-Oriented Programming
• Allows developers to add behavior to objects in a
  non-obtrusive manner through use of static and
  dynamic crosscutting.
• Main goal is to code cross-cutting concerns in
  separate modules and apply them in a
  declarative way.
Demo
• Profiling example
• Architecture Rules
Annotations
• Added in Java SE 5.0 as Java Metadata facility
  (JSR 175).
• Provide a way to add metadata to program
  elements.
• Defined by nearly every recent JSR standard.
• Also include a mechanism for adding custom
  annotations to the Java code*.
Annotations Examples
  Layer     Domain Element  Annotation
Domain      Entity         @Entity (JPA),
            Value Object   @Configurable
Domain      Repository      @Repository
Domain      Service         @Service
Application Controller      @Controller
All         All             @Component
Custom Annotations
• Implementation Options
  –   Reflection
  –   Annotation Processing Tool (APT)
  –   Byte-code Instrumentation (Javassist)
  –   Aspects/AOP (AspectJ and Spring AOP)
Demo
• Caching example
• Requirement: To cache specific data (objects)
  using a custom Annotation
• Annotation: @CacheEntity
Spring Framework
• Separation of concerns (business v.
  infrastructure)
• POJO Based Design
• Business domain first, only then infrastructure
  concerns (persistence & txn management)
• Agile Development, Testing, Refactoring & CI
Spring Philosophy
Spring Portfolio
• Spring Core
• Spring AOP
• Spring Security
• Spring MVC/Spring WebFlow
Persistence & Txn Management
• JDBC
• JPA w/ Hibernate, OpenJPA, EclipseLink
  (TopLink)
• Spring JPA Utils & Data Source DI
• Spring JTA Support
   • Transactions are managed in Service
     classes using “@Transactional” annotation
Web Services, Async Messaging &
ESB's
• Web Services
    –   REST
• Message Driven POJO's (MDP)
• AMQP standard
• Enterprise Service Bus (ESB)
    –   Apache ServiceMix
    –   Mule, JBossESB
    –   Spring Integration Framework
Java as a platform (not a
language)
• Dynamic Languages (Groovy, JRuby, Scala)
• Domain Specific Languages (DSL’s)
  • Internal
  • External
Deployment
• OSGi v. Java Module System (JSR-277)
• Implementations:
     –   Eclipse Equinox, Apache Felix, KnopflerFish
     –   Spring DM Framework
• Light-weight & OSGi compatible containers
     –   WebLogic 10.3
     –   WebSphere 7
     –   Tomcat 6
     –   SpringSource dm Server
Distributed Computing
• Parallel / Concurrent Programming
     –   Concurrency package in Java SE 5
     –   Fork/Join in the upcoming Java SE 7
• Cloud Computing
     –   Virtualization
     –   Amazon EC2, Gigaspaces
     –   Terracotta
     –   GridGain, JPPF
Database Layer
• New Distributed Data Storage Frameworks:
     –   Amazon S3
     –   Big Table
     –   Hypertable (High Performance, Scalable DB)
     –   MapReduce
     –   Hadoop
     –   AtomServer (Publishing for Data Distribution)
     –   Neo4j (Graph database)
     –   CouchDB
Other Trends
• Web 2.0 turning Internet into application platform
• AJAX and Rich Clients
• Rich Internet Applications (RIA)
     –   Flex, Silverlight and JavaFX
• Rich Client Platform (RCP)
     –   Eclipse RCP, Spring RCP
• Conversational Web Frameworks
     –   Seam, Spring WebFlow
• Batch Frameworks
     –   Spring Batch
What’s next for J2EE/JEE?
• Java EE 6 (JSR-316)
  – Profiles, Web Beans
• JPA 2.0 (JSR-317)
  – Criteria Expression Support
• EJB 3.1 (JSR-318)
  – Deploy EJB’s in a WAR (no need for EAR's any
    more)
• Spring 3.0
  – REST/EJB 3.1 Support
Conclusion
• Java EE 6 may keep Java EE relevant, but Java
  EE no longer shapes the future
• Light-weight frameworks will be used more
  widely.
• One of the key technologies that will shape the
  future is OSGi
Resources
• Patterns of Enterprise Application Architecture, Martin
  Fowler
• Enterprise Integration Patterns, Gregor Hohpe
• Spring Framework
• Domain Driven Design Website
• Domain Driven Design by Eric Evans
• Domain Driven Design Quickly, InfoQ mini-book
• Domain Driven Design & Development In Practice
• Can DDD be Adequately Implemented Without DI and AOP
Resources - 2
• AspectJ
• AspectJ Development Tools (AJDT), Eclipse
  Plugin
Contact Information
• Domain-Driven Design and Enterprise
  Architecture articles on InfoQ.
• InfoQ website (http://www.infoq.com)
• E-Mail: srinipenchikala@gmail.com
• Blog: http://srinip2007.blogspot.com
Questions

More Related Content

What's hot

Alexander Zeng
Alexander ZengAlexander Zeng
Alexander Zeng
Alex Zeng
 
pranayJ
pranayJpranayJ
pranayJ
Pray B
 

What's hot (20)

JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database JDBC Next: A New Asynchronous API for Connecting to a Database
JDBC Next: A New Asynchronous API for Connecting to a Database
 
JDBC
JDBCJDBC
JDBC
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander Zeng
 
Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9
 
A Tour of the Modern Java Platform
A Tour of the Modern Java PlatformA Tour of the Modern Java Platform
A Tour of the Modern Java Platform
 
pranayJ
pranayJpranayJ
pranayJ
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
 
Wakanda db parisjs-2011-12
Wakanda db parisjs-2011-12Wakanda db parisjs-2011-12
Wakanda db parisjs-2011-12
 
JDBC
JDBCJDBC
JDBC
 
EclipseLink JPA
EclipseLink JPAEclipseLink JPA
EclipseLink JPA
 
Chap3 3 12
Chap3 3 12Chap3 3 12
Chap3 3 12
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 

Viewers also liked

Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
David Meyer
 
Rg0035 A Guideto Service Improvement Nhs Scotland
Rg0035 A Guideto Service Improvement Nhs ScotlandRg0035 A Guideto Service Improvement Nhs Scotland
Rg0035 A Guideto Service Improvement Nhs Scotland
primary
 

Viewers also liked (20)

Last Trends in Architecture
Last Trends in ArchitectureLast Trends in Architecture
Last Trends in Architecture
 
Last trends in architecture (new)
Last trends in architecture (new)Last trends in architecture (new)
Last trends in architecture (new)
 
DisCo 2013: Hronova and Knihova - Six New Learning Architecture Trends
DisCo 2013: Hronova and Knihova - Six New Learning Architecture TrendsDisCo 2013: Hronova and Knihova - Six New Learning Architecture Trends
DisCo 2013: Hronova and Knihova - Six New Learning Architecture Trends
 
Resume eng
Resume engResume eng
Resume eng
 
Outside The Opera, Paris
Outside The Opera, ParisOutside The Opera, Paris
Outside The Opera, Paris
 
Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
Macro Trends, Architecture, and the Hidden Nature of Complexity (and what doe...
 
Application architecture for the rest of us - php xperts devcon 2012
Application architecture for the rest of us -  php xperts devcon 2012Application architecture for the rest of us -  php xperts devcon 2012
Application architecture for the rest of us - php xperts devcon 2012
 
Architectural and Building Trends to Look for in 2015.
Architectural and Building Trends to Look for in 2015.Architectural and Building Trends to Look for in 2015.
Architectural and Building Trends to Look for in 2015.
 
Server Management
Server ManagementServer Management
Server Management
 
Rg0035 A Guideto Service Improvement Nhs Scotland
Rg0035 A Guideto Service Improvement Nhs ScotlandRg0035 A Guideto Service Improvement Nhs Scotland
Rg0035 A Guideto Service Improvement Nhs Scotland
 
Developing and implementing asset lifecycle management strategies
Developing and implementing asset lifecycle management strategiesDeveloping and implementing asset lifecycle management strategies
Developing and implementing asset lifecycle management strategies
 
L01 Enterprise Application Architecture
L01 Enterprise Application ArchitectureL01 Enterprise Application Architecture
L01 Enterprise Application Architecture
 
Gothic architecture
Gothic architectureGothic architecture
Gothic architecture
 
Architectural building study – jama masjid
Architectural building study – jama masjidArchitectural building study – jama masjid
Architectural building study – jama masjid
 
Server training
Server trainingServer training
Server training
 
ITSM Presentation
ITSM PresentationITSM Presentation
ITSM Presentation
 
Architectural styles
Architectural styles Architectural styles
Architectural styles
 
Application Architecture
Application ArchitectureApplication Architecture
Application Architecture
 
Humanities - Architecture
Humanities - ArchitectureHumanities - Architecture
Humanities - Architecture
 
Types of server
Types of serverTypes of server
Types of server
 

Similar to Application Architecture Trends

Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
Nitesh Dasari
 
Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascript
rajivmordani
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
oscon2007
 

Similar to Application Architecture Trends (20)

New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
Java Ide Day 2008 - Presentation on JDeveloper by Paolo Ramasso
Java Ide Day 2008 - Presentation on JDeveloper by Paolo RamassoJava Ide Day 2008 - Presentation on JDeveloper by Paolo Ramasso
Java Ide Day 2008 - Presentation on JDeveloper by Paolo Ramasso
 
Architecture Enforcement Aspects Itarc2009
Architecture Enforcement Aspects Itarc2009Architecture Enforcement Aspects Itarc2009
Architecture Enforcement Aspects Itarc2009
 
Architecture Enforcement Aspects Itarc2009
Architecture Enforcement Aspects Itarc2009Architecture Enforcement Aspects Itarc2009
Architecture Enforcement Aspects Itarc2009
 
java web framework standard.20180412
java web framework standard.20180412java web framework standard.20180412
java web framework standard.20180412
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Ide
 
Java EE 6 Aquarium Paris
Java EE 6 Aquarium ParisJava EE 6 Aquarium Paris
Java EE 6 Aquarium Paris
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Tu1 1 5l
Tu1 1 5lTu1 1 5l
Tu1 1 5l
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06
 
Java Script recruiting
Java Script recruitingJava Script recruiting
Java Script recruiting
 
Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascript
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 

Application Architecture Trends

  • 1. Application Architectures - Where We Have Been, Where We Are Going Srini Penchikala Detroit Java User Group December 17, 2008
  • 2. Speaker Bio Srini Penchikala Enterprise Architect, Flagstar Bank • Writer: InfoQ, TSS, ONJava, DevX Java, java.net • Using Java/JEE since 2000 • SOA/Web Services since 2006 • PowerPoint since September 2008
  • 3. Goals for this Presentation • Give an: – Overview of application architectures of the past, present and future – Update on the most important trends affecting Enterprise Java development
  • 4. Contents • Introduction • Current Architecture • Future Architecture – DI, AOP, Annotations – Spring – Java as a platform – OSGi – Cloud Computing – Database Layer • What’s next for J2EE/JEE?
  • 5. Presentation Format • Interactive • Demos • Duration: ~60 minutes
  • 6. Current Architecture – J2EE Way • JSP/Servlet/Struts • EJB 2.x • Session Beans with Business Logic • JMS • Unit testing constraints • POJO’s as a last resort • EAR • J2EE application servers
  • 7. Current Architecture Constraints • Business: • Not enough communication between Business Units and IT teams. • Architects/Developers are thinking only about infrastructure. • We have lost real OOP • Technology: • Unit testing constraints • EJB 2.x (deployment descriptors) • Transaction Management • J2EE (EAR/WAR)
  • 8. New Architecture – Back to Basics • POJO’s as first-class citizen components • Controller components • Facade classes (POJO’s w/ Transactions managed via Annotations) • Domain Classes (with State and Behavior) • Message Driven POJO’s (JMS) • Deployed as WAR files (no need for EAR) • Light-weight JEE containers
  • 9. Arch Layer Current New UI/Application JSP/Servlet/Struts POJO (Spring MVC) Facade EJB 2.x POJO (EJB3, Spring) • Session Beans Domain Anemic Rich (POJO based) Model Deploy EAR WAR, JAR Server J2EE App Servers OSGi container
  • 10. Design Recipe • Object Oriented Programming (OOP) • Dependency Injection (DI) • Aspect-Oriented Programming (AOP) • Annotations
  • 11. OOP Principles Domain Element State/Behavior Entity State and Behavior Value Object Aggregate Data Transfer Object State only Service Behavior only Repository
  • 12. Dependency Injection • Decouple and manage the dependencies of the components in the application • DI Frameworks: • Spring • Google Guice • Pico Container
  • 13. Demo • Data Access Object (DAO) example
  • 14. Aspect-Oriented Programming • Allows developers to add behavior to objects in a non-obtrusive manner through use of static and dynamic crosscutting. • Main goal is to code cross-cutting concerns in separate modules and apply them in a declarative way.
  • 15. Demo • Profiling example • Architecture Rules
  • 16. Annotations • Added in Java SE 5.0 as Java Metadata facility (JSR 175). • Provide a way to add metadata to program elements. • Defined by nearly every recent JSR standard. • Also include a mechanism for adding custom annotations to the Java code*.
  • 17. Annotations Examples Layer Domain Element Annotation Domain Entity @Entity (JPA), Value Object @Configurable Domain Repository @Repository Domain Service @Service Application Controller @Controller All All @Component
  • 18. Custom Annotations • Implementation Options – Reflection – Annotation Processing Tool (APT) – Byte-code Instrumentation (Javassist) – Aspects/AOP (AspectJ and Spring AOP)
  • 19. Demo • Caching example • Requirement: To cache specific data (objects) using a custom Annotation • Annotation: @CacheEntity
  • 20. Spring Framework • Separation of concerns (business v. infrastructure) • POJO Based Design • Business domain first, only then infrastructure concerns (persistence & txn management) • Agile Development, Testing, Refactoring & CI
  • 22. Spring Portfolio • Spring Core • Spring AOP • Spring Security • Spring MVC/Spring WebFlow
  • 23. Persistence & Txn Management • JDBC • JPA w/ Hibernate, OpenJPA, EclipseLink (TopLink) • Spring JPA Utils & Data Source DI • Spring JTA Support • Transactions are managed in Service classes using “@Transactional” annotation
  • 24. Web Services, Async Messaging & ESB's • Web Services – REST • Message Driven POJO's (MDP) • AMQP standard • Enterprise Service Bus (ESB) – Apache ServiceMix – Mule, JBossESB – Spring Integration Framework
  • 25. Java as a platform (not a language) • Dynamic Languages (Groovy, JRuby, Scala) • Domain Specific Languages (DSL’s) • Internal • External
  • 26. Deployment • OSGi v. Java Module System (JSR-277) • Implementations: – Eclipse Equinox, Apache Felix, KnopflerFish – Spring DM Framework • Light-weight & OSGi compatible containers – WebLogic 10.3 – WebSphere 7 – Tomcat 6 – SpringSource dm Server
  • 27. Distributed Computing • Parallel / Concurrent Programming – Concurrency package in Java SE 5 – Fork/Join in the upcoming Java SE 7 • Cloud Computing – Virtualization – Amazon EC2, Gigaspaces – Terracotta – GridGain, JPPF
  • 28. Database Layer • New Distributed Data Storage Frameworks: – Amazon S3 – Big Table – Hypertable (High Performance, Scalable DB) – MapReduce – Hadoop – AtomServer (Publishing for Data Distribution) – Neo4j (Graph database) – CouchDB
  • 29. Other Trends • Web 2.0 turning Internet into application platform • AJAX and Rich Clients • Rich Internet Applications (RIA) – Flex, Silverlight and JavaFX • Rich Client Platform (RCP) – Eclipse RCP, Spring RCP • Conversational Web Frameworks – Seam, Spring WebFlow • Batch Frameworks – Spring Batch
  • 30. What’s next for J2EE/JEE? • Java EE 6 (JSR-316) – Profiles, Web Beans • JPA 2.0 (JSR-317) – Criteria Expression Support • EJB 3.1 (JSR-318) – Deploy EJB’s in a WAR (no need for EAR's any more) • Spring 3.0 – REST/EJB 3.1 Support
  • 31. Conclusion • Java EE 6 may keep Java EE relevant, but Java EE no longer shapes the future • Light-weight frameworks will be used more widely. • One of the key technologies that will shape the future is OSGi
  • 32. Resources • Patterns of Enterprise Application Architecture, Martin Fowler • Enterprise Integration Patterns, Gregor Hohpe • Spring Framework • Domain Driven Design Website • Domain Driven Design by Eric Evans • Domain Driven Design Quickly, InfoQ mini-book • Domain Driven Design & Development In Practice • Can DDD be Adequately Implemented Without DI and AOP
  • 33. Resources - 2 • AspectJ • AspectJ Development Tools (AJDT), Eclipse Plugin
  • 34. Contact Information • Domain-Driven Design and Enterprise Architecture articles on InfoQ. • InfoQ website (http://www.infoq.com) • E-Mail: srinipenchikala@gmail.com • Blog: http://srinip2007.blogspot.com