Thursday, October 4, 2007 12:36 PM
What you're planning to do is not a trivial project. I did something similar once and it was fun, but not "real" fun. Let's just say it was a learning experience.
You need to be knowledgeable in several areas and I'll address them along with your questions.
- You can do this via Applets or via a Web app. Either one you will have to go through the browser. AND in each one, you will have to know the Java 2D API's. You will write to a "Canvas" object either way... And if you write this in a MVC (model-view-controller) pattern, you could switch between either method.
- It doesn't matter whether you use XML or not. You have to have some way of gathering the Network architecture into some type of Data Structure... And depending on how the network is designed you may use a Tree Structure or a Graph Data Structure. In my application, I had to create and use a Non-cyclic Graph Data Structure (that was the fun part). You would traverse the network and create nodes with the appropriate information in each node. Now, you have your structure gathered on the fly. Now, you need to display it.
Displaying it is gonna be hard, because you have to draw it pretty. That means no overlapping architecture pieces, labels have to be correctly done.... etc etc. You might do some kind of Google search, so you won't have to re-invent the wheel on that one. There's probably lots of good open-source code out there for that.
- There are some Open Source Java Libraries that will create PDF files... You can create an HTML Page with the GIF of the network diagram in it and either use XLST or some Open Source Lib to convert it to PDF and persist it.
Detail... If you want to pay me to write this, then I'll go into more detail.
Unless you are really into writing this kind of app or really into masochism or getting paid big bucks to write it, then you might consider buying it. Or doing a search online for some kind of open source program that will approximate your need and borrowing parts of the code.
Not sure if this high level overview helps, but it's fun to think of how one would do this.