A cleaner , faster , way to build things

There’s a good article on Devx about Aspects and when to use them in conjunction with Object Orientated design.

I have found them very useful in Java applications for
– Logging
– Security
– Performance Metrics
– Design Enforcements
– Data Persistence

All areas where (a) there needs to be small bits of code , scattered throughout the application and (b) written by a small core team , but respected by the wider group of developers working on the application.

Aspects allow you to separate these concerns into a separate layer , but apply them to the the finished Java Classes to run in standard JVM. Aspects can be turned off or on as required.

Some people see them as akin to Filtering of calls to servlets – you can intercept the call (be it HTTPRequest or a request to a method) and modify it as appropriate.

Needless to say , this is a very powerful technique , but can cause chaos if use incorrectly!

Getting Started with Spring

Red Piranha uses Spring , a J2EE lite framework, for both it’s Presentation Layer (Spring MVC instead of an alternative like Struts) and for it’s mid tier.

I describe it as J2EE lite , as while it gives you most of the advantages of an EJB Server , it is a lot easier to deploy. It is also more flexible , allowing you to run your code in J2SE , then move to J2EE (either a Web Server like Tomcat , or a full application Server like JBoss , Weblogic or Websphere) when you are ready.

The article on how to get started with Spring is at: http://www.springframework.org/docs/MVC-step-by-step/Spring-MVC-step-by-step.html