Saturday, December 12, 2009

Java EE 6 Features: Dependency Injection, Bean Validation and EJB Enhancements

Java EE 6 was released on Thursday this week. I wrote about it on InfoQ website. The latest release is major in terms of breadth and depth of the new features included in the release.

Some of the main features in JEE6 include:

  • Dependency Injection
  • Bean Validation
  • EJB Enhancements
  • Servlet, JSF, and JSP Enhancements
Check out more details on the new release here.

Sunday, September 6, 2009

Menlo Tour - How Agile Software Development is Done at Menlo

Last month, I visited a software consulting company called Menlo Innovations located in Ann Arbor, Michigan. Menlo has been using Agile methodologies in their Software Development processes for last eight years. Menlo hosts the tours every month at their company office to show the visitors how they do agile software development.

James Goebel was our host at the meeting. It was a very good experience to see a team of teams doing the agile software development and how they have perfected an unique development process that works for them to be successful in their software development projects.

They use several eXtreme Programming (XP) development and testing techniques.

Here are some high-level details of their agile process:

  • Iteration Length = 1 week
  • High-Tech Anthropologists (HTA's) write the user stories working with the client and the project team. They write the stories through the eyes of the customers. User designs are also done by HTA's.
  • They use big white papers, charts, and tasks with color coded statuses to make the project progress visible to every one in the team w/o having to dig into several different project management software tools.
  • Their projects range from 1-day to 4-years in length and all different business domains in nature.
  • The Daily stand-up meeting is at 10 am every morning and every one in the building (all project teams, HTA's, QA team, clients, vendors if they happen to be in the office at that time) attend the meeting.
  • They review the story cards every day to monitor the progress and identify any roadblocks to complete their tasks. They follow the strict rule of, if there is no card on the board for a specific task, the project team must not work on that task. So, "No Card, No Work, No Money".
  • Their revenue model is based on the royalty and partnership based (on some projects) so they take the quality, customer satisfaction, and long-term health of their software products very seriously.
  • If a pair has to stop a particular task because of some dependencies or roadblocks, they put a red dot on that task indicating that the work has been stopped on that task, and start the work on a new task (with yellow dot on it showing that it's in progress).
Fail Fast:
They believe in the concept of make small mistakes faster and often. James gave us an example of how they managed a previous project in an iterative manner to successfully deliver what the customer needed out of the project. It was a small project with 1-day deadline. The first time they worked on the project, they worked on for the whole day and didn't finish it on time. Then they worked on the same project again in 1-day with great success, the only difference is this time they followed a eight 1-hour iterations rather than one 8-hr iteration. And on the second day, after 2 hours into the project, they found where they got stuck the previous time, and made the necessary adjustment (following the "Inspect and Adapt" philosophy we hear in the context of the Agile project management)

Color coded status tracking:
They use a color coding system to track the status of project tasks.
  • Red = Task Stopped
  • Yellow = In Progress
  • Green = Completed
Projects don't move, people do:
They have dedicated areas (basically a corner of one big office room) for each project where the project tasks, information reports and charts are displayed on the wall. Since the project status reports and other artifacts in a specific area, it's the team members who move to the project area when they need to work on a project, rather than the other way around.

Pair Programming:
Change the partners every week so the pairs don't get used to each other's poor development practices (for example, not writing unit tests).

Test Driven Development:
They religiously follow Test Driven Design/Development (TDD) philosophy.

Build is Broken - Uncommit Your Code:
If someone's code caused a unit test or the whole application build to fail after code check-in, the team has to either fix the build errors in a reasonable time or "Uncommit" the new code so the build will succeed and the other developers can move forward with testing their features on the Integration server.

Time Estimates:
Every one in the project team estimate all the tasks and the project lead uses the most common estimates (by taking away the lowest and highest time estimates). The time estimates range from 2 hours to 1 week (i.e. 2, 4, 8, 16, and 32 hours). If a task is estimated to be higher than 32 hours (e.g. 64 hours), those features have to be split into smaller tasks so they can fit in a single iteration.

They also use different sizes of the paper for tasks with different estimates, so they know how many tasks can fit in an iteration. For example, they use 8.5 x 11 paper size as the 32 hours. And the team can only have use one 8.5 x 11 sheet to fit the tasks for one iteration, meaning they can put one 32-hour tasks, or two 16-hour tasks, or one 16-hour and two 8-hour tasks, you get the point. This approach sounds very interesting and it works great if you think about it.

Every thing (estimations, development, unit testing, show & tell, and the delivery of CD) happens every week.

Show and Tell: For Customer, By Customer:
At the end of each iteration the project team creates two CD's of the working software and gives one CD to the QA team and another to the client. The QA team's job is to verify the health of the overall software package, not just test each feature in isolation.

And when it's the time to demonstrate the software created in an iteration, the team works with the client to install the software on the client's PC and let the customer show (demonstrate) the software product to the team.

They don't really use any software tools for the project management purposes. Other than Microsoft Excel to keep track of the time spent on tasks and the project, every thing else is done on a piece of paper. It was amazing to see how they are able to be agile without really using a tool for writing user stories and other tasks. This is the proof that the agile development teams should focus on the results and not the tools.

Other Observations:
Their software development process is created around the social constructs of the team. For the new prospective team members, they look for the ability to learn and team player skills.

James said that we should ask the following question to ensure that what we are working is going to add value to our company goals:

"How does your job impact the bottom line of your company?"

They have been following the mantra: "Continue doing what works & Stop doing what doesn't work".

If I have to pick two things that Menlo teams seem to be following, they would be: "Team Collaboration" and "Collective Discipline".

James was an excellent host of the tour and he is also a great speaker. I learned a lot about how Agile Development Process works @ Menlo and apply some of the ideas in my projects.

Like said, it was a very good learning experience for me to be part of the tour and I encourage every one who lives in the southeast Michigan area to sign-up for the next tour which is actually the coming Wednesday.

Saturday, September 5, 2009

Role of Code Generation in Java Application Development

I recently wrote an article on InfoQ about the role of code generation in Java application development. There have been different tool vendors (Spring Roo, Skyway Builder Community Edition, and Blu Age's M2Spring) announcing Code Generation tools in the recent months, so I thought I would write a tool round-up type of article summarizing these tools.

Check out this Q&A article on InfoQ:

Sunday, August 2, 2009

JEE Web Development Framework Requirements Revisited

There is an excellent blog post on choosing a web development framework/toolkit by Ilya Sterin. It captures very well most of the web app framework requirements and limitations we all face on a daily basis in our projects.

As mentioned in the write-up, most of the J2EE developers think, at one time or the other, about what features they really need from a web application framework and why there is no single framework that supports all those features.

If I have to pick top 5 features I look for in an ideal web application framework, they would be:

  1. Isolation from the domain layer so presentation and domain layers can evolve independently w/o (adversely) impacting each other.
  2. Simple and Easy Data binding between the Domain, Controller, and Presentation layers, so the developers don't have to write unnecessary and useless boiler plate code to convert the same data from a DO -> DTO -> Struts Action Form -> JSP/HMTL field to just select some data from a back-end data store anddisplay it on a web page.
  3. Support for data validation that works in all the layers w/o any additional coding.
  4. Support for AJAX functionality.
  5. Controller class methods can be exposed as RESTful Web Services w/o lot of extra coding or configuration.

The presentation layer classes should also be unit testable w/o having to deploy the web application into a container.

Ilya talks about the persistence concern as well. Unless the web application in question is a simple data driven application that can use a solution like RoR or Grails, I am not sure if persistence is really a concern from the web application side. In an ideal architecture, presentation layer should never access the persistence layer directly. It should always go thru the domain layer for the retrieval and modification of the data stored in the back-end data store. So, if the domain model and its boundaries are well defined and implemented, I don't worry too much about the persistence concern when I look for a web application framework.

I have been using Spring MVC in the recent projects. It supports all the items listed above except for the AJAX support. But I read that Spring WebFlow framework (which includes Spring JavaScript and integration with Dojo) has AJAX support, so that's good news for the developers who are using Spring.

I am also eagerly waiting to start using Spring 3 framework which makes it even easier to expose controller class methods as REST web services and also has Expression Language (EL) support which is another nice feature to have when working in the MVC part of an enterprise application.

Sunday, July 5, 2009

Architecture Enforcement and Governance Using Aspect-Oriented Programming

I wrote an article in this month's NFJS magazine (June 2009 issue) on Architecture Enforcement and Governance Using Aspect-Oriented Programming.

The objective of this article is to give an overview of Reference Architecture (RA) and its significance in Enterprise Architecture space and how Aspects and Aspect-oriented Programming (AOP) can help enforce RA and manage Architecture Governance model.

I also discussed in the article, a sample Java application that uses several architecture rules to enforce good architectural and design practices such as Layered Architecture, Separation of Concerns, Domain-Driven Design etc.

The other articles published in the new issue are:

  • Introducing Drools 5 by Brian Sam-Bodden
  • Implementing "Web-2.0 Style" Popularity Filters by David Bock and Karen Gillison
  • Scala as Concise Java by Venkat Subramaniam
If you haven't attended NFJS software symposium or read the magazine before, check them out. The conference sessions are very practical oriented and just like the title says the focus is on the architecture, design, and development techniques that you can take back to your company and start using them right away in your projects.

Saturday, July 4, 2009

SpringSource Tool Suite (STS) is a free tool now

SpringSource has recently released their SpringSource Tool Suite (STS) IDE tool as a free version. If you are currently working on or planning on introducing Spring Framework in your projects, this is a very good development tool to use.

STS Project Main Page:

I wrote a mini-article on InfoQ about the recent RC1 release of STS. Here is the link:

Let me know if you have any feedback when you use this tool.

Sunday, May 31, 2009

I will be speaking at ProjectWorld 2009 Conference

I will be speaking at upcoming ProjectWorld 2009 conference in June (06/24-06/26) in Baltimore. My presentation topic is Agile Application Architecture Trends. The presentation is part of the "IT Innovation and Trends" track which is new for this conference.

Here is the session abstract of my presentation:

Architecture Trends - Where We Have Been, Where We Are Going

The presentation will include the discussion on emerging design techniques like Domain Driven Design (DDD), Custom Annotations, Dependency Injection (DI), Aspect-Oriented Programming (AOP), OSGi and Dynamic Languages. I will discuss some use cases where these techniques add value to the architecture and where they will be just an overkill. With upcoming releases of Spring 3.0, EJB 3.1, JPA 2.0 and Java EE 6, Java developer, not the product vendor, has once again become the core part of Software Development Process.

I want to focus on the emerging software architecture trends and how agile philosophy can drive architectural and design decisions in software development projects.

Some of the architecture trends I will be focusing in my presentation are:
  • Cloud Computing
  • Architecture Models (J2EE v. POJO)
  • Domain-Driven Design
  • Spring Portfolio
  • Model-Driven Development
  • OSGi
  • Innovations in the Database Layer
  • Software Product Lines
This will be my first trip to Washington DC/Baltimore area. I am looking forward to attending the conference which has excellent sessions and speaker line-up.

There is a 20% speaker discount off the conference standard rate for any one who registers on my behalf. Contact me if any one is interested in taking the advantage of the discount.

Tuesday, May 19, 2009

Adaptive Object Modeling - QCon Interview with Joseph Yoder

I did a video interview with Joseph Yoder on an innovative architecture concept called "Adaptive Object Modeling" at QCon San Francisco conference last November. This interview is now live on InfoQ website.

The highlights from Joe's interview include:

  • What is Adaptive Object Modeling (AOM)
  • How it differs from a traditional object model.
  • Application domains where AOM can be used.
  • Role of UML in adaptive object modeling efforts.
  • Architecture and design validation of the adaptive object models.
Check out the video interview on InfoQ site.

Sunday, May 17, 2009

InfoQ is offering online training classes on Cloud Computing, SOA and Agile Design topics

InfoQ web site is offering virtual training classes on topics like Cloud Computing, SOA and Agile Design hosted by reputed speakers like John Davies, Jim Webber, and Rebecca Wirfs-Brock.

These classes are not free (each class is currently priced @ $65 for one-hour "Briefing Session" and $135 for a half-day "Training Session"). The first training session is next Wednesday (May 27).

This is a good opportunity for software developers and architects who want to learn new technologies by attending a live training class and at the same time not spend a fortune that they would otherwise spend in attending technology conferences in person.

For more details on the new virtual training program, check out this link:

If any of you attend these classes, let me know what you think about the quality and if the price is worth the class. Also, if any one has other topics they would like to see online training classes, e-mail me with the topic names. I will pass along the feedback and suggestions to the training program organizers.

Architecture Enforcement Presentation at SEI Architecture (SATURN) 2009 Conference

I attended the SEI Architecture Technology User Network (SATURN) 2009 Conference in Pittsburgh last week.

I gave a presentation at the conference on the topic Architecture Enforcement and Governance Using Aspects. I discussed an architecture enforcement framework I created to "inject" architecture rules and design policies into the application code as part of the Continuous Integration (CI) process using Aspects to enforce quality of the code.

This framework uses tools like Eclipse, AJDT and Maven to integrate policy enforcement into the agile development process to detect architecture deviations early and often and validates that the design and code are in compliance with the Reference Architecture (RA).

The response from the attendees was pretty good. There were questions on how to take the architecture enforcement back to the design documents like Class and Sequence Diagrams (UML) as well.

Overall, SATURN conference experience was excellent. This was my first time attending it. It was a good opportunity to learn more about the techniques and best practices in the areas of architecture evaluation, validation, and assessment.

Some of the highlights from the conference are:

For more details on the events from the conference, check out this conference blog site.

Sunday, April 12, 2009

NFJS, The Magazine

I recently attended New England Software Symposium in Boston. I spoke on Architecture Enforcement and Domain-Driven Development topics at the conference.

On the flight back to Detroit, I read the inaugural issue of NFJS magazine which is very interesting. It was full of technical information just like the NFJS conference, no fluff and a lot of technical stuff.

This issue has the following technical articles:

  • A Case For Continuous Integration by Jared Richardson (author of Career 2.0 book)
  • So you want to be Agile? by Venkat Subramaniam
  • Introduction to Functional Languages by Ken Sipe
  • Message Driven POJOs - Messaging Made Easy by Mark Richards
All are excellent articles and very informative with sample code explaining the concepts.

With the new magazine, Jay Zimmerman, Andrew Glover (Editor of the magazine) and NFJS team have done an excellent contribution to Java and Agile development communities.

Sunday, April 5, 2009

SATURN 2009 Conference Presentation

I will be speaking at the upcoming SATURN 2009 conference organized by Sofware Engineering Institute (SEI) of Carnegie Mellon University (CMU). The conference starts on 4th and ends on 7th of May.

SATURN 2009 Speaker

Here is a statement from their website that describes the main theme behind this year's conference:

SATURN 2009 is expanding to cover architecture ranging from enterprise to system and software architectures. To reflect this expansion, the theme of the SATURN 2009 Conference is “architecture at all scales.”'
My presentation will be on Architecture Governance and Enforcement using Aspects which is based on my recent work on using Aspect-Oriented Programming (AOP) techniques to enforce the architecture and design policies in J2EE applications.

I have done the same presentation at ITARC Conference in Atlanta back in February and again at New England Software Symposium in Boston last month. The response and feedback from the attendees was excellent. Architecture Policy Enforcement is definitely a very promising application of Aspects and AOP in enterprise software applications.

I am looking forward to speaking at SATURN conference and meeting other architects from different backgrounds and experiences.

Sunday, March 29, 2009

New England Software Symposium Presentations

I recently spoke at New England Software Symposium in Boston. The conference was excellent, my talks were very well received. It was a great opportunity to network with other speakers and share my ideas with the attendees.

At the conference, I gave 3 presentations:

The sessions on "Architecture Enforcement using Aspects" and "Domain Driven Development" drew bigger crowds than I anticipated. The attendees asked good questions and expressed interest in the architecture enforcement framework I discussed and demonstrated in the presentation. I am still getting e-mails from the attendees with follow-up discussion on the talks. I also got couple of suggestions on improving the presentation. I am updating the presentations to focus on the parts that were more interesting to the audience.

I want to thank every one who attended my sessions and gave valuable feedback and comments on the presentation topics.

This was my first trip to the city of Boston. It's an excellent city. I enjoyed my short stay and looking forward to visiting there again in the future.

Interview and Book Excerpt: Jaroslav Tulach's Practical API Design

Jaroslav Tulach's latest book Practical API Design covers the topic of API design of software projects. Jaroslav discusses the importance of API design in the modern software applications, what are the different factors that make a good API, and how to go about implementing API frameworks. He brings his experience as the architect for NetBeans IDE project to the writing of this book. In the book, Jaroslav talks about several real-world examples of how to (and more importantly how not to) use Java API based on his experiences working on NetBeans project.

I published an interview with Jaroslav on InfoQ on various design and architecture topics. Check it out.

Jaroslav also maintains an excellent wiki site where he writes about his book and other API design topics.

Sunday, March 1, 2009

Architecture Enforcement and Governance Using Aspects - ITARC Conference Presentation

I was at IT Architect Confrence (ITARC) 2009 in Atlanta last week. The conference was a great event. It offered a great opportunity to talk to other architects (of all specializations, Information, Solutions, Data, and Enterprise) about their architecture experience and frameworks and technologies they are currently using in their projects.

Here are some of the highlights of the conference:

  • It was a non-vendor driven event organized by IASA (a non-profit organization focused on the Architecture profession). Paul Preiss and his team at IASA are helping the architecture community through education, consulting, and conference events such as ITARC.
  • Conference main focus was on Architecture and Architecture only, so there were no different tracks on Java, Ruby, SOA, and Agile topics to attract as many people to attend the conference as possible.
  • It was also more than just one kind of Architecture conference. The key-notes, technical sessions and round-table discussions included other architecture specializations like Data, Information, Infrastructure, and Enterprise Architecture which helped the attendees to put these specializations in perspective and see architecture as a whole solution for the enterprise business and IT needs.
  • There was a dedicated Architecture Career Mentoring track which I thought is an innovative idea and real help to the architecture professionals who are looking for some guidance from the experienced architects. Architecture is an art, not a science, so the advice from a senior architect is of a great value to the new architects.
  • And finally the Open Spaces track, hosted by Steven "Doc" List included two 1-hour open spaces sessions. This was a conference in itself and very informative; I learned a lot of new "open spaces patterns" in attending this event. I will be blogging more about those patterns in the future blog entries.
At the conference, I gave a presentation on "Architecture Enforcement using Aspects" topic. The presentation was very well received. There were both JEE and .NET IT professionals in the room and there was good interest on the topic of using Aspects and AOP to enforce the architecture and design policies.

I have uploaded to SlideShare web site. If you want to check out the presentation slides, here is the link. Let me know if you have any suggestions and feedback for improvement of the presentation.

This presentation has also been accepted for the upcoming No Fluff Just Stuff (NFJS) New England Software Symposium. Check out the symposium schedule.

Let me know if any of you will be attending the NFJS symposium.

Domain Driven Design and Development with Spring Portfolio

I gave a presentation at Ann Arbor Java User Group (AAJUG) last Tuesday on "Domain Driven Design and Development with Spring Portfolio". The presentation went very well with great discussion and feedback from the attendees.

David at AAJUG has been leading the user group meetings, speakers, and presentation. AAJUG has been an active Java user group for last several years. I want to thank David and the group members for the opportunity to speak at JUG meeting.

In the presentation, I focused on the Domain-Driven Design (DDD) implementation aspects using Spring projects like Spring IoC, Spring AOP and Spring Security. I also talked about enforcing architecture rules in DDD applications. I briefly talked about the role of code generation in a DDD application which included a quick demo using tools like Eclipse EMF and openArchitectureWare (oAW).

Here are some of the items I talked about:

  • Domain Driven Design & Development
  • Spring Portfolio
  • Dependency Injection (DI)
  • Aspect-Oriented Programming (AOP)
  • Role of Custom Annotations in DDD
  • Spring Security
  • Architecture Enforcement (Demo)
  • Code Generation (Demo)

I have uploaded to SlideShare web site. You can view the presentation slides on the site. Let me know if you have any suggestions or feedback for improvement of the presentation.

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.

Architecture Enforcement and Governance Using Aspects and SonarJ

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.

Friday, January 23, 2009

Spring 3.0 and Beyond - Interview with Rod Johnson

During QCon San Francisco 2009 conference, I interviewed SpringFramework founder Rod Johnson about various topics including:

The interview is now available on InfoQ. Check it out and let me know what you think.

Monday, January 19, 2009

Top 100 Best Software Engineering Books - Good List

Jurgen Appelo recently posted a list of Top 100 Best Software Engineering Books. I am not sure if I agree with the author on all the ratings of books in the list, but most of my favorites are in top 30. I am just not happy that Eric Evans' book "Domain Driven Design" (which is my top 10 book) is 89 on the list :)

Check out the list. Top 100 Best Software Engineering Books, Ever:

How does this compare to your own list of favorite books?

CodeMash 2009 Conference - Venkat's Keynote Presentation

I attended a keynote presentation by Venkat Subamaniam at the recent CodeMash 2009 conference. He talked about the facts and fallacies of every day software development and what developers & project managers should watch out for to ensure the success of the projects. It was an excellent presentation, Venkat touched on several agile development and project management techniques such as dynamic languages, off-shoring, innovation-before-standardization, and unit testing. He has a unique way of explaining every day problems that we, the programmers, run into in our projects and never even realize that we are in the midst of a problem.

The keynote session drew great response from the audience because of the practical nature of the fallacies mentioned by the speaker. I have published a news item on InfoQ summarizing Venkat's keynote presentation. Check it out.