2008/07/30

Part five: generating and testing the application

kick it on DotNetKicks.com

Hello again!

In part four of my tutorial about MDE with Olivanova I wrote a little bit about modeling the user interface.

This (last) part is about generating and testing the application. As almost nothing has to be coded by hand, this step becomes rather simple.

Creating the model took me about six hours in total, now I want to see the result as generated and working application. Of course, the application will not be totally bug-free, but my intention was rather to show you how to quickly develop a fully-functional web- and desktop-application with the Olivanova modeling system.

In order to get the application working, I need to validate the model with the Checkbox-button. As the modeler does not report any errors, I can proceed exporting the model into an xml file by clicking on the Next-button.




After choosing a location on my harddrive, the modeler exports the xml and reports no errors:

Clicking on the Next-Button again starts the application that is in charge of defining the target platform. In my case, I will generated the following:

  • C# 2.0 COM+ Server
  • C# ASP.NET 2.0 web based user interface
  • C# Winforms 2.0 desktop based user interface
  • Function Points counter

The application lets me also choose other target platforms, but because I prefer .Net I chose that one.

Now, for each target platform I need to specify code generation parameters such as if double byte support is needed, default user interface language, database system, application name, application namespace, url and so on…



It is very important to know that you can mix client and server architecture as needed. This means, that you could implement your server application on JBOSS with J2EE and connect ASP.NET 2.0 Clients running on Windows Web Servers to it. But for now, we will stick to C# and .NET.

Next, I need to define the place on my harddrive where the generated code should be placed.



When I am done with this, I just need to send the model and the transformation profile to the transformation service and a few minutes later, I receive the code.

The code structure is much to complicated to go into detail here, perhaps I will write something about the code structure in the future. For now, it is just important for you to know that the server code also contains the database scripts that are needed to create the database structure and you will get the application running within five minutes.

Below, you see a screenshot with the three projects (Server, Webclient, Desktopclient) opened. The sln and proj files are also generated during the model-to-code transformation.



You can see the running result here: http://www.c5solutions.de/TravelmanagementDemo

Most likely, using the tool will not be for free for you, so it is worth mentioning the pricing for a moment. As you hopefully noticed, I also added the Function Points Counter (FPC) in the transformation request. This service is always for free and returns a set of html files which contain detailed information about which component causes how many functions points and of course let’s you know the overall sum. If you are interested in the function points method, I would suggest you to take a look in Wikipedia.

It is very important for you to know this sum, because if you prototype an application with this tool within 4-8h, you can let your customer know the price for the finished application. Because the first prototype is usually lacking huge parts of the business logic, I usually add about 33 percent of the total function point count of the first prototype and multiply it with our price per function point. Of course, Olivanova’s business model is quite similar: if you are able to use the service, they most likely will charge you a certain amount for each function point generated (although you can also arrange a flatrate pricing with them if you plan to use the technology for many projects).

Finally, I would like you to take a look at the application and tell me how long you think it had taken you to implement this functionality with NHibernate, Lightspeed, MVC, or whatever. Furthermore I would really appreciate if you tell me what you think about this technology, the prototype and this tutorial.

Thank you very much, if you have further questions, just send me an email.

kick it on DotNetKicks.com

Keine Kommentare: