I won a pass to the show at a recent NEJUG meeting. Jay Zimmerman of No Fluff Just Stuff, which ran the show, donated the pass to the JUG. My employer, CentrePath, kindly paid my travel expenses.
The show was run by No Fluff Just Stuff. Based on my experience at this show, I would recommend that anyone who wants to spend a few days really learning technology should attend a No Fluff session.
Here are my fairly raw notes.
2005-12-07: Spring Experience day 1
Airport
My flight arrived at MIA a little early. The pilot announced that we would be delayed getting to the gate because of a "security incident." My phone rang--it was my wife calling to tell me about the a little problem that was currently being played out. Here's my own low quality photo, taken with my PDA from my seat on my plane as it drove by on the way to our new gate:
Dinner
- SourceBeat.com-good Spring blogs
Founder of Spring & Interface 21
Says lots of clients in banking, government, defense-thus it has been proven
Goal: simplify enterprise software development
Non-invasive framework
J2EE w-o EJB
2.0M1 released
simpler more extensible XML config
enhanced integration w- AspectJuse AspectJ pointcut expression lang w- Spring AOP
CommonJ TimerManager for scheduled tasks
msg driven POJOs
et al
Things they got right
POJO model
simplify w-o sacrificing power
Apache license
Nice demo of XML code completion in Idea
Non-invasive POJO programming model-framework doesn't overtakn your app code-framework can change (eg Spring 2.0) but your code still works
Demo: JPetStore on Spring 2.0M1, w- no changes from app on prev Spring release
2.0 final-March 2006
Spring Fundamentals: Rod Johnson
Aims
POJOs
Enterprise services in a declarative, non-invasive way
eg: POJOs transactional w-out transactional APIs
POJO dev
not subject to unusual contracts, eg EJB 1 or 2 home inrerface, etc.
not bound to any environment
testable
Apply services to POJOs declaritively
decouple app from environment-enables reuse
Enabling tech
IoC/DI-inversion of control/dependency injecton
AOP
portable service abstractions
Lightweignt container
facilitates POJO-based app dev at all tiers
within any env
Sophisticated object factory
your biz obj's+config metadata+spring->fully config'd POJO
Enablers
component=POJO
testable in isolation
minimal depend's->easily mocked
Bene's
portability
leverage: decoupled from infrastructure
AOP
modularizes behavior that would otherwise be scattered over diff methods
Modules
Java/J2EE support lib's focused on ease of use, w-o sacrificing power
data access abstraction
transaction mgmt abstraction
remoting: RMI, IIOP, Axis, etc.
JMX support: expose any POJO for mgmt
JMS support: msg driven POJOs in 2.0
DI facilitates unit testing-org.springframework.test
MVC web framework
IOC/DI
Scoping
2.0
per session, request, or arbitrary
testable because no need to access APIs, eg HTTPSession
;
Scripting support
bean can be impl'd in script lang, eg Groovy
hot reload
AOP
Template pattern
Form of IoC
moves control into framework
solves common prob's: resource acq/release, exc translation, etc.
Avoids TCFTC: try/catch/finally{try/catch}
Common exception hierarchy-exceptions are non-checked, so code is easier to write
Work w- Spring
program to interfaces
focus on domain obj's
Avoid
pull configuration
Singleton pattern
dependence on Spring APIs
writing pointless code, eg JNDI lookups
J2EE != EJB
My Q: Is it aadvisable to use a traditional container such as JBoss? his A: Don't use JBoss for msg beans-use ActiveMQ
(see slides)
About using JDBC templates when OR mapping is too slow
RowMappper.mapRow()-a way to define how obj's are instantiated from ResultSets
LobHandler-portable Large Obj Binary stuff
Named parameters are much easier to read & maintain than ?s
Anemic domain obj's
not solved in 2.0 because it's hard to DI obj's that aren't instantiated by Spring, eg new or OR)
Aspects can help
Recommend not overusing annotations
keep config external
annotations force class-scope control; you lose instance-scope control
Rails
a lang
convention is more important than configuration
Recommendation: start a blog, use Roller (Here it is, Matt!)
(See slides)
Selenium-a web app test tool that invokes and runs in your browser-thoughtworks.com
Hibernate: new users use XDoclet to gen .hbm.xml files
Dumbster-eg, fake SMTP server for unit tests
There's an Eclipse plugin that autogen's equals, hashcode, & toString
Use spring-mock
Use DBUnit to establish & reset data for unit tests
Use EasyMock
(see slides)
Java 5 VM param to start JMX: -Dcom.son.management.javaremote
Java 5 VM includes JConsole (J2SE 5.0 Monitoring & Management Console)
Use aspects to separate instrumentation from real code, then expose it through JMX
MC4J: an alternate open source mgmt console
Hibernate can be exposed as nice set of mgmt stuff
HP OpenView is a JMX client
Spring's Architecture-Juergen Hoeller
J2EE app framework
Not monolithic-loosely coupled subsystems
Or think of Spring as a library
Nature
Broad but thin
complementing prod's are specific and deep, eg OR tools, distributed transaction coordinators, web service engines, J2EE servers
Easier to update your app w- Spring as a llb, than to update your J2EE container, which is system software
SpringStatelessSessionBeanFactory-to get SLSBs w-o, eg, JBoss
Use 1 Spring config file per module
FreeMarker: like JSP, but easier & better
Mesh is good for applying CSS
Recommend JAXB for XML->DB, with Java biz obj's as the translation layer
Clustering for scalability
Hibernate+
SFSBs don't scale well
SLSBs, MsgBeans scale well
use Cisco load balancer HW
Fortune 500 co's want to move away from big fat containers. Eg, BEA is supporting Spring because their big cust's demand lt.
If an annotation makes sense in the domain's context, it's OK. If it specifies some binding to a framework or environment, it's bad.
I chatted w- Rod Johnson, inventor of Spring
I had lunch w- Craig Walls, author of Spring in Action
I met Mike Clark, potential employee (Mike, if you see this, look me up. I lost your email address.)
I drank beer with Chris Richardson, author of upcoming book POJOs in Action. He described a successful project w- goals similar to ours: gradually replace a prod's infrastructure w- Spring-based J2EE.
Enterprise Integration: Using JMX and JCA: Juergen Hoeller
(see slides)
Use transactions to define delivery behavior. Eg, if send fails w-in transaction, transaction rolls back and acts as if transaction never occurred.
(see slides)
EAI=enterprise architecture integration
His demo uses Jencks as interface to ActiveMQ
Demo2 uses Lingo for true POJO msg queueing. Lingo: a way of exposing msg-based services as if they were local method calls. A CodeHaus project.
ESB=enterprise service bus
SEDA=staged event driven architecture, eg, there is a queue
JBI=Java Business Integration
BPEL="bee-pull"
PXE="pixie"
Craig: leaving his employer on Mon. Has telecom background. Looking for work?
Examples source code: www.habuma.com/SOS.zip
The breaks were harsh. I got a chance to walk through the hotel's pool area to take a look at the pools I didn't have time to use (more low quality PDA camera shots):


Just past the pool area, I had the opportunity to enjoy the view of the beach I didn't have time to use:
Expert panel
Spring & web services: Alef Arendsen
(see slides)
Spring-WS looks like a valid way to do WS.
(see slides)
Not really Sprng-focused on EJB3
JPA=Java Persistence API, a JSR for POJO persistence
Dali: Eclipse plugin that helps you build OR mapping file
- Mraible@virtuas.com: free book after 6:00am tomorrow
Keynote: Adrian Colyer
- Aspects define rules & policies
- independent of the problem domain, so don't encode directly in domain model (separation of concerns)
Point cut=defines where the annotation applies
can be used to enforce code standards, eg only use Spring to access JDBC-desigh level assertions
(my example: add time measurement instrumentation to specified methods, or add temporary debug tracing)
(like advice in Lisp-Defadvice (but instead of hardcoded function name, jou define a pointcut)
Based on CLOS metadata
(see slides)
Parameters
34m tax payers, 3 yrs of history
25k transactions/h
25k digital sig's/h
40k fiscal account consultations/h
<1s>
All FOS exept Oracle
- JBoss-only for MDBs, which were used only for logging-wouldn't need JBoss at all now w- Spring msg POJOs
- Problems and goals soond very similar to those of Mag
- DBUnit-helps test w-o real DB back end (?)
- ONE JVM-and all that performance & scalability

0 comments:
Post a Comment