I'd appreciate people's thoughts on a dilemma I've been struggling with ever since ASP.Net came out.
In classic ASP, the layers of code were minimal. The ASP page contained HTML and script combined. The COM components contained business logic and DAO infrastrcuture. The asp pages themselves were messy, but everything was in one place.
ASP.Net code-behind neatens up the code, that's fine. The controls allow us to be more OO on the presentation layer. These things are nice.
Here is my problem--many projects I've walked into are enterprise web apps, but not all that complex, say 10 or so web pages / user interfaces, lots of DB interaction, etc. These used to be a piece of cake to understand. Now I will often encounter 5 to 10 layers of code to create a fairly simple web page. These may include ASP, code-behind, control classes, DTO classes, ORM objects, and then a few others just thrown in for the hell of it.
In addition to the 5-10 layers to get to the DB, there are numerous custom objects created just for storing ordinary data, rather than using POCO (plain old CLD objects) like for example a collection. To understand these objects, one often has to trace back through an inheritance hiearchy including 3 or more levels of objects and interfaces.
Here is the crux: Previously, I looked at 1 asp page and say 1 or 2 smallish objects, a few SQL queries, these got the job done and were fairly simple to maintain and understand.
Now, for the same page, there may be literally 50 objects or more, spread throught hundreds of objects in the custom namespace.
I ask you, fellow code-artisans, is this progress? Are some people going a little overboard with their zany fun new design pattern toys? Is there a happy medium? Is there a way to effectively use design patterns without creating so many objects that it becomes worse spaghetti code than the old procedural paradign???
Please share your thoughts.