Exercise Tuesday

Goal: Today you're going to focus on the process of building simple apps in Silex, and using objects inside of them. Be sure to make frequent Git commits and include a README when you and your partner push your projects up to your Github repositories.

Warm Up


  • What does Composer do? Why would we need a .gitignore file when using Composer?
  • What does Silex do that helps us build web apps quickly?
  • What are the specific step we take to setup a Silex app?

Code


Start today by working through the greeting example app in the Web apps with SIlex lesson.

When finished with that, work on the Rectangle and CD examples in the Objects in Silex lesson.

Dealership 2

Move your car dealership site into a Silex app. Make sure your Car class includes a constructor as well as getters, setters and private properties.

Job Board

Create a section of a job posting board where a user can create one instance of a JobOpening class by submitting a form. It should include properties for a title, description, and contact info for the person posting the job. If you're feeling fancy, make the contact info into an object with its own class declaration, just like we did in the "Objects and properties" lesson. Hint: A Contact object would include properties like a name, email and phone number, and you would want to store it inside of the JobOpening object you are creating.

Peer Code Review


  • Examine the routing on the app.php file. Does it make sense?
  • Does the app work?
  • Does the CD app correctly call the methods?
  • Can a user add and view CDs?