HACKER Q&A
📣 _448

Layered Design or Flat Design?


I am writing a web app with the intention of evolving the app as and when the requirements evolve.

While writing the code I am faced with the dilemma of whether to just provide mechanisms at the lower level and push the policy handling at the higher levels, or just flatten the design and handle both mechanism and policies at the same level.

There are pros and cons of both approaches.

So how does one overcome this dilemma when dealing with evolving requirements?


  👤 brudgers Accepted Answer ✓
Because future requirements are unknown, there will be a lot of work irrespective of which architecture you choose.

If one was better than the other for you and your problem, then you wouldn't be asking which to use in the abstract.

So why not do the simplest thing that might work?

Build a prototype so that you understand the actual nature of your problem against the constraints of your KSA.

Good luck.