Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
The Challenges of CORBA Security It is important to understand that [CORBAsecurity] is only a (powerful) security toolbox and not the solution to all security.
Observer Method 1. References Gamma Erich, Helm Richard, “Design Patterns: Elements of Reusable Object- Oriented Software” 2.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Technical Architectures
1 IBM SanFrancisco Product Evaluation Negotiated Option Presentation By Les Beckford May 2001.
Enterprise Java Beans Welcome to the world of “Distributed System” Presented By: Sameer Nanda Date: 12/17/03.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
.NET Mobile Application Development Remote Procedure Call.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
UNIT-V The MVC architecture and Struts Framework.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
EJB Fundamentals Celsina Bignoli
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
1 Session Bean Chuyên đề Lập trình Java & J2EE Chương 14 Biên soạn: Th.S Nguyễn văn Lành.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
CGW 2003 Institute of Computer Science AGH Proposal of Adaptation of Legacy C/C++ Software to Grid Services Bartosz Baliś, Marian Bubak, Michał Węgiel,
Tiny Components – a collection of initial ideas copyright © 2003 Tiny Components Tiny Components A Component Model for Small, Embedded or Mobile devices.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Component frameworks Roy Kensmil. Historical trens in software development. ABSTRACT INTERACTIONS COMPONENT BUS COMPONENT GLUE THIRD-PARTY BINDING.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
Architectural pattern: Interceptor Source: POSA II pp 109 – 140POSA II Environment: developing frameworks that can be extended transparently Recurring.
1 UNIT –II Architecting Web Service. 2 Why SOA? – business point of view  Information Technology (IT) workers face many challenges, including: Limited.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
08 - StructuralCSC4071 Structural Patterns concerned with how classes and objects are composed to form larger structures –Adapter interface converter Bridge.
Structural Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Session Beans Based on: Patel, Brose, Silverman, Mastering Enterprise JavaBeans 3.0.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
1 Distributed Systems Distributed Object-Based Systems Chapter 10.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Middleware Technology (J2EE/EJB) EJB Fundamentals.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Copyright © 2004, Keith D Swenson, All Rights Reserved. OASIS Asynchronous Service Access Protocol (ASAP) Tutorial Overview, OASIS ASAP TC May 4, 2004.
EJB Enterprise Java Beans JAVA Enterprise Edition
Procedure Definitions and Semantics Procedures support control abstraction in programming languages. In most programming languages, a procedure is defined.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
A service Oriented Architecture & Web Service Technology.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Callbacks and Interceptors. Contents  Session Beans Life Cycle  Interceptors.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
EJB (Enterprise Java Beans)
Distribution and components
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Inventory of Distributed Computing Concepts
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Component-based Applications
Design Yaodong Bi.
Presentation transcript:

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus Völter MATHEMA AG

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Roadmap  Patterns and Pattern Languages  Basic Principles  Core Patterns Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Patterns and Pattern Languages

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Form of the patterns here  Alexandrian Form  Pattern consists of  Name  Context  Problem  Body  Solution  Resulting Context  Examples Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Basic Principles

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Separation of Concerns  Problem:  Technology is changing fast.  Your business is changing fast.  The changes happen at different speeds.  Solution:  Separate functional and technical concerns  Implement them separately using different software artifacts.  Reuse and evolve each of them separately Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Multitier Architecture  Problem:  Enterprise applications should be scalable  They must be simple to deploy  Different user interfaces are required  The data should be stored centrally  Solution:  Split the application system into several layers  Allow remote access to each of these layers  Introduce a specific layer for the business logic Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Core Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component  Context:  You have Separated Concerns. Functional part is “one chunk”.  Problem:  Your business (requirements) is changing quickly.  Need reuse on enterprise level, i.e. on high granularity level  Want to evolve the parts of your system(s) independently  Solution:  Decompose your application into several components  They do not directly depend on other components  An application consists of loosely coupled components Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Interface  Context:  You Decomposed functional requirements into Components. Now: “reassemble” app by letting components collaborate.  Problem:  Components should not depend on other components’ implementations  You do not even want to know how another component is implemented  Solution:  Define public interface to the component  Client accesses a Component using the interface only  Accessing this interface should be standardized Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Interface Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Container  Context:  You have decided to Separate Concerns.  Problem:  Components contain functional logic  Now you need something for the technical parts  Need to recombine functional and technical requirements into a complete application.  Solution:  Create a container for the Components.  Responsible to enforce technical requirements on the components  Uses standardized frameworks and other techniques such as code generation. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Container Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Bus  Context  You have a Container to host your Components.  Problem  Containers (and therefore, your components) usually reside on different machines that your client application  You don’t want to depend on the semantics of the underlying transport protocol.  Solution  Component bus, as logical communication infrastructure  Hide the underlying low-level transport protocol  The Container and the clients are attached to the bus. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Bus Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Distinguish Identities  Context  Your design results in potentially many logical component identities, especially when you use Entity Components.  Problem  Many logical component instances referenced by clients at the same time  Container will run into resource problems  Solution  Distinguish logical and physical identities  Clients never have a reference to the physical component instance, they use a Proxy  Container is free to assign physical instances to logical identities Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Distinguish Identities Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Lifecycle Callback  Context  Your Components live in a Container and you Distinguish Identities.  Problem  Physical component it has to change its logical identity  Component will have to be initialized after birth and it needs to return its resources before it dies  Solution  Provide a set of lifecycle callback operations.  The Container calls them whenever it feels it is necessary. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Client Library  Context  You are using a Component Bus to access your Components in the Container.  Problem  The client application needs to access the Component Bus  Needs to know the interfaces of the components  Every method invocation must contain security and other information  Specific marshalling code may also be necessary  Solution  Create a client library upon Component Installation  Contains all the interfaces, and other generated code Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG C O L L A B O R A T I O N Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Home  Context  Your application is assembled of collaborating, loosely coupled components, i.e. one Component uses the services of another Component.  Problem  A Component needs to find (or create new) instances of other Components  You might not know the exact procedure to do this  Technical concern: Don’t want that in component code  Solution  For each Component, provide a management interface  It can provide different ways (operations) how to create and find component instances Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Home Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Naming  Context  You have provided a Component Home for your components to manage the instances of a specific component type. You are using Managed Resources in the Container.  Problem  To access the Component Home or Managed Resources, you need to get the reference of the home or of the service.  Solution  Provide a naming service which maps names to object references  Can be used uniformly for any kind of object/component/resource  It can be accessed by clients using a well-known object reference. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Naming Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG C O L L A B O R A T I O N Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Annotations  Context  You have implemented a Container. Programmer programs functional aspects only.  Problem  Programmers will need a way to control the behavior of the components in the Container  You need a way to tell the Container how it should handle certain aspects  Solution  Allow the developer to annotate the components  The Container is free to implement the Annotations  Uses standardized frameworks and other techniques such as code generation. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Installation  Context  You express your technical requirements regarding a Component using Annotations and the Container provides a way to implement these.  Problem  Annotations state technical concerns declaratively  Code required to realize these at runtime  Consistency has to be checked in advance  Solution  Include an explicit installation step for Components  Provide your Component’s code and the Annotations to the Container, Container creates necessary code Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Interception  Context  You have created a Container which serves as a place to live for the Components. You use Annotations to tell the Container how it should handle a Component. You use the concept of Distinguishing Identities.  Problem  Container has to implement the behaviour specified in the Annotations  How can a Container insert specific code into prebuilt Components  Solution  Allow the Container to intercept any request before it reaches the destination Component  Provide a standardized interface for interceptors. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Context  Context  Your application is decomposed into Components which are executed in a Container.  Problem  Components need to access resources outside of itself (in the Container).  Need to control some aspects of the Container (e.g. Tx state)  Solution  Supply each component instance with a Component Context at the beginning of its lifecycle  Context provides operations, with which the Component can access the environment Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Context Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Managed Resource  Context  You run your Components in a Container, and they can access parts of the world outside using a Component Context.  Problem  Components will need to access several external resources  You do not know, how many physical component instances you will have  You do not want to limit the portability of your components by depending on the type or location of a specific resource  Solution  Let the Container manage resources  It creates pools for every configured resource  Access Managed Resources in Naming using logical names only  Let the Container do the mapping to real Naming name Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Invocation Context  Context  You are using a Container to take care of the technical requirements. Among other things, the Container’s job to manage transactions and security.  Problem  Container needs to know more than just the name of the invoked method and the arguments when an operation is called  This cannot be supplied with a normal method call  Solution  Include an invocation context with each operation  It can be inserted or created by using Interception  The context can include any kind of information, only the Container must know how to handle it Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Instance Pooling  Context  You run your Components in a Container. You Distinguish Identities and provide Lifecycle Callbacks operations in your Component.  Problem  Physical instance creation in the Container is expensive.  It is therefore useful to minimize the number of creations and destructions  especially in the case of Entity Components  Solution  Use instance pooling together with Lifecycle Callbacks  Keep a number of component instances ready  Let them “become” different logical instances at different times. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Passivation  Context  You run your Components in a Container. You Distinguish Identities and provide Lifecycle Callbacks operations in your Component.  Problem  Session Components need to be accessible as long as a client does not destroy them  They might not be used for a very long time in between invocations  Solution  Allow the Container to remove unused Component instances temporarily from memory  Attributes are stored persistently and are reloaded upon reactivation. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Configuration Parameters  Context  You want to reuse your Components. To achieve reuse, you need a certain degree of variability in your Component implementation.  Problem  you need a way to “pass (configuration) information to the Component”  This information must be accessible from within the Component  Solution  The Component Context should allow the Component to access configuration parameters  defined for the Component during Component Installation. Component Patterns

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Server Component Patterns Architecture and Applications with EJB Markus Völter Alexander Schmid Eberhard Wolff Wiley Pattern Series Frühjahr 2002

Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Thank you... Questions, Critics ? Component Patterns