Friday, February 6, 2009

I will be speaking at ITARC Architect Conference

I will be speaking at the upcoming IT Architect Regional Conference in Atlanta later this month. My presentation is in the Enterprise Architecture track of the conference schedule.

Topic:
Architecture Enforcement and Governance Using Aspects and SonarJ

Abstract:
In this presentation, I will talk about the significance of enforcing the architecture rules and standards and how to actually enforce them in software development projects. Architecture governance ensures that the Implementation (Code) does match the Requirements (Reference Architecture). It can help with clear and cycle free dependency structures as well as improve testability and reusability of code.

Enforcing Reference Architecture guidelines promotes consistency and modularity in the System. It also helps in detecting structural complexity and preventing it earlier in the software development process. As a result, the application code is modifiable, portable, and testable.

Most of the presentation will focus on using Aspects and AOP techniques to define architecture rules and use them for policy-enforcement in Java applications. I will briefly discuss how tools like SonarJ and Structure 101 can help the architects integrate architecture analysis and management earlier in the development process.

The session will include several demo's of how to enforce the architecture rules using frameworks like AspectJ and SpringAOP.

Check out more details of the ITARC conference, event schedule and my presentation. Let me know if you live in Atlanta area and if you are going to be attending the conference.

Greg Young on Domain-Driven Design

At QCon San Francisco 2008 conference last year, I interviewed Greg Young on Domain-Driven Design (DDD) topic. His team has been using DDD concepts in their projects. In the interview, Greg discussed how to manage domain state transitions in a DDD project using two different design models, one for reading data from data store and the other for write-only command operations. He also talked about Command Query Separation (CQS) design concept to keep design cleaner and easier to test and maintain and the best practices that developers can use when working on DDD projects.

Check out the interview on InfoQ.

Sunday, February 1, 2009

JavaRebel - nice tool to help with J2EE App hot-deployments

Recently, I got a license of JavaRebel software created by ZeroTurnaround development group. This tool uses a custom Java classloader to hot-deploy the code changes made in a single Java class in the web applications to override the servlet container (JBoss or Tomcat) default WAR deploy behavior (which redeploys the whole web application context).

This tool helps the Java developers be more productive with the time they can save because of the less time required to load the class changes into JVM without having to deploy the whole web application every time a change is made in a single class.

Using the tool is pretty straight-forward. You will have to start the container (whether it's JBoss, Tomcat or any other J2EE container) using the "-javaagent" option and specify the folder(s) where JavaRebel should look for Java class changes in the web applications deployed in the container.

But, remember that even though JavaRebel helps boost the productivity with faster deployments of web application contexts, you should still design your applications to be more unit-testing friendly and be able to test most of the code in the application using the unit testing frameworks like JUnit4 or TestNG, outside the container. You should depend on the container only for those infrastructure concerns (like in-container Database Connection Pool, JTA Transactions, JMS Message Queues and Topics) that need the application to be deployed inside the container. Even in most of these cases, you can use the embedded broker version of ActiveMQ container to unit test the JMS resources outside the container.

If you are using JBoss or Tomcat or other application server and you are maintaining a legacy J2EE application that's not easy to unit test and requires the application to be deployed in the container for even simple code changes, you should check out JavaRebel tool. Similar to tools like IntelliJ IDEA, it is worth the price. The benefits it offers far out-weigh the cost.

I hope SpringSource or JBoss will soon acquire ZeroTurnaround to integrate JavaRebel into Tomcat or JBoss containers respectively. JavaRebel is such an useful tool it only makes sense to see it integrated with these popular J2EE containers and not as a separate product.