Software Best Practices Peter Mosca April, 2007
What are Best Practices? Repeatable processes and techniques that have been shown to be effective ways to solve common problems. Reduce risk. Software Best Practices
Design Patterns Standard solutions to common problems in software design. Have been proven time and again. Software Best Practices
Design Patterns Singleton – there can only be one Factory – abstracts object creation MVC – Model View Controller Advanced Features: Full Object Orientation Extensible into Domain-Specific Languages Software Best Practices
Model View Controller Software Best Practices
Version Control Allows you to move backward in time Allows multiple developers simultaneous access to source code Branching avoids code freezes All documents – not just source code – should be placed under version control Subversion and CVS Ruby on Rails is the “killer app” for Ruby Software Best Practices
Unit Tests Tests a small portion of code An application will have LOTS of unit tests Also serves as a level of documentation Test-first development becoming more embraced in the field JUnit for Java David Heinemeier Hansson worked for 37 Signals in Denmark Software Best Practices
Continuous Builds The entire application automatically compiled on a regular bases Unit Tests are automatically run Should be automatically run whenever anyone changes source code Cruise Control Full-Stack: the components are integrated so that bridges between them do not need to be set up manually Software Best Practices
Summary Best Practices help mitigate risk Best Practices enable you to embrace change describe the rebellion against the fallacy of objective software. That software should be as configurable as possible from the outset to allow every user to bend it exactly to their needs. Flexibility is overrated. Software Best Practices