SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Frameworks
SACHEEN DHANJIE
Sacheen Dhanjie
Senior Developer @ Afrihost.com
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.
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..
PHP Frameworks
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.
Symfony
• http://symfony.com/
• We use it at Afrihost.com
• It is the core of the business
• We run Symfony 1 and 2 concurrently
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
Setting up Symfony
Setting up Symfony
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
Home
The Page – IT WORKS!
The Console
• ./bin/console
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
Bundles
• Creating a bundle
• ./bin/console generate:bundle
Bundles
MVC
• Model
• View
• Controller
On To The Code!
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.
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.
Displaying the page
Model
This is the data source
./bin/console doctrine:generate:entity
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..
Creating the table
• ./bin/console doctrine:schema:create
Putting it all together
• Now we have a model
• We can create a view to read the model and a
controller to add data to the model
Create a new Controller
ExampleBundleControllerDefaultController::userAction
Create a new View
src/ExampleBundle/Resources/views/Default/user.html.twig
Check out the result!
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemetApurva Tripathi
 
SharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMSharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMRyan Dennis
 
Next Generation Browser Add-Ons
Next Generation Browser Add-OnsNext Generation Browser Add-Ons
Next Generation Browser Add-OnsAnant Narayanan
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHPAurimas Niekis
 
DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012kittenthecat
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMIContinuent
 
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...Chirag Thumar
 
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014Viktor Vogel
 
How to make WordPress your friend
How to make WordPress your friendHow to make WordPress your friend
How to make WordPress your friendKerch McConlogue
 
JAVA PROGRAMS
JAVA PROGRAMSJAVA PROGRAMS
JAVA PROGRAMSVipin Pv
 
WP 101 - Local Development - Themes and Plugins
WP 101 - Local Development - Themes and PluginsWP 101 - Local Development - Themes and Plugins
WP 101 - Local Development - Themes and PluginsJoe Querin
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practicesMichal Juhas
 
Uklug2009 Hairy Bikers Cookbook
Uklug2009   Hairy Bikers CookbookUklug2009   Hairy Bikers Cookbook
Uklug2009 Hairy Bikers CookbookBill Buchan
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!David Paquette
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentationKen Kramer
 
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens  SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens Sencha
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Ankit Kashyap
 
Paint it blue with PowerShell
Paint it blue with PowerShellPaint it blue with PowerShell
Paint it blue with PowerShellJaap Brasser
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapiBrij Mishra
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeJulie Kuehl
 

Was ist angesagt? (20)

Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
 
SharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMSharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOM
 
Next Generation Browser Add-Ons
Next Generation Browser Add-OnsNext Generation Browser Add-Ons
Next Generation Browser Add-Ons
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMI
 
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...
Tips to Build Your Blog Using ASP.NET and Types of blogs by ASP.NET Developme...
 
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014
Joomla! multiplied - How to run Multi-Sites - JandBeyond 2014
 
How to make WordPress your friend
How to make WordPress your friendHow to make WordPress your friend
How to make WordPress your friend
 
JAVA PROGRAMS
JAVA PROGRAMSJAVA PROGRAMS
JAVA PROGRAMS
 
WP 101 - Local Development - Themes and Plugins
WP 101 - Local Development - Themes and PluginsWP 101 - Local Development - Themes and Plugins
WP 101 - Local Development - Themes and Plugins
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practices
 
Uklug2009 Hairy Bikers Cookbook
Uklug2009   Hairy Bikers CookbookUklug2009   Hairy Bikers Cookbook
Uklug2009 Hairy Bikers Cookbook
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentation
 
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens  SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?
 
Paint it blue with PowerShell
Paint it blue with PowerShellPaint it blue with PowerShell
Paint it blue with PowerShell
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapi
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress Theme
 

Andere mochten auch

Design patterns avec Symfony
Design patterns avec SymfonyDesign patterns avec Symfony
Design patterns avec SymfonyMohammed Rhamnia
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
 
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)Javier Eguiluz
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricksJavier Eguiluz
 

Andere mochten auch (9)

30 Symfony Best Practices
30 Symfony Best Practices30 Symfony Best Practices
30 Symfony Best Practices
 
Design patterns avec Symfony
Design patterns avec SymfonyDesign patterns avec Symfony
Design patterns avec Symfony
 
Symfony Best Practices
Symfony Best PracticesSymfony Best Practices
Symfony Best Practices
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
Symfony day 2016
Symfony day 2016Symfony day 2016
Symfony day 2016
 
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
 
Twig tips and tricks
Twig tips and tricksTwig tips and tricks
Twig tips and tricks
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 

Ähnlich wie Dev traning 2016 symfony

Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaTim Plummer
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityGeoff Harcourt
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--devaltsav
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application DeploymentMathew Byrne
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Antonio Peric-Mazar
 
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013René Kreijveld
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend ToolchainBruno Abrantes
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015kyphpug
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrbAntonio Peric-Mazar
 
Making your user happy – how to create a perfect profile
Making your user happy – how to create a perfect profileMaking your user happy – how to create a perfect profile
Making your user happy – how to create a perfect profileLetsConnect
 
Managing OSS license obligations
Managing OSS license obligationsManaging OSS license obligations
Managing OSS license obligationsnexB Inc.
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...Putting it where they need it: How to Populate a Salesforce Knowledge base wi...
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...John Sgammato
 

Ähnlich wie Dev traning 2016 symfony (20)

Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with Joomla
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application Deployment
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19
 
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013
Bandwidth optimisation in Responsive Webdesign - J&Beyond, june 1st 2013
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015
 
E.s unit 6
E.s unit 6E.s unit 6
E.s unit 6
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
 
Making your user happy – how to create a perfect profile
Making your user happy – how to create a perfect profileMaking your user happy – how to create a perfect profile
Making your user happy – how to create a perfect profile
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Managing OSS license obligations
Managing OSS license obligationsManaging OSS license obligations
Managing OSS license obligations
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Automation in Drupal
Automation in DrupalAutomation in Drupal
Automation in Drupal
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...Putting it where they need it: How to Populate a Salesforce Knowledge base wi...
Putting it where they need it: How to Populate a Salesforce Knowledge base wi...
 

Kürzlich hochgeladen

WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 

Dev traning 2016 symfony

  • 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.
  • 7. Symfony • http://symfony.com/ • We use it at Afrihost.com • It is the core of the business • We run Symfony 1 and 2 concurrently
  • 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
  • 12. Home
  • 13. The Page – IT WORKS!
  • 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
  • 16. Bundles • Creating a bundle • ./bin/console generate:bundle
  • 19. On To The Code!
  • 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..
  • 25. Creating the table • ./bin/console doctrine:schema:create
  • 26. Putting it all together • Now we have a model • We can create a view to read the model and a controller to add data to the model
  • 27. Create a new Controller ExampleBundleControllerDefaultController::userAction
  • 28. Create a new View src/ExampleBundle/Resources/views/Default/user.html.twig
  • 29. Check out the result!