While sat eating my lunch at the Software Architect conference I overheard a brief conversation between someone who seemed to be in charge of a project possibly Software Architect or possibly Manager, anyway the bit that caught my attention went something like this
…I only just found out that one of the developers has bypassed the middle layer…
The next bit of the conversation went along the lines
…When I get back I’m going to bring all the developers in and instruct them that they must go through this layer…
Now I have some big issues with this, firstly would it not be more constructive to ask the developer why they didn’t go through the certain layer he was talking about first?
It may be because the architecture of how that layer is implemented does not lend itself to the functionality that the developer was working on chances are that either the implementation or the processes around it are restricting or slowing down the ability to deliver functionality hence the need to find alternatives (ideally you want to have low viscosity, when viscosity is high the right changes to software are more difficult than just doing kludges, that indicates you have big problems!). Out of this may come a refactoring that has a positive impact on all the developers that develop for the system.
My second issue is this, say that the middle layer that was bypassed turns out to be the fault of the developer (s)he decides (s)he will instead go directly to the database (who needs all this business logic anyway, the data is what were interested in ;-)) if this is the case then I would suggest bringing the developer up to speed on why these things are important, explaining and showing examples of things such as being to write a unit test without having to hook up the database because it has been nicely decoupled may give them the aha! moment were it falls into place.
I guess both of this issues point to the fact that before any digging into the problem was performed a blame exercise that ain’t really going to help anyone or the system going forward has been organised.