From classes to code

So, we have covered how to convert from classes to tables but what about classes to code?

In this entry we will talk about the translation that it takes to convert classes to code. If you have been following up, you have known about UML and Modeling Languages and the patterns within software engineering (if you have not read the previous post, I recommend you doing so). Hitting up this point and talking about this topic should be a no brainer. We are going to put in practice the analysis and design we have studied.

Conversion
Conversion flickr photo by Yvan Demers

If you already have taken a dive into UML diagrams and know wonder what you have to do, it is quite easy; just remember the higher quality the diagram is done, the easier to accomplish this task of conversion. Diagram classes are object oriented, so the first step here is, sounds logical, find a object oriented language that fits your suit and makes you confortable. Taking this in mind you can easy identity and functionality of the system you design but if you consider that using a non-object oriented language is more appropriate in your own case feel free to do so. (Good tips on It worked a second ago… Code Revision)

It is also important that you have a full understanding of your system functionalities and your diagrams´ attributes. These attributes offer you a bunch of information that can help you into this conversion (initializing these attributes into your code would be a good idea).

Now talking about the methods, their name gives you a basic knowledge of what actually you have to do. Also, you can use the inheritance applied in diagrams into the code, works the same way. And that´s about it, the hard part has been done in your previous work. Enjoy your conversion and keep programming!

hard work pays off
hard work pays off flickr photo by dav csl

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started