Sign in to follow this  
Vortez

Anyone know a program to design classes?

Recommended Posts

The title says it all, id like to have a program that help me design multiples classes and see their relationship with each others.

 

The thing is, im trying to refactor my remote pc program, which work very well but is becoming a pain to manage/upgrade.

It as asyncronous network io, multiple threads, stuff like that so it's getting really confusing at this point, so id like something that

help me see more visually the relation between the objects, and the threads.

 

If that's not enough, both my client and server program can connect using either a server or client socket, so the connection can be done both ways (in case the server program is behind a router, and the client not, for example).

 

I wanted my client program to be able to connect to multiple server, but failed because of this mess.

Edited by Vortez

Share this post


Link to post
Share on other sites

There is a thing called Unified Modeling Language, UML, which provides among many other things, class diagrams to show such relationships.

 

This is one of many UML tools around, and its free http://sourceforge.net/projects/whitestaruml/

 

You'll have to search around about how to use such class diagrams though, they have their own nomenclatures (ie, + for public, # for protected, - for private) and most tools around will try to encompass all of UML which means a ton of stuff you won't use.

 

You could also just use more or less the same conventions and do everything in Visio or LibreOffice Draw.

 

Aaaand depending on what tools you're using to code, you can probably get a plugin or something that outputs UML class diagrams for your code (there are a few for Eclipse + Java for example).

Share this post


Link to post
Share on other sites

UML is the way to go. I've always liked Violet (http://alexdp.free.fr/violetumleditor/page.php); it's lightweight with a very simple user interface and free to use.

 

That seem like a nice program but i don't understand how to execute it. It's in a .jar file, which apparently is the same as a zip file, but when i extract it there is no executable, i don't get it.

Share this post


Link to post
Share on other sites


It's in a .jar file, which apparently is the same as a zip file, but when i extract it there is no executable, i don't get it.

.jar files are for all intents and purposes executable, you just need the latest java runtime environment installed... this should do it http://download.cnet.com/Java-Runtime-Environment-JRE/3000-2378_4-10009607.html

 

Once installed you should just be able to double click on the .jar file.

Share this post


Link to post
Share on other sites


That seem like a nice program but i don't understand how to execute it. It's in a .jar file, which apparently is the same as a zip file, but when i extract it there is no executable, i don't get it.

 

I dont know much about the program but you might be able to use Violet if you install a Java Virtual Machine.

Share this post


Link to post
Share on other sites

 


It's in a .jar file, which apparently is the same as a zip file, but when i extract it there is no executable, i don't get it.

.jar files are for all intents and purposes executable, you just need the latest java runtime environment installed... this should do it http://download.cnet.com/Java-Runtime-Environment-JRE/3000-2378_4-10009607.html

 

Once installed you should just be able to double click on the .jar file.

 

 

WinRAR overrides the .jar extension (unless you explicitly tell it not to) and tries to open it as an archive which is why it seems like a "zip" file to the OP.

reinstalling Java should solve the problem. (He could also manually change which program is used to open .jar files (shift right click, open with, select the java runtime and "always use this program" thingy IIRC)

Share this post


Link to post
Share on other sites

Is this program only in french? Don't get me wrong, i speak french, but i would like to have it in english since im more use to the terminalogy, but i cant find any option to change it, and event settings english as my default language in panel control dosen't help.

Share this post


Link to post
Share on other sites

If you want an example of good class design, I have a hugely commented breakout game on my developer journal which describes how to document your classes and has some pretty nice examples of Inheritance, Polymorphism, Virtual Classes (at least a Base class which is never instanced), and other object-oriented techniques.

 

I've found brain-mapping tools to be clunky, and prefer to think out the basic structure and figure out how my data is getting passed around / used.

 

Luckily, I don't have to worry about State-Machines and things like that because I've already coded my own.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this