Apr 23

…is a valid option to write a full software entreprise stack?

Even if JBoss is not listed in my CV, I had recently a looked at it to check its capabilities as of environemtn for a full software entreprise stack (I may update my CV now even if we do not use it…but I made some prototyping with it and have a clear view of its capabilities).

First, what we need?

  • container for decoupled applications
  • persistance
  • UI (web 2.0 would be a plus)
  • engines as workflow and scripting
  • scallable
  • …and more

Back to some fundamentals…

I had AOP

AOP that SoC ?

Beyond AOP…

I had a AOP

Their are 2 ortogonal (I like orthogonality :-) ) concpets: OOP and AOP.

OOP (Object Oriented Programing) is a software technic which is based on the concept of object (attributs and methodes) and inheritency (a car is a vehicul which is a tranportation mode…etc).

AOP (Aspect Oriented Programing) is a software technic ortogonal to OOP which help in “doing repetitive stuff” amongs objects in a simple manner as for example: logging, security, transaction management…etc (always the same examples).

In our case, the AOP is the entry point to get more…

AOP that SoC ?

AOP can also be used to do SoC (that I like too). SoC is Seperation Of Concern. The idea is to deintroduce decoupling between layers and services of the application stack. The trend is to use AOP as a support to do SoC.

Beyond AOP…

AOP as support to do decoupling…

  • some says IoC (Invertion of Control) … technical detail
  • some says DI (Dependency Injection) … I hate this wording
  • through a Service locator … Yes that’s it !

A service locator allows you to access services (transversal as logging, or not as an application) without bothering with wirering (managing dependencies) and creation (resolution).

You just request a specific service to your AOP system.

Back to jBoss…

So what jBoss is proposing?

  • Application Container: jBoss AS
  • Service Locator : jBoss IoC + ejb
  • Web UI : jBoss Seam (+ ajax4Jsf or RichFaces or IcesFaces for the Web 2.0)
  • Workflow engine: jBoss Seam + jBoss jBPM
  • Scripting engine: jBoss Seam + groovy
  • Rule engine: jBoss Seam + drool
  • Wizard engine: jBoss Seam conversation context
  • Persistance: jBoss + JPA + hibernate

It’s preatty amazing how jBoss is exhaustive. I may miss some important features … but that’s a good start.

Dec 10

Fredrik has written a nice post on AOP : Remove code smell with AOP.

I’m personnaly not a fan of AOP. Sure, it can be extremely useful in some areas…exactly as is describing Fredrik. The only concern I have, is that AOP pros are always using the same argument: it’s useful for log, security, authentication…etc. I fully agree: AOP is useful for transversal services and ensure a better separation of concern…but I do not think AOP is more useful than this.

I’ve seen recently another case of usage of AOP. We are looking at adding unit test for a web application using mock. The problem is in this kind of code:
[java]
public List getFirst(int count)
{
  Context context = JsfContext.getInstance() …
[java]
Mocking works well if you inject interface, but in our case we have to deal with the singleton’s hell.

In this case AOP can provide an answer even if can only be temporary has this kind of design is not fine for me (singleton vs DI).