How To Develop A Domain Driven Web Development With Tapestry, Hivemind And Hibernate



Similar documents
Monitoring Pramati EJB Server

Monitoring Applications on Pramati Server

Converting Java EE Applications into OSGi Applications

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Enterprise Application Development In Java with AJAX and ORM

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

S3 Monitor Design and Implementation Plans

What means extensibility?

SPRING INTERVIEW QUESTIONS

Operations and Monitoring with Spring

Architecture Rules Enforcement and Governance Using Aspects

How To Write A Web Framework In Java

Model-View-Controller. and. Struts 2

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

Oracle WebLogic Server 11g Administration

Java and Web. WebWork

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

ActiveVOS Server Architecture. March 2009

An introduction to creating JSF applications in Rational Application Developer Version 8.0

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville

Glassfish, JAVA EE, Servlets, JSP, EJB

Stock Trader System. Architecture Description

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

Web Frameworks and WebWork

Design Approaches of Web Application with Efficient Performance in JAVA

ORM IN WEB PROGRAMMING. Course project report for 6WW Erik Wang

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

This presentation will provide a brief introduction to Rational Application Developer V7.5.

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

A Comparison of Open Source Application Development Frameworks for the Enterprise

Enterprise JavaBeans 3.1

Performance Optimization For Operational Risk Management Application On Azure Platform

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

WebSphere Training Outline

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Requirements Design Implementation. Software Architectures. Components Software Component Architecture. DSSA: Domain-Specific Software Architectures

Oracle Application Development Framework Overview

applications. JBoss Enterprise Application Platform

NetBeans IDE Field Guide

Ruby On Rails. CSCI 5449 Submitted by: Bhaskar Vaish

Java EE 7: Back-End Server Application Development

Rapid Application Development. and Application Generation Tools. Walter Knesel

Chapter 4. Architecture. Table of Contents. J2EE Technology Application Servers. Application Models

Module Title: : Cloud Application Development

How To Integrate With An Enterprise Service Bus (Esb)

EBA Procurement Procedure for the Supply of Website Services 2016: Annex 1 System Architecture Document SYSTEM ARCHITECTURE DOCUMENT

Distribution and Integration Technologies

Aspects of using Hibernate with CaptainCasa Enterprise Client

design coding monitoring deployment Java Web Framework for the Efficient Development of Enterprise Web Applications

Actuate Business Intelligence and Reporting Tools (BIRT)

Software Development Kit

Framework Adoption for Java Enterprise Application Development

Core Java+ J2EE+Struts+Hibernate+Spring

<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks

In this chapter, we lay the foundation for all our further discussions. We start

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Module 13 Implementing Java EE Web Services with JAX-WS

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

Encapsulating Crosscutting Concerns in System Software

Developing Java Web Services

Java-based web-apps with the Rich Ajax Platform (RAP)

G-Cloud Framework. Service Definition. Oracle Fusion Middleware Design and Implementation

Distributed Objects and Components

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Designing an Enterprise Application Framework for Service-Oriented Architecture 1

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

The Oracle Fusion Development Platform

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

A Beginners Guide to Fusion Middleware

How To Write An Online Shopping Application In Java Ee

Course Name: Course in JSP Course Code: P5

CrownPeak Java Web Hosting. Version 0.20

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

Oracle Identity Analytics Architecture. An Oracle White Paper July 2010

WebObjects Web Applications Programming Guide. (Legacy)

Equinox Framework: A Happier OSGi R6 Implementation

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

Mastering Tomcat Development

Top Weblogic Tasks You can Automate Now

Introduction to OSGi and Modularity. InfoSphere MDM, Version 11.x Dany Drouin, Senior Software Engineer MDM

Learning GlassFish for Tomcat Users

SAP NetWeaver Opens SAP ERP world. Amedeo Prodi SAP Italia

WEB SERVICES. Revised 9/29/2015

Research Article. ISSN (Print) *Corresponding author Lili Wang

Ajax Performance Tuning and Best Practice

IBM InfoSphere MDM Server v9.0. Version: Demo. Page <<1/11>>

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

TIBCO ActiveMatrix BPM SOA Concepts

SOA management challenges. After completing this topic, you should be able to: Explain the challenges of managing an SOA environment

Transcription:

Domain-Driven Web-Development with Tapestry, HiveMind and Hibernate Marcus Schulte

Overview Background: What were we trying to achieve? Why domain-driven? Architecture of the foundation frameworks Putting it all together lifecycle of domainentities Bottom-line: advantages and desiderata

Non-functional Requirements Extra-/Intranet Applications 10 to 1000 users, max 100 concurrent Relatively complex domain compared to typical Web-2.0-app, anyway. Users cherish snappyness. Response-times above 200 ms makes them call for their 3270s

Historical Background Started J2EE 2002 Back then: Struts-based home-brewn web-framework (actioncentric) EJB 1.1 architecture based on Core J2EE patterns by Deepak, Alur, et al. 2005: re-evaluation, run-time behaviour was good but: tired of technical anomalies. Main objective: pure business logic

Becoming X-driven X= model or X=domain? The aim is the same essentially. Continuous abstraction ( the Eiffel way ) UML-Models tend to be either incomplete or not very abstract. Bottom-line: pure Java-domain, no technical slicing of business concerns (PersonEJB, PersonDTO, PersonDAO, PersonDRS,... )

A Band of Frameworks Hibernate the persistence, EJB-3 Tapestry an action is a method Reusable components Java-types make it through the complete request cycle you deal with objects everywhere Very clean & customizable architecture HiveMind the glue to assimilate them all IoC Container The jar is the component, Beans need interfaces

Blueprint

HiveMind Use-Cases Using a library-module, wiring up an application Customising an application or framework by contributing to configuration points overriding services Managing Service-Instances with servicemodels Aside: Spring got Service-models with 2.0, called the scope of a bean there.

Using a HiveMind Library Module

Configuration Points Modules define configuration points Configuration point adhere to schemas Any module can contribute to any configuration point Module A Config-Point X contributes to Module B

Overriding a Service

Service-Models Primitive (simple class-instantiation) Singleton Threaded Pooled Whatever you want, e.g. stateful <service-point id= Xyz > <invoke-factory model= threaded >... </invoke-factory> </service-point>

HiveMind Service-Proxies

Tapestry starts and a form is submitted The App-Servlet instantiates HiveMind Registry request comes in, Servlet calls DirectService target page pulled from pool Service-parameters are decoded, page properties are set up. Form rewind is triggered Form/button listeners are called Response-page renders

Tapestry Components

Tapestry-Components Composite Pattern

Tapestry Component Interfaces

Component Classes Simple Java Classes, extending AbstractComponent. Possibly annotated Contain (usually): Abstract property-accessors implemented by the framework (javassist) at runtime. Listeners Lifecycle-related callbacks Can render their contribution to a page in code or via the associated template (BaseComponent)

A Very Simple Component

The even Simpler Template

Component (Page) Templates <form jwcid="@form"> <ul> <li jwcid="@for" source="ognl: foos value="ognl: foo" element="li"> Name: <input jwcid="@textfield" value="ognl: foo.name" /> <button jwcid="@submit" tag="ognl: foo" selected="ognl: footobedeleted" action="ognl:listeners.ondelete" value="delete"/> </li> </ul> </form>

Page-Class (for previous Template) public abstract class ListOfFoos extends TestAppBasePage { public abstract Foo getfoo(); public abstract Foo getfootobedeleted(); public List<Foo> getfoos() { return getpersistenceservice().retrieveallfoos(); } } public void ondelete() { getpersistenceservice().delete( getfootobedeleted() ); }

Libraries of Components Everything inside one jar (templates, images, css, javascript, classes, messages) Separate namespace Can include HiveMind services/contributions <library-specification> <meta key="org.apache.tapestry.component-class-packages" value="com.javaforge.honeycomb.tapestry"/> <component-type type="exceltablelink" specification-path="excel/exceltablelink.jwc"/> <component-type type="excelicon" specification-path="excel/excelicon.jwc"/> <component-type type="watch" specification-path="components/watch.jwc"/> </library-specification>

Examples for Powerful Components @PropertySelection, @contrib:palette @tacos:tree @contrib:table and @honey:excellink @bmw:resourcelink @bmw:reportview @contrib:beanform (not yet tried myself) Come with HiveMind Engine-Service

Hibernate the not-so-plain POJOs Domain classes can be POJCs But: That doesn't make their instances POJOs. Hibernated Entities grow proxies and lazy collections, associations to the session in which they were loaded (dangling reference, when closed) Think carefully about your session, units-ofwork, working-copy LazyInitializationException and NonUniqueObjectException crop up otherwise

Session per Conversation The life of the first level cache may exceed the life of a request (stateful persistence service) An entities in-memory representation (working copy) must not outlive the session in which it was loaded No need for detach/re-attach and correct merge -mappings See also: Seam and http://hibernate.org/42.html

Plugging into Tapestry

Honeycomb static

Honeycomb dynamic

Experience with HiveMind/Tapestry Excellent reusability of components Pervasive, rich domain model. Great fun for developers Good match for Hibernate (s-p-c) Actively developed, helpful community Docs sometimes incomplete Furiously developed (Tap 5)

Demo & a Duke for Howard