views:

189

answers:

8

In the same way we have coding standards, can there be things such as architecture standards?

These would be high level principals that we can pass to our less experienced programmers so when they start designing changes or small applications they know what we expect to see without the more experienced programmers having to correct them (note this isn't instead of review, just preventing obvious mistakes as early as possible).

I'm thinking potentially it could contain things such as "Always normalise your database unless there is a specific and clearly understood reason for not doing so", "Always separate out presentation, logic and persistence".

Do people think that this would be too high level to be of any practical use? Or that such generalisations are almost impossible given the variety of functionality we might be asked to code? Or might it be useful?

If you think they're useful and realistic what would you include?

(If it helps clarify I'm thinking about Java/.NET level programming for corporate style business systems).

+2  A: 

This is hard to do which is why the common practice is to always have a more senior team member handle architectural decisions and coding. If it is impractical to have a senior team member do both then at least have that member be an integral part of the design and review process.

Andrew Hare
+1  A: 

In my opinion have your junior developers read Code Complete and The Pragmatic Programmer. These kind of high level idioms are presented in here.

Brian
+3  A: 

The SOLID principles would be a good place to start

Mark Heath
+3  A: 

We do have architecture guidelines. They are called design patterns. These are basically formalized, architectural guidelines that you can follow as appropriate.

Unfortunately, part of being an true software architect is being able to decide when and how to apply certain patterns/guidelines/practices. That's not something that's necessarily automatable or printable directly - There is almost always more than one way to do something, and each has costs and benefits. The skill comes in understanding the entire range of these, and making a good decision up front.

Reed Copsey
Design patterns are implementation and language specific, so at most they are a 'low level design' issue. Architecture is usually concerned with higher level concepts such scalability, security, integration with other apps and so on.
Gregory Mostizky
Design patterns, true design patterns, are completely language agnostic. They are a way to handle specific concepts, which in turn allow for scalability, security, integration, etc.
Reed Copsey
+2  A: 

"Always separate out presentation, logic and persistence".

Unless there are good reasons for not doing so.

For architectures, which are much more nebulous things than code, such rules would quickly degenerate into hand-waving and get-out clauses. So such guidelines are possible, but I don't think they would be useful. At the end of the day you are depending on the expertise and knowledge of the architect - hobbling him or her with half-baked rules (and who drew up these rules?) does not seem like a good idea.

anon
I'm happy giving get out clauses, with the proviso that if you choose to use it you should expect to have to explain why you thought it was a good idea. In my experience the act of getting your explanation together will prompt the developer into making the right decision.
Jon Hopkins
Note that architectures are not something multiple developers in an organisation should be designing (though they may have inputs to the process). An architecture is best designed by a single talented and experiencesd individual - and s/he doesn't need fuzzy guidelines.
anon
+2  A: 

I would add Unit Testing to the pile. If I could have only one thing on a desert island with my development PC, this would be it.

Practitioners of Test-Driven Development will assert that this is an integral part of their architecture, since the tests essentially define your application's behavior.

Robert Harvey
+2  A: 

How about the guideline don't have architecture guidelines?

Joking aside I think making the most important guideline would be:

Make the architect of any system actively part of the develop team writing actual production code

IMHO, this is the only way to have the level of information you need to make architectural decisions about a system. It also forces the architect to have 'skin-in-the-game' with the obvious benefits that produces.

Nick Holt
+2  A: 

Have you seen this guideline from MS Pattern & Practices group? They look at it from the application perspective instead of practice perspective.

Jimmy Chandra