one thing in a class. • Open-Closed Principle: extend, don’t modify. • Liskov Substitution Principle: don’t switch classes, unless you’re sure they give the same result. • Interface Segregation Principle: create small interfaces. • Dependency Inversion Principle: depend on interfaces, not classes.
database? • Create Eloquent models for new database tables. • Change all controller dependencies (Eloquent instead of Third Party API). ◦ Registration process, edit profile process ◦ Admin panel: managing candidates (CRUD), creating candidate profiles, creating proposals... • Change controller logic to adapt to the storage change. • Change all views. • Adapt the unit tests, retest everything. • Estimated time for migration: 30 days
responsibilities in specific classes. 2. Design the code in a way that allows extending by adding, not modifying. 3. Be aware of the return types: know what you expect. 4. Don’t depend on concrete implementations. 5. Don’t depend on unnecessary methods.
programming. • Think about the UX of your code. • Use SOLID design principles to create software that’s easy to extend and maintain. • Think of SOLID as your tool, not your goal. • Don’t laugh at PHP jokes.