This document discusses how to develop PHP apps faster for the enterprise. It recommends automating deployment, implementing continuous integration and testing, and shifting testing left to catch bugs earlier. Automating infrastructure is also important to fully rebuild environments automatically after failures. Upcoming episodes will cover high availability, performance optimization, and other topics. Faster deployment cycles through automation can enable faster application development and feedback from users.
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Developing apps faster
1. Building the perfect PHP app for the enterprise
Episode 2 : Developing apps
faster
Maurice Kherlakian
Twitter: @mkherlakian
Email: maurice.kherlakian@roguewave.com
2. 2
Series overview
Now: Developing apps faster
September 28: Resolving problems and high availability
Your reputation as a miracle worker is secure when using these principles to
isolate faults, optimize scale, and synchronize sessions across clusters.
October 12: Optimizing performance
Keep users on your site by learning how to use background jobs and caching,
measure performance, and make data-driven decisions.
8. 8
Faster deployment cycles benefits
• Faster feedback from your
end users
• Faster development
• More iterations
• Better product overall
Faster
deployment
cycles
Faster
application
development
=
10. 10
WaterGile anyone?
• Teams within an organization subscribing to Agile methodology
• Teams often isolated – entire company didn’t buy into Agile methodologies
• Still gather requirements, but break the down into user stories
11. Poll #2:
What development
practice do you follow?
• Waterfall principles
• A combination f waterfall and Agile
(WaterGile – AgileFall)
• Mainly Agile principles
15. 15
You’ve just released a feature
Add a map display of all
available cars to rent in a
10 km radius
Released to everyone
Impact?
Overload – servers down, root
cause unknown
PANIC!
16. 16
You’ve just released a feature to some
users
Add a map display of all
available cars to rent in a
10 km radius
Released to 20% of users
Impact – compare with other
80% through app monitoring
system
Change in CPU consumption
profiles for same amount of
users
Fix or turn feature off
17. 17
Tools that can help
• Instrument your code
– PHP feature toggle (qandidate-toggle - ) – release to a subset of users
• Zend Server Monitoring – a complete solution to monitor the behavior of
your application – so you will catch the 20% spike in CPU usage
18. 18
It’s working… ramp it up!
Add a map display of all
available cars to rent in a
10 km radius
Released to 50% of users
10% more rentals per visitor on
version with map
Little to no change in
performance
Release to everyone
24. 24
What is a CI server?
• CI automates the various tasks of building, packaging,
testing and deploying
• If build breaks, up to developer that broke it to fix it
• If build passes, it CAN go all the way to production
25. 25
A typical CI pipeline
Git clone
Composer
install
Unit test Package
Deploy to test Functional test
Deploy to
Staging
Deploy to prod
Add a map display of all
available cars to rent in a
10 km radius
34. 34
Add a map display of all
available cars to rent in a
10 km radius
Simulate a browser request and ensure that a map loads,
and that the map has the number of vehicles available for
rent
Functional
getCars($criteria, $radius)
$map->plotCoordinates($cars)
$modelView->assign(‘map’, $map)
Unit
Load 1,000 concurrent search requests
for cars from 1000 different locations Load
42. 42
Catch bugs early
• Remember how a bug in prod can cost as much as 15X times the cost of a
bug in development?
43. 43
How do you catch bugs early?
• Test early, test often – when
developing, test locally before
committing
• Peer reviews
• Code instrumentation tools
45. 46
Infrastructure should also be
automated
• Automate server provisioning
• Source control your environment configurations
• The goal is to fully rebuild an environment automatically
in case of failure
46. 47
Another example – dealnews.com
• In the past 2 weeks
– Deployed web application 64 times – average 6.5 times a day
– Deployed configuration management changes 12 times
– Deployed MySQL schema changes 13 times
- Courtesy of Brian Moon
48. 49
Learn more
• Watch this webinar on demand
• Read the recap blog to see the results of
the polls and Q&A session
49. 50
Stay tuned
September 28: Resolving problems and high availability
Your reputation as a miracle worker is secure when using these principles to
isolate faults, optimize scale, and synchronize sessions across clusters.
October 12: Optimizing performance
Keep users on your site by learning how to use background jobs and caching,
measure performance, and make data-driven decisions.
50. Building the perfect PHP app for the enterprise
Episode 2 : Developing apps
faster
Maurice Kherlakian
September 14, 2016
Hinweis der Redaktion
At what frequency do you deploy?
Multiple times in a day
Once a day
Once a week
Once a month
Once a quarter
Once a year