3. What is a software
framework?
• It is software that assists in structuring
an application, with the most common
bells and whistles to get you on running
almost instantly.
4. Why use a framework?
• It assist in not coding yourself in a corner.
• It allow you to focus on the software you have write
• It has all the basics built in already, no need to re-invent the
wheel
• It comes with ready made components like, authentication,
routing, configuration etc..
6. Choosing a framework
• Choosing a framework can be difficult
• Its personal choice
• Its up to you, with what you comfortable with
• There is no right and wrong when choosing
• Contribution and Support in open source is what makes
the software a preferred choice.
8. Getting Started
• Composer
• https://getcomposer.org/
• Composer is used to install different components to your
application.
• You decide what component you would like to use and
you install it - https://packagist.org/
• composer create-project symfony/framework-standard-edition
my_project_name
11. Now what?
• We need to view our application in the browser.
• php bin/console server:run
• This starts a server on the command line
• You would only do this when developing
15. Bundles
• Symfony uses the term Bundle, for each unit of
packaged code that serves a particular purpose.
• For example, BlogBundle – it’s a bundle that should
contain code related to a Blog
• SecurityBundle – should have things related to security
stuff
20. Routing
• Routing can be configured by annotations, yml,
xml and PHP
• The most common configuration is using
annotation as the route is above the controller you
are currently working with.
21. Controllers
• The code in a controller must be lean
• All business logic must be separated from the
controller
• Create manager functions to consolidate business
logic to a particular bundle domain.
23. Model
This is the data source
./bin/console doctrine:generate:entity
24. Model
• app/config/parameters.yml
• Setup the database information in the
parameters file
• This file is used for storing all the information
required for configuration
• Mail hosts, database connections. Etc..