Search This Blog

Monday, March 28, 2011

Common JEE Application Design Patterns

  • Typesafe enum pattern/enum in JDK 1.5+
  • code to an interface not an implementation
  • abstract parent class to promote reuse for subclasses
  • factory method pattern (loose couples calling code from instances created)
  • abstract factory pattern  (specific method for each concrete type)
  • builder pattern (similar to factory except user had more flexibility (builder.add(x), builder.add(y), etc.)
  • strategy pattern (strategy encapsulates algorithms not data)
  • decorator design pattern: (implements same interface as object it decorates)
  • visitor pattern: (avoids lots of typecasts and instanceof to do common method on different types)
  • iterator pattern
  • template method pattern (e.g. Spring JDBC and Spring JMS)
  • composite design pattern: (act on Manager or Staff object in same way. both subs of employee)
  • facade pattern: (interface to large set of classes)
  • observer pattern: (observer registers with publisher, publisher notifies observer of event)
  • command pattern: OO equivalent of callbacks (sender object invokes operation, receiver object  receives request to execute certain operation)
  • proxy pattern: (remote: EJB, RMI, CORBA, virtual: create memory intensive object on demand (lazy load hibernate objects when needed), access: different clients get different access rights)
  • dynamic proxy: (reflection based; come at a performance cost; common in AOP)
  • adapter pattern (wrap API)
  • service activator pattern (ala MessageBean)  services need a way to be activated asynchronously
  • For completion: (bridge, chain of responsibility)
  • For completion JEE (MVC, front controller, composite view, view helper, dispatcher view, service to worker, business delegate, session facade, value object, fast lane reader, service locator)

Sunday, March 27, 2011

Java and General Programming Sites and News Sources

General:
stackoverflow
Refcardz

Java:

Java Community Content on InfoQ
the serverside
refcardz
informit
developerworks
Automation For the People
Java Lobby
Java Developers Journal
(esp. automation for the people)
martin fowler
sdtime
http://java.sys-con.com/, http://java.dzone.com/
Developer.com/java
Java Posse

Java Reference Guide (http://www.informit.com/guides/guide.aspx?g=java)
java almanac, The Register/Software

Automation:

Saturday, March 26, 2011

Java, CI and WS Technology

App Server: JBoss, Glassfish, Geronimo, Tomcat (no EJB), WebLogic (OAS), WebSphere
• SOAP Stack: Axis2, CXF, Metro, JBoss WS, Websphere JAX-WS, WebLogic (OAS) JAX-WS, Spring Web Services
• Specs: JAX-WS (JSR 224), JAX-RS (JSR 311), JAX-RPC, SAAJ (JSR 67), JSR 181 (standardize deploy), JSR 109 (WS inside JEE)
• General Features: Spring Support, Eclipse Plugins, Streaming XML (STaX), Client-side Asynchrony, Server-side Asynchrony, Policy-driven code generation)
• Marshalling: JIXB , JAXB, XMLBean
• Attachments: SAAJ (SOAP w/ attach), MTOM (Msg Transmission Optimization Mech), DIME (binary)
• Encoding: XML, FastInfoSet, JSON
• Transports: HTTP, JMS, XMPP

CI: Jenkins, Hudson, Bamboo, TeamCity, Cruise Control

Build and dependency management: Ant, Ant/Ivy, Maven

Static Analysis: Checkstyle, FindBugs, PMD, PathFinder, JDepend, Coverlipse, Cobertura, Clover, Coverity, Structure 101

Test: JUnit, TestNG, EasyMock, SOAPUI, firebug, surefire (maven), STAF(S/W Tasting Automation Framework), Load test (SLAMD distributed load generation , JMeter)

Documentation: Javadoc, SchemaSpy, UMLGraph

XML/XSD create/edit/XSLT transform: XmlSpy, Liquid

Network Tools: wireshark, winscp, putty, tightVNC, nirsoft network tools, pathsync, synergy, filezilla, VMPlayer

Patterns: Observer, Template, Adapter, Proxy

JMS/EAI/SOA/ESB platforms: WebSphere MQ, Tibco, Vitria, WebMethods, BizTalk, Sonic, Fiorano, Mule ESB, Apache ActiveMQ, Fuse, MSMQ, GlassfishMQ, Camel, RabbitMQ

ORM: Hibernate, iBatis

JSSE Provider: BouncyCastle, AlternativeJSSE, Certicom, IBMJSSEFIPS, SunJSSE

Issue Tracking: ClearQuest, XPlanner, Trac, Bugzilla, Jira, Mylin

IDE: Eclipse, SpringSource ToolSuite, plugins: WTP (Web Tools Platform), DTP (Data Tools Platform), ClearCase, Subclipse, m2eclipse, UML2 Tools SDK

Profiling: JProfiler, JVisualVM, JHat, JConsole, SMAPS

Modeling: UML, OO round trip – Java, DB schema modeling, DDL generation, reverse engineering, eclipse integration, measure architecture violations, complexity debt

Enterprise Patterns: WS-Orchestration, BPEL, WS-Choreography/WSDL 2.0 message Exchange Patterns (see Enterprise Integration Patterns), JAX-WS asynchronicity (polling, callbacks, rendezvous with Future, Continuation Passing Pattern), XMPP, MOM (message oriented middleware), JMS (pub-sub), SOAP over JMS, WS (standard request-response), VMWare messaging via GN3/IOS, Contract First WSDL (e.g. Spring WS)

Websites: stackoverflow, infoq.com/java, the serverside, refcardz, informit, developerworks (esp. automation for the people), martin fowler, sdtimes, http://java.sys-con.com/, http://java.dzone.com/, Java Reference Guide (http://www.informit.com/guides/guide.aspx?g=java), java almanac, http://www.theregister.co.uk/software/

Books: J Dev Almanac, Effective Java, Java PowerTools, Pragmatic (Ship it, Manage it, Pragmatic Program Automation), Clean Code (smells), Refactoring Large S/W Projects, Agile s/w with Spring, Hibernate & Eclipse, Java Enterprise Design Patterns, Pattern Oriented S/W Architecture, Antipatterns, pragmatic programmer, beautiful architecture

Nice super list of tech resources

Technology Resource Links
SOA, Java, cloud, db, GIS, ORM, reporting, security patterns, testing, thought leaders (Eckel, Spolsky)