Introduction to Flow3

31

description

The Presentation was hold during BarCamp Phnom Penh 2011.

Transcript of Introduction to Flow3

Page 1: Introduction to Flow3
Page 2: Introduction to Flow3

Keo Visay

Certified TYPO3 Integrator

Head of TYPO3 Cambodia Community

From Takhmao, Kandal

Like TYPO3 Coding

Working at Web Essentials

Page 3: Introduction to Flow3

Web Essentials Team

Page 4: Introduction to Flow3

What is FLOW3?

Page 5: Introduction to Flow3

What is FLOW3?

PHP-based Web Application Platform

Creates excellent web solutions

Fast results!

keep your head clear and let you focus on the essential parts

Reliable foundation for complex applications

Page 6: Introduction to Flow3

Why FLOW3?

Well-suited for enterprise-grade applications

Easy-to-read source code

Stability, Security, Performance

User experience

Backed by one of the biggest PHP communities (6000+ contributors)

Page 7: Introduction to Flow3

FLOW3 Core Team

Page 8: Introduction to Flow3

FLOW3 Advanced Features

Supports Domain-Driven Design

Object Persistence with Doctrine2

Test-Driven Development

Continuous Integration

Dependency Injection

Foundation for the TYPO3 Content Management System

Standalone packages of FLOW3 can turn to TYPO3 CMS plugins easily

Page 9: Introduction to Flow3

FLOW3 – The Rocket Science

Page 10: Introduction to Flow3

FLOW3 Framework Submodules

Page 11: Introduction to Flow3

FLOW3 – The Rocket Science

Page 12: Introduction to Flow3

Requirements

Server Environment

Supported Operating Systems:

Linux

Mac OSX

Windows

Page 13: Introduction to Flow3

Requirements

Supported HTTP server platforms:

Apache 2 (recommended)

NGINX (experimental)

IIS (experimental)

Page 14: Introduction to Flow3

Requirements

PHP:

Requires PHP 5.3.2 or higher

Supported Database Systems:

All systems supported by Doctrine2 can be used with FLOW3

Page 15: Introduction to Flow3

Installation

Download http://flow3.typo3.org/download.html

Setting correct file permission

./flow3 core:setfilepermissions visay www-data www-data

Add command line user to the web server group

sudo usermod -a -G www-data visay

Page 16: Introduction to Flow3

Installation

Configure your VirtualHost

Testing your installation

<VirtualHost *:80>

DocumentRoot /var/www/barcamp/Web/

ServerName barcamp.flow3

SetEnv FLOW3_CONTEXT Development

<Directory /var/www/barcamp/>

AllowOverride All

</Directory>

<IfModule mod_negotiation.c>

# prevents Apache's automatic file negotiation, it breaks resource URLs

Options -MultiViews

</IfModule>

</VirtualHost>

Page 17: Introduction to Flow3

FLOW3 Welcome Screen

Page 18: Introduction to Flow3

Demo Application

The Blog Example

Page 19: Introduction to Flow3

Kickstart Your First Application

./flow3 kickstart:package Visay.Demo Packages/

Application/

Visay.Demo/

Classes/

Configuration/

Meta/

Resources/

Tests/

Page 20: Introduction to Flow3

Hello World?

Packages/Application/Visay.Demo/Classes/Controller/

Page 21: Introduction to Flow3

User Input

Page 22: Introduction to Flow3

Database Setup

Configuration/Settings.yaml

Page 23: Introduction to Flow3

Doctrine Migrate

./flow3 doctrine:migrate

Page 24: Introduction to Flow3

Storing Objects

./flow3 kickstart:actioncontroller --generate-actions --generate-related Visay.Demo Customer

Created .../Visay.Demo/Classes/Domain/Model/Customer.php

Created .../Visay.Demo/Classes/Domain/Repository/CustomerRepository.php

Created .../Visay.Demo/Classes/Controller/CustomerController.php

Created .../Visay.Demo/Resources/Private/Layouts/Default.html

Created .../Visay.Demo/Resources/Private/Templates/Customer/Index.html

Created .../Visay.Demo/Resources/Private/Templates/Customer/New.html

Created .../Visay.Demo/Resources/Private/Templates/Customer/Edit.html

Created .../Visay.Demo/Resources/Private/Templates/Customer/Show.html

Page 25: Introduction to Flow3

Application Context

The FLOW3 Framework can be launched in different application contexts (a set of configuration)

Production

Development

Testing

Staging

More contexts may be defined by just adding configuration

Page 26: Introduction to Flow3

Packages

FLOW3 is a package-based system, even FLOW3 itself

Packages act as a container for different matters

Contain PHP code which adds certain functionality

Contain documentation

Consist of templates, images or other resources.

Page 27: Introduction to Flow3

Application Fine-tuning

Form validation

Action Route

Route Part Handlers

Page 28: Introduction to Flow3

Questions ???

Page 29: Introduction to Flow3

References

http://flow3.typo3.org/

Page 30: Introduction to Flow3
Page 31: Introduction to Flow3

Thank you!