Ok, just published yesterday’s post. Today, I’m starting the best practices book.
- Bundles should be able to reuse, i.e. own business logic most likely gets into an AppBundle.
- For constant values use
constand not the config files
- For Doctrine use Annotations
- Use annotations from the
FrameworkBundleto handle caching, routing and security in your controllers
That’s pretty neat. I didn’t know Symfony had this. In other frameworks I worked with in Python or Clojure that’s the standard way of doing it.
- Put templates in
- Define forms as PHP classes
- Use the
@Securityannotation for authorization
- Use hardcoded URLs for tests to check for changing URLs
- Learn Symfony2
- Learn a bit more about MySQL
- Write at least one web app using Symfony2 and its core components (templating, testing, forms, validation, security)
- Watch one video per day on average
- Read Symfony Best practices
- Watch one video per day on average [53 of 75]