A Multi-agent System for Information Retrieval

Information and Communication Technologies Coordinating Office
Mobile App Club
(An introduction to Symfony)
Briland Hitaj
ICTCO, 08.05.2014
2013 - 2014
Presentation Outline




What is Symfony
Use a Framework??!! WHY???
Ok, but why Symfony???
Let’s get started (Library Project)
ICTCO 2013
2
What is Symfony???



Open Source PHP Web applications development framework
Developed by Sensiolabs
Licensed under MIT Open Source License
ICTCO 2013 - 2014
3
Use a Framework??!! WHY???


Code and File Organization
Utilities and Libraries




The MVC Pattern




Form validation
Input/output filtering
Database Abstraction etc…
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
4
OK, but why Symfony???




Fast
Flexible
Expandable (bundles)
Stable
ICTCO 2013 - 2014
5
Let’s get started

First Download Symfony from http://symphony.com/download
ICTCO 2013 - 2014
6
Download composer

Download COMPOSER.PHAR from https://getcomposer.org/
ICTCO 2013 - 2014
7
Project Structure
ICTCO 2013 - 2014
8
Execute

php composer.phar update


Install the latest and necessary bundles
php composer.phar selfupdate

Periodically get the latest composer.phar distribution
ICTCO 2013 - 2014
9
ICTCO 2013 - 2014
10
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
11
What has generate:bundle done???
ICTCO 2013 - 2014
12
Now we are good to go…

Configure link to database

app.config/parameters.yml
ICTCO 2013 - 2014
13
ICTCO 2013 - 2014
14
Execute…

php app/console doctrine:mapping:convert annotation ./src
php app/console doctrine:generate:entities MyLibraryMainBundle

NOW WE ARE READY TO DEVELOP…

ICTCO 2013 - 2014
15
ICTCO 2013 - 2014
16
ICTCO 2013
17