PHP Meetup 30 April 2013

Get Started. It's Free
or sign up with your email address
Rocket clouds
PHP Meetup 30 April 2013 by Mind Map: PHP Meetup 30 April 2013

1. Automate Dev Environment Setups by Michael Cheng

1.1. Problems it solved

1.1.1. Focus on the important thing - writing code

1.1.2. Automated install

1.1.3. Synchronisation of project files with VM

1.2. What is it?

1.2.1. Development Virtual machines

1.2.2. Allow automated setup via Puppet or shell script

1.2.3. Spins up a VM with a base OS

1.2.3.1. Linux and Windows too!

1.2.4. Supports Plug-ins

1.2.4.1. eg. to spin up VMWare / AWS instances etc

1.3. Demo

1.3.1. Download Vagrant

1.3.1.1. Latest 1.2.2 for mac

1.3.2. Pick up a base OS

1.3.3. Download OS at Vagrantbox.es

1.3.4. Common Vagrant Commands

1.3.4.1. vagrant box add name url

1.3.4.2. vagrant init name

1.3.4.3. vagrant box list

1.3.4.4. vagrant up

1.3.4.5. vagrant suspend

1.3.4.6. vagrant reload

1.3.4.6.1. restart the OS

1.3.4.7. vagrant destroy

1.3.4.8. vagrant ssh

1.3.4.8.1. Login to the VM

1.3.4.9. vagrant provision

1.3.4.9.1. Runs the provisioning script without reload

1.3.5. Cheap Virtual machines

1.4. Provisioning Script

1.4.1. Puppet

1.4.1.1. Vagrant Provisioning Script by Michael

1.4.1.1.1. https://github.com/miccheng/vagrant-lamp-centos63

1.4.1.2. Puppet Forge

1.4.2. Chef

1.4.3. Puppet / Chef are already built into Vagrant boxes

2. Why you should use PhpStorm! by Arul Kumuran

2.1. PHP Development with PhpStorm

2.2. By JetBrains

2.3. Free for Open Source Development

2.4. PhpStorm includes Webstorm

2.5. Composer Integration

2.5.1. Easily setup a composer project

2.5.2. Add dependancies easily

2.5.3. Plenty of Packages available Packagist.org

2.6. Deployment

2.6.1. Configure FTP!

2.6.2. Upload on save

2.6.3. Compare files between server and local version

2.7. Show changes / undo changes

2.8. Version control built in

2.8.1. Show changes

2.8.2. VCS History etc

2.9. Built in coding standards in PhpStorm

2.9.1. Eg. 4 spaces, 2 spaces

2.10. Great tool to take the 30 days trial!

3. Your Magento is Speeding! by Ashish

3.1. Background

3.1.1. Past years worked alot on all the different eCommerce platforms

3.2. What is Magento

3.2.1. Open Source platform built on PHP Zend Framework

3.2.2. Acquired by eBay in 2011

3.2.3. Comes in 3 varients

3.2.3.1. Community

3.2.3.2. Magento Go

3.2.3.2.1. Hosted Magento

3.2.3.3. Enterprise Edition

3.2.4. Over 4 million downloads!

3.2.5. Flexible

3.2.6. Extendable

3.2.7. Modular

3.2.8. Upgradable

3.2.9. Scalable

3.3. Comparison with other eCommerce Platform

3.3.1. Growing huge trends

3.3.2. Team behind osCommerce is same!?

3.3.3. Magento is the leader in eCommerce Domain

3.4. People think Magento is Slow..Really?

3.4.1. Truth: Resource intensive

3.4.2. How to debug?

3.4.2.1. Identify server resources

3.4.2.1.1. is the cpu/mem etc enough?

3.4.2.2. Number of products, categories

3.4.2.2.1. how many SKUs etc

3.5. Solutions

3.5.1. Optimize Magento Configuration

3.5.1.1. Merge JS/CSS Files

3.5.1.1.1. Lower the requests

3.5.2. Compile Magento

3.5.2.1. lookup to only 1 location over multiple directories

3.5.2.2. Increase Magento Performance by 25-40%

3.5.2.3. Once enabled

3.5.2.3.1. no upgrade to store

3.5.2.3.2. no changes to core settings etc

3.5.2.3.3. decompile and compile again

3.5.2.4. Systems > Tools > Compilation

3.5.3. Disable Magento Logs

3.5.3.1. System > Configuration > Advanced > Developer (Log settings)

3.5.4. Enable Magento Cache

3.5.4.1. System > Cache Management

3.5.5. .htaccess configuration

3.5.5.1. Enable gzip compression

3.5.5.2. Use header expires

3.5.5.3. Enable Apache keepAlive

3.5.5.3.1. KeepAlive On

3.5.5.3.2. MaxKeepAliveRequests 100

3.5.5.4. Disable Etag

3.5.5.4.1. FileEtag None

3.5.6. Web server and browser configuration

3.5.6.1. Use Varnish Cache

3.5.6.2. Use PHP Accelerator

3.5.6.2.1. APC

3.5.6.2.2. Xcache

3.5.6.2.3. eAccelerator

3.5.6.3. Use CDN

3.5.6.4. Reduce External Sources

3.5.6.4.1. Images

3.5.6.4.2. iFrames

3.5.6.5. Deploy NginX or Litespeed

3.5.6.6. Don't use CHEAP hosting!

3.5.7. MySQL Configuration

3.5.7.1. Increase InnoDB buffer pool

3.5.7.1.1. innodb_buffer_pool_size = 512M

3.5.7.1.2. Less disk I/O means faster

3.5.7.2. Multithreading

3.5.7.2.1. innodb_thread_concurrency = 2 x [# of CPUs] + 2

3.5.7.2.2. Concurrent connections to the db tables

3.5.7.3. Enable query cache

3.5.7.3.1. query_cache_size = 32M

3.5.7.4. Enable sort buffer

3.5.7.4.1. sort_buffer_size = 4M

3.6. Tools for measuring performance

3.6.1. Magento Speed Tester

3.6.2. Speed Monitoring

3.6.2.1. Pingdom

3.6.2.2. http://mon.itor.us

3.6.3. Fooman Speedster

3.6.3.1. For combining and compressing and caching JS/CSS

3.6.4. Page cache Extension

3.6.4.1. Not in community edition

3.6.4.2. Works with Varnish Cache

3.6.4.3. Full Page Cache improves performance by 20%

3.7. Q&A

3.7.1. What kind of AWS Instance?

3.7.1.1. Minimum of 1GB Ram

3.7.2. Redmart uses Magento with AWS/Load Balancer

3.7.3. Why every upgrade in Magento breaks Template / Layout?