Skip to main content

Posts

TigerTeam TRIMM - Model Driven Generator just went Open Source

TigerTeam TRIMM – Model Driven Generator is just Open Sourced in July 2013. I myself never heard of this product before and found this product by coincidence as I tried to find a JPA 2 standalone cartridge / generator available in Internet. I know that AndroMDA has some cartridges to persist Java objects but as far as I know AndroMDA only support persistence in the context of EJB 3 not as standalone JPA. After I found this product I began to analyze the code at Bitbucket.org and found out that the idea with the Events and Listeners as Extensions  is a very good idea. TRIMM also uses Maven completely and does not have any dependencies to Eclipse plugins, so you are Eclipse independent. Special to this framework is that it uses its own metamodel and does not use UML2 metamodel for the generators. TRIMM should work for MagicDraw and Enterprise Architect and it can read the files directly from those UML tools. It also uses its own Java code generator which is basically based on...

CDI vs. Spring Framework Core

Another question I got in my Spring Framework training is: is it worthwhile to switch from Spring Framework 3.x to CDI with JBoss Weld or Apache OpenWebBeans implementation? After googling around I found some good articles and blogs about this topic. These two articles are the best in my opinion: Spring DI and CDI Comparative Study CDI 1.0 vs. Spring 3.1 feature comparsion: bean definition & dependency injection Luckily I had a chance to take a CDI course intensively for two days to be able to see what we actually could do with CDI. After doing two days intensive course of CDI I can sum up this topic as following: CDI takes a lot of good idea of Spring Framework , this is for sure. Anything you can do with CDI (I used JBoss Weld in the course I followed) is not new and you can have those stuffs in Spring Framework as well. In CDI 1.0 (JEE 6) there is still a lot of things which is not supported natively such as "scanning of classes and packages" to turn on ...

Creating Spring Bean dynamically in the Runtime

In my training someone asked me whether it is possible to create an object (a Spring Bean) dynamically so you can choose which implementation you want to have  in the runtime . So at the compile time you don't know what object actually should be created yet. The application should decide what object to be created based on a property file . 1. We create an annotation so we can mark the method which should be able to create the object dynamically: ... package your.package; ... @Retention(RetentionPolicy.RUNTIME) public @interface InjectDynamicObject { } ... 2. Use the new created annotation in your method which should be able to create the object dynamically: ... @Named("customerBo") public class CustomerBoImpl implements CustomerBo { ...     @Override   @InjectDynamicObject   public Customer getDynamicCustomer() {         return this.dynamicCustomer; } ... 3. Write an aspect with Pointcut a...

Software Development Macro and Micro Process

If you think that in year 2012 all companies which produce software and IT divisions in our world have already their optimized software development process, you are wrong. It seems that we - software architects, software developers or whatever your title is - still need to optimize the software development process in many software companies and IT divisions. So what do you do if you enter a software company or IT division and you see following things: 1. There is a perfect project management process to handle all those development of software but it is a pure project management without a context to software development. So basically you only take care of cost, time, budget and quality factors. In the software development you still use the old fashioned waterfall process. 2. From the tooling point of view: you have a project management planning and controlling tool but you are still in the beginning of Wiki (almost no collaboration tool) and you don't use issues tracking sy...

Model Driven Software Development with UML - Back to the Root (or how KissMDA saves our Agile Development with Java...)

After working since 2004 with MDA (Model Driven Architecture) / MDSD (Model Driven Software Development) technologies like AndroMDA, oAW, etc. always in context of Java technology and UML (Unified Modelling Language) I feel like that we need just another MDA tool. Why? Past  The first experience with AndroMDA in the year of 2004 was great! At the end you don't need to code those boiler plate codes in EJB 2.x. AndroMDA generates everything for you. You also have the documentation of your application always up to date. This is a very important thing, since if you have more than one hundred entities you definitely need that actual documentation to be able to extend the application. AndroMDA offers a lot of mature cartridges like EJB 2.x, SpringFramework, Struts, Hibernate, JSF. The idea with cartridges is just gorgeous. IMHO it is possible to have a general application architecture for most business applications. So if you are using SpringFramework and Hibernate you can reuse...

Open Data Initiative and Mashup

Just finishing playing with Open Data Initiative Berlin and Google Maps... Mashup with GWT using the newest Google Maps GWT (gwt-maps 3.8.0-pre1)... Very nice! All in all I used following technologies: Java (what else?) Maven 3 GWT (Google Web Toolkit) with gwt-maps 3.8.0-pre1 for Google Maps V3 GAE (Google App Engine) Within this mashup I combined the Open Data from Berlin:  Total population 2011 per area (Berlin Mitte, Berlin Spandau, etc.) Result of Election 2011 per area ... and put them into Google Maps. You can find all the links in my WebApp:  http://opendataberlin.appspot.com I found out following things as I implemented the WebApp: Open Data Berlin needs to take care of their Open Data API . For the total population I need to get the Zip file, uncompress it and read the CSV file inside it, using Common Compress and OpenCSV Java Open Source library. For the result of election I have to work with Excel file using JExcel, also Open Source librar...

Why "Polyglot Programming" or "Do It Yourself Programming Languages" or "Language Oriented Programming" sucks?

Last year we saw the launch of a new Web programming language Dart - Structured Web Programming from Google. A very interesting approach to support web application development. Not so long after Go, Groovy, Ruby, Scala, << name your DSL here >> ; we see Dart. Is it a good thing to have at least one programming language to solve one problem? The answer is, like we already know, it depends. Some important backgrounds you should know about the multi programming language paradigm are following: 1. You can read Martin Fowler article about language oriented programming with language workbenches which enables you to write small programming languages easily. In this article I see everyone writing their small languages, everywhere. In this concept we see DSL (Domain Specific Language) as the future of our programming activities. Source: http://martinfowler.com/articles/languageWorkbench.html 2. Neal Ford talked about Polyglot Programming, combining multiple programming language...

Moving from Ant to Maven: Best Practices with Maven Plugins

I would like to share my experience of moving from "our reinventing wheel" of Ant build scripts to Maven standard. I reworked some apps which have following characteristics: (1) Java Version: - The apps should be compiled with Java 6 version . (2) Basic technologies: - Some of the apps are using Model Driven Architecture/Model Driven Software Development things, it means we have some MDA/MDSD generators inside our Ant scripts, like AndroMDA or oAW . - Almost all the apps use Hibernate , so we need to generate the whole Database scheme to be able to create the whole database automatically. - Some of the apps use older version of ANTLR . So we have some of ANTLR source codes which have to be compiled. - Some of the apps use older version of Groovy . So we have some of Groovy source codes which have to be compiled. - A webapp uses GWT as presentation layer. (3) Packaging: - Some of the webapps have somekind of information about the version . For ...

Inside-Out and Outside-In Integration of Webapps: Services and Extensions

In terms of integrating your webapp with other webapps and another way around I see two different integration types: 1. Inside-Out Integration This is the standard way and almost every webapps available use this possibility. For other webapps to be able to use some functionalities of your webapp you often offer Web services (mostly in RESTful manner) which can be called from outside or other webapps easily. In this area you offen need following strategies and standards: Webservice protocol: REST for allowing to define the functionalities you want to export to other webapps. OAuth (two and three legged) for allowing other webapps to calls your webapp services, authorization. Sometimes OpenID for allowing other webapps to use the same login, authentification. 2. Outside-In Integration This is still not commonly used in webapps development. In some desktop apps we know this as a concept of Extensions and/or P lugin s (I use these terms exchangeable). This integrati...

Don't leave home without these Eclipse 3.5.x (Galileo) Plugins...

M2Eclipse: http://m2eclipse.sonatype.org/sites/m2e JarPlug: http://www.simontuffs.com/jar-plug LogWatcher: Without Update Manager: http://graysky.sourceforge.net OEPE (Oracle Enterprise Pack for Eclipse): h ttp://download.oracle.com/otn_software/oepe/galileo Google Plugins for GWT and GAE: http://dl.google.com/eclipse/plugin/3.5 Subeclipse SVN: http://subclipse.tigris.org/update_1.6.x Android: http://dl-ssl.google.com/android/eclipse ATF (Ajax Tools Framework): installation guide: http://wiki.eclipse.org/ATF/Installing A good comprehensive list of Eclipse plugins can be found here: http://www.tutego.de/java/eclipse/plugin/eclipse-plugins.html Have fun! Lofi.

HOW-TO: OEPE - FastSwap with Maven2 and M2Eclipse Plugin

At the moment there is not enough information if you want to jump start with OEPE (and of course using FastSwap) and Maven2 (using M2Eclipse plugin). This HOW-TO shows you how to achieve this. You need to have Eclipse (3.4 or 3.5), WLS (10.3 or 11) OEPE, Maven2 and M2Eclipse installed correctly before you can follow the steps below: 1. Create a web application with the webapp wizard (dynamic web project). Choose a webapp based on WLS (10.3 in my case). Please change following settings afterwards to be Maven complianced: Source for web: src/main/webapp Source for Java: src/main/java 2. Turn on Maven project on the project above ("mavenized the project") with M2Eclipse. 3. After you mavenized the project you can delete the directory build/classes since Maven uses target/classes directory. Everything should be customized to Maven directory structure automatically. 4. You can add src/test/java - if you need it src/test/resources - and also src/main/resources ...