• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Framework adoption for java enterprise application development

Framework adoption for java enterprise application development



Java enterprise framework description and comparison. ...

Java enterprise framework description and comparison.
Experience sharing on a project done, include the architect design, challenges and lesson learn.
Some thoughts on choosing framework and how to cope with the rapid change of technology.



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Framework adoption for java enterprise application development Framework adoption for java enterprise application development Presentation Transcript

    • ©SkywideSoft Technology Limited1Framework Adoption for Java EnterpriseApplication Development• Clarence Ho• Independent Consultant, Author, Java EE Architect• http://www.skywidesoft.com• clarence@skywidesoft.com• Presentation can be downloaded from:• http://www.skywidesoft.com/index.php/seminar
    • ©SkywideSoft Technology Limited2• Enterprise Java Framework Overview• What is an Enterprise Java Framework?• Overview of popular Enterprise JavaFrameworks• Spring vs Standard JEE ComparisonOutline - Part I
    • ©SkywideSoft Technology Limited3• Enterprise Java Framework Adoption – Case Study• Re-develop a legacy application in Java• High level application architecture overview• Main frameworks, libraries and tools adoptedand the decision process• Main challenges and lesson learntOutline - Part II
    • ©SkywideSoft Technology Limited4• Discussions and Chat• Framework/Libraries/Tools selection – how tochoose the right one for your project?• Other thoughts (e.g. Cloud computing, BYOD,Big Data, HTML5, etc.)• Q&AOutline - Part III
    • ©SkywideSoft Technology Limited5Enterprise Java Frameworks
    • ©SkywideSoft Technology Limited6What is a software framework?Source: Wikipedia• A software framework is an abstraction in whichsoftware providing generic functionality can beselectively changed by user code, thus providingapplication specific software.• A software framework is a universal, reusablesoftware platform used to develop applications,products and solutions.• Software Frameworks include support programs,compilers, code libraries, an applicationprogramming interface (API) and tool sets thatbring together all the different components toenable development of a project or solution.
    • ©SkywideSoft Technology Limited7What is a software framework? (cont.)Source: Wikipedia1. Inversion of control - In a framework, unlike in libraries or normaluser applications, the overall programs flow of control is notdictated by the caller, but by the framework2. Default behavior - A framework has a default behavior. Thisdefault behavior must actually be some useful behavior and not aseries of no-ops.3. Extensibility - A framework can be extended by the user usually byselective overriding or specialized by user code providing specificfunctionality.4. Non-modifiable framework code - The framework code, ingeneral, is not allowed to be modified. Users can extend theframework, but not modify its code.Frameworks contain key distinguishing features that separate them fromnormal libraries:
    • ©SkywideSoft Technology Limited8What is an application framework?Source: WikipediaAn application framework consists of a software framework used bysoftware developers to implement the standard structure of an applicationfor a specific development environment (such as a standalone program ora web application).Application frameworks became popular with the rise of multi-tiersenterprise applications since these tended to promote a standardstructure for applications. Programmers find it much simpler to programwhen using a standard framework, since this defines the underlying codestructure of the application in advance. Developers usually use object-oriented programming techniques to implement frameworks such that theunique parts of an application can simply inherit from pre-existing classesin the framework.
    • ©SkywideSoft Technology Limited9What is an enterprise application framework?An application framework designed for the implementation of enterpriseclass applications.In addition to an application framework, an enterprise applicationframework should supports the development of a layered architecture,and provide services that can address the requirements on performance,scalability, and availability.Layers within an enterprise application:- Persistence Layer- Services (Business Logic) Layer- Presentation Layer- Integration Layer (Web Services, Message-based)Services:- Security- Transaction (local and global transactions)- Caching- Batch processing- Task scheduling and asynchronous task execution- Management and monitoring- Testing- and many more …
    • ©SkywideSoft Technology Limited10What is an enterprise Java framework?An enterprise application framework designed for theJava language.Components:- Dependency Injection- AOP (Aspect Oriented Programming)- Persistence- Transactions- Presentation Framework- Web Services- Messaging- Testing
    • ©SkywideSoft Technology Limited11Enterprise Java Frameworks
    • ©SkywideSoft Technology Limited12JEE 6Source: Pro Spring 3• A collection of JCP (Java Community Process) standards• Implemented by all JEE compliant application serversOracle Glassfish 3.1Oracle WebLogic 12cIBM WebSphere 8.5JBoss ApplicationServer 7.1Apache TomEE 1.5.2
    • ©SkywideSoft Technology Limited13JEE 6 – Features/API OverviewSource: JavaOne Presentation by IBM
    • ©SkywideSoft Technology Limited14JBoss Seam Framework• Designed around JEE standards• Mainly supported by JBoss Application Server• Provide a micro-container for use with other AS or Tomcat• Tightly integrates with other JBoss frameworks and libraries
    • ©SkywideSoft Technology Limited15Jboss Seam Framework – Features/API OverviewSource: JavaOne Presentation by IBMHibernateRichFaces
    • ©SkywideSoft Technology Limited16Google Guice• Reference implementation of JSR330 (DependencyInjection for Java)• Focus on DI only• Not a full blown enterprise Java framework
    • ©SkywideSoft Technology Limited17Spring Framework• The most popular enterprise Java framework• Support all major application servers and webcontainers• Support major JEE standards• Integrates with other popular opensource frameworksand libraries
    • ©SkywideSoft Technology Limited18Spring Framework – Features/API OverviewSource: JavaOne Presentation by IBM
    • ©SkywideSoft Technology Limited19JEE vs Spring – Features/API OverviewSource: JavaOne Presentation by IBM* Similar patterns for validation, remoting, security, scheduling, XML binding, JMX, JCA, JavaMail, caching* Spring also support EJB 3.1, but not CDI
    • ©SkywideSoft Technology Limited20Enterprise Java Frameworks
    • ©SkywideSoft Technology Limited21Spring Framework – Main FeaturesFeature Description Sub-proj.IOC Container Configuration of application components and lifecycle management ofJava objects, done mainly via Dependency InjectionAOP Enables implementation of cross-cutting routinesData Access Working with relational database management systems on the Javaplatform using JDBC and object-relational mapping tools and withNoSQL databasesSpring DataprojectsTransactionManagementUnifies several transaction management APIs (JDBC, JPA, JTA, etc.) andcoordinates transactions for Java objects.Model-view-controllerAn HTTP- and servlet-based framework providing hooks for extensionand customization for web applications and RESTful Web Services.Authentication& AuthorizationConfigurable security processes that support a range of standards,protocols, tools and practices via the Spring Security sub-projectSpringSecurityRemoteManagementConfigurative exposure and management of Java objects for local orremote configuration via JMXMessaging Configurative registration of message listener objects for transparentmessage-consumption from message queues via JMS, improvementof message sending over standard JMS APIsTesting support classes for writing unit tests and integration testsSource: Wikipedia
    • ©SkywideSoft Technology Limited22Spring Framework – Latest Features (3.X)Feature Description VersionJava-based Configuration Use Java classes to configure Spring’s ApplicationContext(Spring JavaConfig was merged into the core SpringFramework since 3.0).3.0Embedded JDBCDataSourceEmbedded database support (by using the <jdbc:embedded-database id="dataSource" type="H2"> tag)3.1Validation with TypeConversion and FormattingSpring 3 introduce a new type conversion and formattingsystem, and support of JSR303 Bean Validation API.3.0Persistence with SpringData JPASpring Data JPA’s Repository abstraction greatly simplifies thedevelopment of persistence layer with JPA.3.0Spring MVC Improved support of RESTful-WS. 3.1Spring Expression Language A powerful expression language that supports querying andmanipulating an object graph at run time.3.0Profiles A profile instructs Spring to configure only theApplicationContext that was defined when the specifiedprofile was active3.1Cache Abstraction A caching abstraction layer that allows consistent use ofvarious caching solutions with minimal impact on the code.3.1TaskScheduler Abstraction Provides a simple way to schedule tasks and supports mosttypical requirements.3.0
    • ©SkywideSoft Technology Limited23Other Useful Spring ProjectsProject Description VersionSpring Security Configurable security processes that support a range of standards,protocols, tools and practices3.1.2Spring Data An umbrella project includes many modules that simplifies thedevelopment of persistence layer with various data sources (e.g. JPA,NoSQL, JDBC, Hadoop, etc.)1.XSpring Batch Provides a standard template and framework for implementing andexecuting various kinds of batch jobs in an enterprise environment.2.1.8Spring Integration Provides an excellent integration environment for enterpriseapplications.2.1.3Spring WebFlow Building on top of Spring MVC’s foundation, Spring Web Flow wasdesigned to provide advanced support for organizing the flows insidea web application.2.3.1Spring Mobile An extension to Spring MVC that aims to simplify the development ofmobile web applications.1.0.0Spring Roo A rapid application development solution for Spring-based enterpriseapplications1.2.2SpringSource ToolSuiteAn IDE tools with Eclipse and Spring IDE bundled, together witnnumerous tools for developing Spring applications.3.0.0
    • ©SkywideSoft Technology Limited24Enterprise Java Frameworks
    • ©SkywideSoft Technology Limited25SpringBlogMain Features Allow users to view and post blog entries Allow users to post comments on blog entries Allow users to upload attachment for blog entries Support AOP for filtering bad words Support multiple languages (English, Chinese) Support multiple databases (H2, MySQL) Support multiple data access frameworks (Hibernate, MyBatis) Provides RESTful-WS for retrieving blog entries Supports batch upload of blog entries from XML files Presentation layer Built with Spring MVC, JSPX and jQuery JavaScript library
    • ©SkywideSoft Technology Limited26SpringBlogApplication Layered Architecture
    • ©SkywideSoft Technology Limited27Enterprise Java Frameworks Adoption
    • ©SkywideSoft Technology Limited28Case Study – Project OverviewSource: Wikipedia• Application Description• A Transfer Agency System within an AssetManagement Company• Handle customer interactions and transactionprocessing on subscription/redemption ofvarious funds, as well as business actions (e.g.dividend, split, merge, etc.)• Integrating with numerous peripheral systems(IVRS, document workflow, online e-commerceweb site, financial system, fund A/C system,reporting platform, etc.)• Running on AS400, written in RPG• Character based UI, terminal emulation
    • ©SkywideSoft Technology Limited29Case Study – Project OverviewSource: Wikipedia• Mission• Technology migration• OS: Open Platform (Unix/Linux)• Database: RDBMS• Application Server: JEE Compliance• Language: Object-Oriented Programming• Integration: Messaging, Web Services• Benefits• Openness, scalable, ease of maintenance• Align with corporate direction
    • ©SkywideSoft Technology Limited30Case Study – System ArchitectureSource: WikipediaBackend (Vendor Package)Core processing (A/C, Txn, Allocation)Middle end (In-house Developed)Data interface, Integration, EOD, Extra processingOracleMQSwiftInterfaceWebSphereOracle SolarisIVRSDocumentWorkflowOnlineE-commerceBrowserClientRESTful-WSSchedulingReporting(BO)ETLPeripheralSystemsDataWarehouse
    • ©SkywideSoft Technology Limited31Case Study – Framework AdoptionSource: Wikipedia• Data Access Layer• Hibernate (corporate standard)• Business Logic Layer• Spring Framework (corporate standard)• Presentation Layer (interim solution)• Spring Webflow• Java Server Faces (JBoss Richfaces)• Batch Processing (new and propose)• Spring Batch• Web-service Based Integration (interim solution)• RESTful-WS (Jersey)• Security (corporate standard)• Spring Security (integration with Siteminder)
    • ©SkywideSoft Technology Limited32Case Study – Tools and Library AdoptionSource: Wikipedia• Reporting (Business Objects) Integration• Use BO’s Java SDK• Developed a simple RAO (Report Access Object) layer• PDF Processing• iText• Job Scheduling• Integration with Autosys via RESTful-WS• Other Libraries• Apache Commons
    • ©SkywideSoft Technology Limited33Case Study – ChallengesSource: Wikipedia• Introducing a middle-end system• Added a layer of complexity• Integration with numerous peripheral systems (withdifferent formats and integration method)• Large number of batch jobs (~30 EOD jobs, many intra-day jobs)• Maintenance and support• Complex support/deploy/troubleshooting procedure• Front end• No corporate standard at that moment• Lack of skills
    • ©SkywideSoft Technology Limited34Case Study – Lesson LearntSource: WikipediaProblem Cause If I have a 2nd ChanceBatch processing Hibernate is not batchprocessing friendlyUse JDBC to read all data,Hibernate for update onlyReporting platformintegrationTightly coupled to BO (ifBO was stopped, middle-end not able to start)Use message queue forloosely coupled integrationPresentation layer Performance problemDifficult to maintainLack of skillsUse Spring MVC, JSP, jQueryTesting Numerous performanceproblemPerform load testing asap(even too late in SIT)
    • ©SkywideSoft Technology Limited35The Power of Enterprise Java Frameworks
    • ©SkywideSoft Technology Limited36Other ThoughtsUse JEE or Open Source Frameworks? Considerations Maturity Reliable and proven Developer skill (easy to learn and hire developers) Resources (forums, communities, tutorials, samplecodes, etc.) Spring and Hibernate are the most popular choicesamong enterprise
    • ©SkywideSoft Technology Limited37Other ThoughtsEmerging Technologies Cloud Computing, Big Data (NoSQL), Mobile (BYOD),HTML5, … So far, no JEE standards for those emerging technologiesyet!!! JEE 7 (Sep 2013) will include some HTML5 technologies(e.g. WebSockets) NoSQL Hibernate OGM (Object-Grid mapping) Spring data projects (commons, MongoDB, ApacheHadoop, Redis, Neo4j)
    • ©SkywideSoft Technology Limited38Other ThoughtsExperience sharing No matter what framework you use (or use JEE), stillneed to make a lot of decisions It doesn’t matter whether a framework/library is JEEstandard or not. Most important is that it’s the one mostsuitable for your environment A good ALM (application life-cycle management)platform and workflow is another key to success Source code control and issue tracking Code review Continuous build, code style check, automatedtest, … Learn, learn, learn. Research, research, research
    • ©SkywideSoft Technology Limited39Enterprise Java Frameworks Adoption