top | item 15432142

(no title)

saltedmd5 | 8 years ago

The truth is that the construction of CRUD web UIs _is_ 90% automated.

The web and storage frameworks do the vast majority of the heavy lifting - the application code is really just simple wiring and validation.

The trouble is that (in my experience, at least) many web shops and web developers enormously overcomplicate that application code; shoehorning enterprise "layering" into simple components, creating poor - and often unnecessary - abstraction. These things lead to grossly over-engineered solutions with bloated code and control flow flying all over the place.

So the reality is that what can be automated largely is already - we are just, by and large, pretty bad at doing the bit that isn't.

discuss

order

staticelf|8 years ago

One can compare it to any other product in the real world. Just think about cars. Every car is about the same nowadays, many uses the same parts under the hood. But still, every car has different functions, different designs and slightly different placement of things UI-wise.

This is the state of the development world as well. It is like this because not everyone wants the same generic model and every company has to stick out in some way.

matt_s|8 years ago

The thing about cars, or any real-world comparison, is that software is always changeable. Its hard to change manufacturing lines over a new design for cars, thats why they have designs out there for years at a time.

I think the vast majority of our time isn't wiring a UI to CRUD actions, its dealing with the complexities of whatever business domain the CRUD app is intended.

dabockster|8 years ago

> not everyone wants the same generic model and every company has to stick out in some way

You also have all those little edge cases that do not fit in a generic CRUD model.

rtpg|8 years ago

My experience has been that shops that avoid abstraction (namely, lacking a strong separation between controller code and business logic) end up suffering a decent amount long-term.

There's an argument that many layers of abstraction lead to too much boilerplate, but lacking abstractions can cause slowdown long-term because it gets harder and harder to handle all the interactions between subsystems.

You can always automate boilerplate "generation". You can't automate inconsistent business logic.

saltedmd5|8 years ago

The problem is the idea that "layers" and "abstraction" come as a package. You don't need layers to create meaningful and useful abstraction - in fact more often than not they prohibit it.

And you certainly don't need layering within a single codebase - if I see one more codebase where everything is a FooController, FooService or FooRepository I just might go insane.

People abstract logic away from controllers only to dump it all into a massive procedural "service" class, which leads to no end of pain down the road. Once you stop seeing layers and start seeing a vertical dependency tree starting at the controller, the world gets a lot more rosy. Consumer-driven development helps here.