Top-down Vs Bottom-up
Posted 13 May 2010 - 12:38 PM
Before your mind goes into the gutter lane, I will define these terms
I am referring these terms with respect to a web application design.
I would like to apply this term to a model where system is designed based on a certain UI framework in mind. Let’s say after conceptualization, a user framework is designed first. All the web pages, wire frames, sample data, and all design aspects of web interface are defined, then the nitty-gritty details of related business layer and database layers.
As you noticed in this approach, UI layer got more emphasis.
In this approach, a system architect or database designer gets involved first, defines the classes, database objects and relationships and so on... and in the end the presentation layer around those objects, classes etc.
My observation with Yii:
In my opinion Yii takes the bottom-up approach. First seeks the database layer entities and their relationships. Once that’s done it provides the necessary scaffoldings (Controllers, Models and CRUD views etc), providing the rapid skeleton to work from.
This leads the IT team to work on the presentation layer. However there is lot of effort in this model to permeate the rich UI features to synthesize the user interaction.
May be following scenario may provide some insights.
Interaction between a Recruiter and Candidate Profile can be envisioned using:
Recruiter - would like to hire a candidate.
- Interested in knowing Candidate's skill set, past experience and references.
Recruiter got a candidate profile view in making that decision.
Let’s say Recruiter clicks on the Hire button to invoke the hiring process - it may not update the candidate profile - but call other interactions such as creating employee information, invoking change management and other HR fulfillment requests to create physical work space, laptops, phone etc.
As you notice the UI view of Candidate Profile has nothing to do with the Fulfillment UI screens/system, instead they are fed (by various means of web services or other APIs that connect the HR fulfillment systems).
So in this scenario - typical CRUD handlers may not be adequate to provide the rich candidate profile for a recruiter. Instead a new view has to be developed that extracts the candidate attributes from various entities to provide a rich interface.
My question is:
Personally I like the bottom up approach, however what is the best way to mitigate the gap and reduce the effort of building a rich UI system but also maintain a solid database layer?
Appreciate your two cents.
Posted 13 May 2010 - 06:31 PM
Posted 13 May 2010 - 07:57 PM
I strongly recommend the top-down method. I find a lot of programmers short-fall in that they get so involved in the nitty-gritty details of the backend engine that they forget what they are actually trying to build. I believe its best to design the backend based on the UI, not the other way around. In the end, your users really don't care how the backend works. Their experience is only based on the UI that they can actually see. If you design your backend and database first, you will either feel limited when designing the front-end UI, or you will find yourself refactoring the backend and the database.