Draw diagrams - UML seems to be the thing to use nowadays.
There are some good tools (and some free ones) which help with the maintenance. Though if you're only planning a few diagrams, paper and/or a whiteboard with post-it notes makes a great substitute.
Although UML has 13 different diagram types, some of them are rather specialised. Don't feel too weird if you can't think of a good reason to use them. UML aims to span from designing the garden shed to designing a skyscraper. There's just some stuff you don't need at the lower end of the scale.
Roughly speaking, you start with a single box representing your entire system, and you surround it with all the interactions with the outside world. Say, users, sensors, display devices, remote machines etc etc.
You then break your system into between 4 and 6 sub-components representing the "big" ideas within your program. These will interact with the outside world (see your first diagram) and will create new interactions between the entities you created.
Keep doing that until you start to create very small components which seem trivial to implement in code.
Oh, and before you rush to start coding, walk the diagrams through with someone (anyone) just to make sure it all hangs together properly. A quick diagram fiddle may represent a saving of several weeks of coding effort.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
you layers is nice you don't need more!
any basic business project should have UI Layer, Business Logic Layer, and Data Access Layer.
what about if you need security on all the layers?
you should add layer cross cut on your layers (AOP)
what about you areee using Distrbutied database?
you should add after Data Access Layer a Layer called Communication Layer.
I think your architecture seems to be good you don't need more layers
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
Creating "layers" only really makes sense if you plan to create several different projects with a shared theme. In other words, the extra effort you put into say your "display" layer to make it generally more useful (over and above what is strictly necessary for a given project) needs to have some payback down the line in making future projects a lot easier.
The problem is, unless you're exceedingly familiar with the solution domain (you've done the same thing several times already, and you're getting bored with it), is coming up with the API for your layer which is useful to you.
The danger is that the API will bloat, will have an ad-hoc interface and will suck in resources just to maintain itself rather than being in any kind of "finished" state where you can make use of it.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
> it said that it makes both debugging and maintenance easier.
So does working from a nice design with well defined functions and interfaces.
> are you saying that a layered architecture is more difficult or troublesome
> for very little reward other then multiple projects?
Not at all. Sometimes a few simple decisions can have an immediate and huge payoff. The danger is getting sucked into the "must have layers" mentality and spending way too much time creating something which isn't all that useful. If you can see a layer and how to use it then fine, but don't spend the time trying to force it.
Also, continually review progress as you go, as things do become clearer later on (like spotting a new opportunity for a new or better layer).
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Head First Design Patterns
Head First Software Development (more about the business processes involved in a software project)
Head First Object Oriented Analysis and Design
all published by O'Reilly.
There are tons more books out there, but these are fun to read as well as informative and instructive ;)
Sun also has a good course on OO design and engineering, course number OO-226. 5 days instructor led training, well worth the pricetag (a good instructor can teach you a LOT in a few days).
And some advise when you're trying to divide up the system into "layers": don't overdo it.
Don't go "pattern crazy" and start applying patterns everywhere. It makes the design unwieldy, the resulting application sluggish, unresponsive, overly complex, and hard to maintain.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337