News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Refactoring Legacy Code Part 7 - Identifying the Presentation Layer
July 03, 2014 @ 12:57:39

NetTuts.com has posted part seven in their "Refactoring Legacy Code" series today, continuing on with the refactor of their example application to improve maintainability and testability. In this latest article they focus in on the presentation layer.

In this seventh chapter of our refactoring tutorials, we will do a different type of refactoring. We observed in the past lessons that there is presentation related code scattered all over our legacy code. We will try to identify all the presentation related code that we can and we will then take the necessary steps to separate it from business logic.

The tutorial starts with a look at the Single Responsibility Principle (part of the SOLID design principles) and how it relates to the idea of clean architecture. They continue down the path of separating out the business logic and isolating it from the presentation layer (the display* handling). They create an "Extract" class that combines the logic and presentation though combination functionality. They walk you through the code, showing the changes you'll need to make and the tests to match.

0 comments voice your opinion now!
refactor legacy code series part7 presentation layer isolating

Link: http://code.tutsplus.com/tutorials/refactoring-legacy-code-part-7-identifying-the-presentation-layer--cms-21593

blog comments powered by Disqus

Similar Posts

Adam Culp: Clean Development Series: Part 4, Rewrite dilemma

NetTuts.com: Refactoring Legacy Code: Part 7 - Identifying the Presentation Layer

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 10)

Felix Geisendorfer's Blog: With jQuery & CakePHP to World Domination (Slides)

Blue Parabola Blog: Magento Feature Analysis Series, Part 4: Catalog Management Offering


Community Events





Don't see your event here?
Let us know!


code series podcast developer introduction bugfix application list api community laravel release configure language threedevsandamaybe interview framework library wordpress project

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework