170 likes | 355 Views
Mobile App Club (An introduction to Symfony ). Briland Hitaj ICTCO , 08.05.2014. Presentation Outline. What is Symfony Use a Framework??!! WHY??? Ok, but why Symfony ??? Let’s get started (Library Project). What is Symfony ???. Open Source PHP Web applications development framework
E N D
Mobile App Club(An introduction to Symfony) Briland Hitaj ICTCO, 08.05.2014
Presentation Outline • What is Symfony • Use a Framework??!! WHY??? • Ok, but why Symfony??? • Let’s get started (Library Project) ICTCO 2013
What is Symfony??? • Open Source PHP Web applications development framework • Developed by Sensiolabs • Licensed under MIT Open Source License ICTCO 2013 - 2014
Use a Framework??!! WHY??? • Code and File Organization • Utilities and Libraries • Form validation • Input/output filtering • Database Abstraction etc… • The MVC Pattern • Model: representative of your data structures, usually your database • View: page templates and output • Controller: handle requests and bind everything together • Reasons: Cleaner code, easy to extend and maintain faster and more secure application ICTCO 2013 - 2014
OK, but why Symfony??? • Fast • Flexible • Expandable (bundles) • Stable ICTCO 2013 - 2014
Let’s get started • First Download Symfony from http://symphony.com/download ICTCO 2013 - 2014
Download composer • Download COMPOSER.PHAR from https://getcomposer.org/ ICTCO 2013 - 2014
Project Structure ICTCO 2013 - 2014
Execute • phpcomposer.pharupdate • Install the latest and necessary bundles • phpcomposer.pharselfupdate • Periodically get the latest composer.phar distribution ICTCO 2013 - 2014
Create a bundle • Symfony works with bundles – a container for your files • Will contain controllers, views and models (MVC architecture) • To generate a bundle execute: • php app/console generate:bundle ICTCO 2013 - 2014
What has generate:bundle done??? ICTCO 2013 - 2014
Now we are good to go… • Configure link to database • app.config/parameters.yml ICTCO 2013 - 2014
Execute… • php app/console doctrine:mapping:convert annotation ./src • php app/console doctrine:generate:entitiesMyLibraryMainBundle • NOW WE ARE READY TO DEVELOP… ICTCO 2013 - 2014
Thank You!!! ICTCO 2013