際際滷

際際滷Share a Scribd company logo
Enterprise PHP
WITH SYMFONY2
Who am I
Eduard Trayan
Software engineer
Stream coordinator at TC of Belarusian HTP
Zend PHP 5.3 Certified developer
SensioLabs Certified Symfony Developer
eduardtrayan@gmail.com
eduard.trayan
2
Agenda
 Enterprise software
 PHP role in enterprise software
 Why symfony was created for
enterprise?
 Example of project structure &
workflow
3
Enterprise
software
4
Definition #1
Purpose-designed computer software.
Satisfying the needs of an organization
rather than individual users.
http://en.wikipedia.org/wiki/Enterprise_software
5
Definition #2
Display, manipulation, and storage of large
amounts of often complex data.
Support or automation of business processes
with that data.
Martin Fowler
6
Attributes
Reliability
Productivity
Scalability
Security
7
First idea
8
What about PHP?
9
PHP
10
Definition
Server-side scripting language, designed for
web development.
Also used as a general-purpose programming
language.
http://en.wikipedia.org/wiki/PHP
11
Evolution
1995
 Personal needs
2003
 Simple websites
 Content management
 Blogs
2015
 Big websites
 Banks
 Social networks
 Online accounting
 Insurance
12
PHP today
Open source
Community
Backing
Ecosystem & tools
Security
Standards
13
Open source
https://github.com/php
14
Community
http://php.net/credits.php
15
Backing
16
Ecosystem & tools
17
Security
http://php.net/manual/en/boo
k.password.php
https://security.sensiolabs.org
18
Standards
http://www.php-fig.org
19
Attributes
Flexibility
Easy integration
Quickness
Availability of personnel
20
But PHP is just a building
material
21
Result depends on team and
tools
22
Symfony 2
23
Definition
PHP web application
framework for MVC applications.
Free software and released under the MIT
license.
https://en.wikipedia.org/wiki/Symfony
24
Goals
Speeding up the creation and maintenance
of web applications and to replace repetitive
coding tasks.
Building robust applications in an enterprise
context.
Giving developers full control over the
configuration.
https://en.wikipedia.org/wiki/Symfony
25
Enterprise attributes
Reliability
Productivity
Scalability
Security
26
And some other advantages
Backing
Maintenance and support
Community
Standards
Completed solutions
27
So big guys choose symfony
28
Example of
project structure
& workflow
29
Priority order
30
Environment Build
Continuous
integration
Deployment
Environment
31
Main technologies
 Standard de-facto
 High perfomance
Nginx
 Because nginx PHP-fpm
 Based on requirements
 Percona linux-only
MySQL/
Percona/
MariaDB
32
Other possible technologies
33
Git Composer RabbitMQ
ElsaticSearch/Sphinx Memcache/Redis Varnish
MongoDB Node.js
Servers
Dev
QA
Production
34
Orchestration
35
Ansible Puppet Chef
Custom
Build
36
Tools
Written in PHP
Extendable via PHP
Platform-independent
No external dependencies
Ant config syntax
37
Main build targets?
38
Local build
before commit CI build
Package Deploy
Local & CI build tasks
Composer-specific
 install
General
 Validate code
 Following standards
 Unit tests
 Create documentation
Symfony specific
 Cache
 Assets
 Migrations
 Fixtures
39
Package tasks
Create artifcats
tar.gz archive
Platform package (apt, yum)
Custom
Database scheme
40
Deploy tasks
41
Enable/disable maintenance mode
Deploy artifacts
Download previous metadata
Clean previous releases
Rollback
Continuous
integration
42
Tools
Free
Open source
Enterprise
Lot of plugins
43
Deployment
44
Tools
Symfony specific
Based on Capistrano
Open source
Multistage
Maintenance mode
45
Workflow (1/2)
46
Enable maintenance mode
Download database backup
Deploy artifcats
Restart services
Symfony specific tasks
Workflow (2/2)
47
Disable
maintenance mode
Clean old
releases
Ways of interaction
User
Jenkins
Phing
Capifony
48
Questions?
49

More Related Content

Enterprise PHP with Symfony2