Skip to content

Latest commit

 

History

History
67 lines (62 loc) · 2.63 KB

File metadata and controls

67 lines (62 loc) · 2.63 KB

To Do

  • Quiz
    • Basic class
    • Class with chaining
    • Class that accepts same type of class
    • Class that accepts another class
    • Interface
    • Inheritance
    • Three level interface interaction (e.g. Library, Shelf, Book)
  • Interfaces challenges
    • Recreate Bike challenge using classes for everything
  • Some more basic static challenges
  • More on static
    • Explain better
    • Include example of using People instead - better type safety but harder for other people to use
  • OOP: Keep objects as objects for as long as possible
  • Demonstrate creating collection in constructor
  • When to use a constructor
    • If excepting arguments
    • If setting something up (e.g. collect)
  • Pre-week reading, to get through basic-PHP stuff and regex in one day?
  • Rewrite Law of Demeter
  • Explain when to use interfaces

    When you write a class that takes an object as an argument to a method

  • More regex challenges
    • preg_split
    • preg_replace
    • Tricksy: back references
  • Cover capture groups in preg_replace
  • Typed properties (PHP 7.4+)
  • Guide to writing classes
    • Does it accept arguments: __construct
    • Does it need default values?
    • What methods does it need?
  • Inheritance challenge with two parts: a) use inheritance b) use composition
  • Mention use partial namespace with use - e.g. App\Cutlery so you can then do new Cutlerty\Spoon()
  • lastName method used in static section of notes, but not actually in Person class

Doing

Done

  • Type hinting arrays, scalars
  • Git repos to get setup for the challenges
  • Cover encapsulation earlier - with objects?
  • Cover flags in regex
  • Mention brackets for grouping specifically in regex
  • Interfaces before Inheritance
    • Always use interfaces for polymorphism
    • Only use inheritance for definitely shared behaviour
  • Talk about return type declarations
    • Clear up type hint vs type declaration
  • Mention single responsibility principle in OOP notes
  • Is static necessary for caching in recipe static question? Just stored as a property
  • Architecture before OOP
  • Namespace challenges need clearer setup instructions to make sure they're doing it properly
  • Move static to post-encapsulation?
  • Update autoloading challenges so no chaining or objects using other objects
    • Move spares into OOP/static
    • Add namespaces to OOP/static challenges
  • OOP Challenges
    • Add template repo
    • Should use autoloading
  • Separate static challengs and point to right place
    • Add static challenge to use a collection class (People) instead of static