Is there a resource that explains the benefits of layered programming?
Posted
by
P.Brian.Mackey
on Programmers
See other posts from Programmers
or by P.Brian.Mackey
Published on 2012-04-04T17:12:57Z
Indexed on
2012/04/04
17:40 UTC
Read the original article
Hit count: 377
Some developers I know favor what I would call a procedural programming style. I recognize that procedural programming has its uses, albeit not in the business application world of .NET programming.
So let's say we have a winform application with a buttonclick event. The buttonclick handles everything from the UI configuration to the database call and data manipulation. So you end up with a method that is 100's of lines of code long. Outside the fact that this code can't be considered test-able for various reasons, this style of programming is fragile to change.
I can talk bout OO, Anti-patterns, etc. The problem is that any distinct topic I can dream up requires a great deal of explanation to understand the potential benefits.
Outside of finding a new job (lots of businesses program this way), how can I teach these kinds of developers how to write better code? Obviously we can't sit around a round table and discuss pro's and con's all day due to time constraints and real work that has to be done. Although, training and intense training is the only thing I can think of to fix these problems.
Not to say I write perfect code, I most certainly do not. I do believe there are certain best practices that should be followed as a rule E.G. OO in the context of .NET.
The most common excuse I hear is "we can't write code fast enough if we do it like that".
© Programmers or respective owner