Friday, June 13, 2008

Aspects: Exploring possibilities

Happy days are here again, my current tasks at hand gives me immense opportunities to dream about a better world where the End-Users (subjective) will have a better software product and developers have better work-life balance.

I read somewhere, you must not learn a new language unless that exposes you to a new way of thinking.

During my recent adventures with AspectJ, I could identify new techniques to address 'seperation of concerns'. Not only this would provide new ways to create reusable modules but also extend them independent of each other, without really bugged by the 'over-engineering-syndrome'. I'm reading AspectJ in Action: Ramnivas Laddad and it provides a real good head start to the subject.

Lest I forget, I would like to document some of my thoughts where AOP techniques can be roped in with other available ones to simplify problem solving for us developers;
  • Rules, for example working with presentation layer often we need to provide localization and personalization of content based upon the user context information, often this spans horizontally across multiple code units. Such rules can be externalized and consumed by the core modules using a rule engine(JBoss Rules, Jess etc.). Such an approach would help creating a modularized solution which is deemed to be agile to future policy changes while ensuring consistency across the e-commerce application.
  • Annotations, can be utilized to generate codes (using XDoclet etc.) for common technical services across the software product based upon architectural decisions. This way architectural decisions do not remain a dead piece of documents. Frequently, annotations can be used to provide services like authentication, security, tracing, ensuring pre/post-conditions etc.
  • Using Reflective APIs reusable aspects could be created for the complete spectrum.
But, most importantly, I need to keep it all simple at this point of time while solving my current performance engineering problems.

No comments: