Understanding new tools and technologies can be a daunting task. AndroMDA is no exception. This tutorial serves as a gentle introduction to the power of AndroMDA. We will show you step-by-step how to set up your development environment and build your first .Net application. Instead of mechanically going through a series of steps, we will focus on ideas and concepts. Armed with this knowledge you will be ready to take on real world challenges. Please set aside half a day of quality uninterrupted time to learn AndroMDA as there is lot to learn. Then brew a good cup of coffee and immerse yourself in the wonderful world of Model Driven Architecture.

What is AndroMDA?

AndroMDA (pronounced "Andromeda") is an extensible generator framework that adheres to the Model Driven Architecture (MDA) paradigm. It transforms UML models into deployable components for your favorite platform. While AndroMDA ships with cartridges that can generate code for several platforms and technologies, this tutorial will focus on generating a Microsoft .Net 2.0 application.

AndroMDA Architecture

The paragraph above might have sounded like a lot of acronyms and marketing speak, but using AndroMDA means one main thing:write less code. Not only that, AndroMDA also lets you create better applications and maintain better order on large projects. By generating as much code as possible it helps you enforce best practices as well letting developers focus on higher level problems instead of spending time on repetitive plumbing code. Additionally, AndroMDA can generate highly customized enterprise quality code to meet your project's specific needs.

During development of large applications most architects and developers already create class diagrams and data diagrams. Typically these diagrams are made in tools like Visio, and the resulting artifacts are static pictures. When code changes, the diagrams must be updated. With AdnroMDA, these diagrams become a living part of your application. They are used to generate large portions of your application, and hence always reflect the current state of the system. When you need to modify your application, you change the model first, regenerate the code, and then add or update custom code as necessary. You get a production quality application out of assets that you had to create anyway.

AndroMDA provides several cartridges out-of-the-box. For example, the NHibernate and NSpring cartridges generate robust service and data layers for your application. In addition, database schema can be exported to script files, allowing the creation of your application's database. There is also an easy way to map your model to an existing schema if your database has already been defined. If you wish to generate custom artifacts from your model you can write a custom cartridge to accomplish this.

When to use AndroMDA?

AndroMDA is an extremely useful tool, but you should know when to use it.

AndroMDA is a great choice when

  • You are starting a new project
  • You want to save time by generating as much code as possible
  • You are building an application that stores its data in a database

AndroMDA might not be the best choice if

  • Your applicaiton uses an existing database that cannot be easily mapped to an object model (for example, it does not use primary keys and object relationships are not clear)
  • You already have a mature application with existing business objects and the incremental effort to model existing components is too high to provide enough value

What's Next?

Now that you understand what AndroMDA is and when you should use it, let's review some foundational concepts that form the basis of modern enterprise applications. After reviewing these concepts we will discuss how AndroMDA implements them in the applications it generates. Click here to explore this topic.