symfony workshop introductory slides

14
Ibuildings workshop Ibuildings Presentation Version 10 www.ibuildings.nl +31 118 429 550 [email protected] Ibuildings The PHP Professionals

Upload: stefan-koopmanschap

Post on 22-May-2015

3.394 views

Category:

Technology


3 download

DESCRIPTION

These slides only form a short theoretical introduction for a workshop I gave.

TRANSCRIPT

Page 1: Symfony workshop introductory slides

Ibuildings

workshop

Ibuildings Presentation

Version 10

www.ibuildings.nl+31 118 429 [email protected]

IbuildingsThe PHP Professionals

Page 2: Symfony workshop introductory slides

Monday, December 10, 2007

What will we do?

• Symfony installation• A short overview into the symfony structure• An introduction in the symfony CLI• Database model creation without phpMyAdmin• Creating a simple front-end• Creating a simple admin interface

• Any questions... just ask!

2

Page 3: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony installation

• We won’t do it, I’ll just tell about it ;)• PEAR

pear channel-discover pear.symfony-project.com pear install symfony/symfony

• SVN checkout externals

• Sandbox - no central installation

3

Page 4: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony structure

4

Page 5: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony structure

• Project global entity holds everything most of this outside the document root web/ directory should be document root

• Application Slightly less global entity A group of modules that together form an app Most common use: frontend and backend

• Module Specific functionality, mostly around one data entity For instance: “post” for the weblog post, “comment” for

comments to a weblog post But data might mix... comments to a post

5

Page 6: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony CLI

• Your development friend• Automates boring tasks like

initializing your project initializing applications and modules writing models altering models to reflect schema changes writing full administration interface writing basic (CRUD) actions deployment of your application

6

Page 7: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony CLI

7

Page 8: Symfony workshop introductory slides

Monday, December 10, 2007

Symfony CLI

• Most important beginner commands symfony init-project / symfony new symfony init-app / symfony app symfony propel-build-model symfony propel-build-sql / symfony propel-insert-sql symfony propel-generate-crud symfony init-module symfony propel-init-admin

• And slightly further ahead symfony plugin-install symfony freeze symfony sync

8

Page 9: Symfony workshop introductory slides

Monday, December 10, 2007

YAML

• YAML Ain't Markup Language• Simple, readable text format • Used widely in symfony for configuration

9

Page 10: Symfony workshop introductory slides

Monday, December 10, 2007

Creating your database

• Database schema is defined in YML config/schema.yml

10

Page 11: Symfony workshop introductory slides

Monday, December 10, 2007

Creating your database

• Ensure settings in config/propel.ini are correct• symfony propel-build-model• symfony propel-build-sql• symfony propel-insert-sql• or: symfony-propel-build-all• Configuring for your app:

config/databases.yml

11

Page 12: Symfony workshop introductory slides

Monday, December 10, 2007

Creating a simple frontend

• Creating an empty module symfony init-module frontend simple

• Creating a CRUD module symfony propel-generate-crud <app> <module>

<model> symfony propel-generate-crud frontend weblog Weblog

• Now you have your basic functionality But you won’t need everything

• visitors need not delete posts• visitors need not create posts (well, usually...)

So... refactoring

12

Page 13: Symfony workshop introductory slides

Monday, December 10, 2007

Creating a simple backend

• symfony propel-init-admin <app> <module> <model>

• symfony propel-init-admin backend weblog Weblog

• Module seems empty, but contains all usual admin functionality

• Still very flexible, with configuration: generator.yml

13

Page 14: Symfony workshop introductory slides

Monday, December 10, 2007

That’s it for the overview

• Now go to work!

14

source: http://www.flickr.com/photos/bobjagendorf/86120479/ - license: CC Attribution-No Derivative Works 2.0 Generic