Thursday, October 22, 2009

J2EE Integration and Messaging

work in progress

CharacteristicWeb ServicesJMSJCA
sync vs. asyncsyncasync
security/encryptionyes, WS-Securityyes
transactionsyesyesyes
reliability (guaranteed delivery)yesyes
batch
systems use same technologyjava-non javajava-javajava-legacy/EIS

GoF Design Patterns

work in progress

NameDescription
Creational Patterns (AbFacBuildFacProSingle)
Abstract Factoryinterface for creating family of related/dependent objects without specifying concrete classes
Builderseparates construction from representation; same construction process can create different objects
Factory Methodinterface for creating an object; lets subclasses decide which class to instantiate
Prototype
Singletoncontrols access to finite number of instances
Structural Patterns (AdBriComDecFaFlyProx)
Adapterconvert one interface to one the client expects
Bridgefunctional abstraction -> internal implementation
Compositehierarchical tree structures with elements of varying complexity but a uniform interface
Decoratoradd or remove functionality without changing external appearance
Facadeunifying interface on top of a group of interfaces/components of a subsystem
Flyweightsharing/reusing objects
Proxysurrogate controls access to real object
Behavioral Patterns (ChainComIntItMedMemObStateStratTempVis or C2I2M2-OSS-TV)
Chain of Responsibilitymessage handled where it is first received or directed on to another object for handling
Command
Interpreter
Iteratorsequentially access items in a collection that is separate from the underlying collection
Mediatorobject that manages message distribution among other objects
Mementorepresents snapshot of object's state
Observerbroadcast messages to interested listeners
Stateobject alters behavior when internal state changes
Strategygroup of classes that represent a set of possible behaviors
Template Method
Visitorthink of using the enhanced for to iterate over a list in java and perform some operation on that list
underlined patterns are ones I have personally used

J2EE Persistence Strategies

This is a summary of the J2EE persistence strategies that a Sun Certified Enterprise Architect should be familiar with (use scrollbars at bottom to view entire table):

StrategyEase of DevelopmentPerformanceScalabilityExtensibilitySecurityStrategy
CMPrelatively simple; preferred over BMPcontainer dependentEJB container dependent *avaries by implementationEJB providedCMP
BMPmore involvedvery efficient w/control over SQLEJB container dependent *avaries by implementationEJB providedBMP
JDOsimplepossibly some performance penaltydeveloper managedvaries by implementationdeveloper managedJDO
JPAthe simplestpossibly some performance penaltyEJB container dependent *avaries by implementationEJB providedJPA
ORM/DAOssimplepossibly some performance penaltydeveloper managedvaries by implementationdeveloper managedORM/DAOs
JDBCmost time-consuming and involvedtheoretical best performancedeveloper managedvaries by implementationdeveloper managedJDBC
iBatis/DAOsomewhere between ORM and JDBCexcellent performancedeveloper managedvaries by implementationdeveloper managediBatis/DAO
*a = stateless session beans more scalable than stateful

not covered by SCEA exam

Spring can help level the playing field outside EJB in some of the above developer managed areas by helping with transactioning, scalability and security.