Admin Generator It's RAD baby! Admin Generator It's RAD baby! - - PowerPoint PPT Presentation

admin generator
SMART_READER_LITE
LIVE PREVIEW

Admin Generator It's RAD baby! Admin Generator It's RAD baby! - - PowerPoint PPT Presentation

Admin Generator It's RAD baby! Admin Generator It's RAD baby! Rapid Application Development Who am I, and what do I do? Ian P. Christian (aka. pookey) Coding PHP for about 8 years Work for VoIP.co.uk Involved with symfony and


slide-1
SLIDE 1

Admin Generator

It's RAD baby!

slide-2
SLIDE 2

Admin Generator

It's RAD baby! Rapid Application Development

slide-3
SLIDE 3

Who am I, and what do I do?

 Ian P. Christian (aka. pookey)  Coding PHP for about 8 years  Work for VoIP.co.uk  Involved with symfony and Doctrine  My website: http://pookey.co.uk

slide-4
SLIDE 4

About this presentation

 Based on sf1.0  CRUD  Admin Generator  sfExtJsThemePlugin  Questions and maybe some answers

slide-5
SLIDE 5

Why Bother?!

Doing it yourself is easy! The admin generator has a learning curve The admin generator is slow

slide-6
SLIDE 6

Reasons to use it

 Well documented  Well Tested  Reduced time to market  Because it's cool!

slide-7
SLIDE 7

Welcome to the Farm

 We have Farms  A Farm can contain many Barns  We have Animals  A Barn can contain Many Animals  Animals can by in many Barns

slide-8
SLIDE 8

Assumptions

 You have sf1.0 or sf1.1 installed  You have a project configured  You have a 'backend' application  You have configured your database.yml  You're using Propel 1.2

slide-9
SLIDE 9

CRUD: Lets make a farm!

application module model

slide-10
SLIDE 10

Show me the code!

slide-11
SLIDE 11

What about templates?

slide-12
SLIDE 12

That's useless!

But... I can change my modelz?

Sorry Spoon Cat, no! If you want that, you'll have to keep listening!

slide-13
SLIDE 13

A better CRUD

application module model

slide-14
SLIDE 14

The generated CRUD

List Edit/Create/Delete View

slide-15
SLIDE 15

The generated CRUD action

WTF? Where's the code!!

slide-16
SLIDE 16

The real code

cache/backend/prod/modules/autoFarm/actions/actions.class.php

slide-17
SLIDE 17

generator.yml

slide-18
SLIDE 18

Wow, how cool!

Lolz, that's cool!! What else can symfony do to help me work less?

slide-19
SLIDE 19

init-admin

application module model

slide-20
SLIDE 20

The generated module

slide-21
SLIDE 21

generator.yml

 generator.yml is the heart of the admin

generator

 Lots of options, too many to cover here

slide-22
SLIDE 22
slide-23
SLIDE 23

Validation

(yes,the vim highlighting of YAML isn't perfect!)

slide-24
SLIDE 24

The error

slide-25
SLIDE 25

What does a cow look like?

 Add 'picture' to the schema.yml  Regenerate the model  We only need to change the generator.yml

and add validation

slide-26
SLIDE 26

Updated validation

slide-27
SLIDE 27

Updated generator.yml

slide-28
SLIDE 28

What it looks like

slide-29
SLIDE 29

Improving our list

slide-30
SLIDE 30

Improving our list

apps/backend/modules/animal/config/generator.yml

slide-31
SLIDE 31

Improving our list

apps/backend/modules/animal/templates/_picture.php

slide-32
SLIDE 32

The improved list

slide-33
SLIDE 33

Relationships

slide-34
SLIDE 34

Adding a Barn

slide-35
SLIDE 35

Adding a barn

What is '1'?!

slide-36
SLIDE 36

Improved Barn

slide-37
SLIDE 37

Many-to-Many

slide-38
SLIDE 38

Many-to-many

slide-39
SLIDE 39

Improving our Animal Form

apps/backend/modules/animal/templates/_legs.php.html apps/backend/modules/animal/config/generator.yml

slide-40
SLIDE 40

Improving our Animal Form

apps/backend/modules/animal/actions/actions.class.php

slide-41
SLIDE 41

Improving our Animal Form

slide-42
SLIDE 42

Filtering

slide-43
SLIDE 43

Filtering

slide-44
SLIDE 44

Advanced Filtering

apps/backend/modules/animal/templates/_num_legs.php apps/backend/modules/animal/config/generator.yml

slide-45
SLIDE 45

Advanced Filtering

slide-46
SLIDE 46

Adding Animals to the Barn List

slide-47
SLIDE 47

Specifying a Peer Method

slide-48
SLIDE 48

What else can it do?

 Integration with credentials  I18N is possible  Rich text editor  Rich date editor

slide-49
SLIDE 49

sfExtJsThemePlugin

 Contains: Generator + Theme  View (js) requests data (json) at the user  More interactive user interface  Designed to create web-applications  Capable of:

 Lazy loads views (edit/list/filter-panels)  Packing and minifying automatically

slide-50
SLIDE 50

The Future!

 New Form API – easier to extend  Propel & Doctrine support  Themable  I18N  Better upload

 http://trac.symfony-project.org/

wiki/SprintSymfony12AdminGenerator

slide-51
SLIDE 51

Questions?

 Thanks to...some people....