"Whether I should start developing JSP or the Business Logic first ?" is a common question that arises to every developer in there development lifecycle. This blog talks about the same, and try to see the advantage & Disadvantage of both approaches.
Top Down Approach:
What is Top Down Approach? Top Down approach is to start implementing Presentation Layer and then implement the Business Logic over and above.
- Easy to visualize functionality.
- Sense of completeness in the requirement.
- Easy to show the progress of development.
- UI driven approach hence high possibility of redundant business logics.
- Since an UI is readily available no developer would write a Unit test cases.
- No Concrete layer to rely on, as both presentation & Business Logic keep evolving.
- Lack of concrete test suits to ensure one layer is tied up.
What is Bottom Up Approach? Bottom Up approach is to start with the concrete business logic and its testcase and proceed with presentation Implementation.
- Solid Business Logic, hence zero redundancy
- Good Unit test case can be written to validate changes.
- Developer has only option to use unit testing tools to test the Logic.
- Easy to manage changes and modification.
- Effort involved to write test cases.
- Progress of implementation cannot be show very effectively.
As the number of tier & layers getting more and more, the amount complexity due to loose coupling also increases. Business logic is one which need to be concrete, testable and manageable. There is no right or wrong in these approaches, but business logic is heart of any modern day or traditional applications. If one has a concrete business logic, it's easy to provide a UI to manipulate the same (UI Developer's excuse me for that, this my perspective).
Note: My preference is Bottom Up approach, and i feel lot more comfortable and confident that my one end is tied up, and i need not worry about it.