Yii Framework Forum: Top-down Vs Bottom-up - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Top-down Vs Bottom-up Rate Topic: -----

#1 Guest_sidebar_*

  • Group: Guests

Posted 13 May 2010 - 12:38 PM

Top-down Vs Bottom-Up
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.

Top-down:
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.

Bottom-Up:
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.
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,334
  • Joined: 17-January 09
  • Location:Russia

Posted 13 May 2010 - 06:31 PM

Probably you can start with pen and paper mocks and a discussion. It will reveal a lot of mistakes that often affect overall architecture. Then draw your db structure. It will give you another portion of questions to ask. Most likely there will be immediate corrections for both UI and DB schema. When there is an agreement on what do you want to do it will be just a straightforward development process and it does not really matter if you will start from top or from bottom.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 13 May 2010 - 07:57 PM

I liked how you defined top-down and bottom-up

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.

I started on an entrepreneurial project a few months back and before I even started writing the code, I designed it merely in my head for at least few months. Then I spent about a month designing with pencil and paper. It's important when designing the UI that you do not design based on what you know how to do, do well, or do easily. It's best to design with the user in mind - not on your strategy of implanting it. I didn't even touch Yii until about two months of brainstorming. Then I did the html/javascript/ajax, with only a touch of php (mostly the CHtml helper). Next I will design the database, and lastly I will write the PHP code. This is what works best for me
http://php-thoughts.cubedwater.com - my bloggings about Yii
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users