PHP Meetup 30 April 2013

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

1. Your Magento is Speeding! by Ashish

1.1. Background

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

1.2. What is Magento

1.2.1. Open Source platform built on PHP Zend Framework

1.2.2. Acquired by eBay in 2011

1.2.3. Comes in 3 varients

1.2.3.1. Community

1.2.3.2. Magento Go

1.2.3.2.1. Hosted Magento

1.2.3.3. Enterprise Edition

1.2.4. Over 4 million downloads!

1.2.5. Flexible

1.2.6. Extendable

1.2.7. Modular

1.2.8. Upgradable

1.2.9. Scalable

1.3. Comparison with other eCommerce Platform

1.3.1. Growing huge trends

1.3.2. Team behind osCommerce is same!?

1.3.3. Magento is the leader in eCommerce Domain

1.4. People think Magento is Slow..Really?

1.4.1. Truth: Resource intensive

1.4.2. How to debug?

1.4.2.1. Identify server resources

1.4.2.1.1. is the cpu/mem etc enough?

1.4.2.2. Number of products, categories

1.4.2.2.1. how many SKUs etc

1.5. Solutions

1.5.1. Optimize Magento Configuration

1.5.1.1. Merge JS/CSS Files

1.5.1.1.1. Lower the requests

1.5.2. Compile Magento

1.5.2.1. lookup to only 1 location over multiple directories

1.5.2.2. Increase Magento Performance by 25-40%

1.5.2.3. Once enabled

1.5.2.3.1. no upgrade to store

1.5.2.3.2. no changes to core settings etc

1.5.2.3.3. decompile and compile again

1.5.2.4. Systems > Tools > Compilation

1.5.3. Disable Magento Logs

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

1.5.4. Enable Magento Cache

1.5.4.1. System > Cache Management

1.5.5. .htaccess configuration

1.5.5.1. Enable gzip compression

1.5.5.2. Use header expires

1.5.5.3. Enable Apache keepAlive

1.5.5.3.1. KeepAlive On

1.5.5.3.2. MaxKeepAliveRequests 100

1.5.5.4. Disable Etag

1.5.5.4.1. FileEtag None

1.5.6. Web server and browser configuration

1.5.6.1. Use Varnish Cache

1.5.6.2. Use PHP Accelerator

1.5.6.2.1. APC

1.5.6.2.2. Xcache

1.5.6.2.3. eAccelerator

1.5.6.3. Use CDN

1.5.6.4. Reduce External Sources

1.5.6.4.1. Images

1.5.6.4.2. iFrames

1.5.6.5. Deploy NginX or Litespeed

1.5.6.6. Don't use CHEAP hosting!

1.5.7. MySQL Configuration

1.5.7.1. Increase InnoDB buffer pool

1.5.7.1.1. innodb_buffer_pool_size = 512M

1.5.7.1.2. Less disk I/O means faster

1.5.7.2. Multithreading

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

1.5.7.2.2. Concurrent connections to the db tables

1.5.7.3. Enable query cache

1.5.7.3.1. query_cache_size = 32M

1.5.7.4. Enable sort buffer

1.5.7.4.1. sort_buffer_size = 4M

1.6. Tools for measuring performance

1.6.1. Magento Speed Tester

1.6.2. Speed Monitoring

1.6.2.1. Pingdom

1.6.2.2. http://mon.itor.us

1.6.3. Fooman Speedster

1.6.3.1. For combining and compressing and caching JS/CSS

1.6.4. Page cache Extension

1.6.4.1. Not in community edition

1.6.4.2. Works with Varnish Cache

1.6.4.3. Full Page Cache improves performance by 20%

1.7. Q&A

1.7.1. What kind of AWS Instance?

1.7.1.1. Minimum of 1GB Ram

1.7.2. Redmart uses Magento with AWS/Load Balancer

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

2. Automate Dev Environment Setups by Michael Cheng

2.1. Problems it solved

2.1.1. Focus on the important thing - writing code

2.1.2. Automated install

2.1.3. Synchronisation of project files with VM

2.2. What is it?

2.2.1. Development Virtual machines

2.2.2. Allow automated setup via Puppet or shell script

2.2.3. Spins up a VM with a base OS

2.2.3.1. Linux and Windows too!

2.2.4. Supports Plug-ins

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

2.3. Demo

2.3.1. Download Vagrant

2.3.1.1. Latest 1.2.2 for mac

2.3.2. Pick up a base OS

2.3.3. Download OS at Vagrantbox.es

2.3.4. Common Vagrant Commands

2.3.4.1. vagrant box add name url

2.3.4.2. vagrant init name

2.3.4.3. vagrant box list

2.3.4.4. vagrant up

2.3.4.5. vagrant suspend

2.3.4.6. vagrant reload

2.3.4.6.1. restart the OS

2.3.4.7. vagrant destroy

2.3.4.8. vagrant ssh

2.3.4.8.1. Login to the VM

2.3.4.9. vagrant provision

2.3.4.9.1. Runs the provisioning script without reload

2.3.5. Cheap Virtual machines

2.4. Provisioning Script

2.4.1. Puppet

2.4.1.1. Vagrant Provisioning Script by Michael

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

2.4.1.2. Puppet Forge

2.4.2. Chef

2.4.3. Puppet / Chef are already built into Vagrant boxes

3. Why you should use PhpStorm! by Arul Kumuran

3.1. PHP Development with PhpStorm

3.2. By JetBrains

3.3. Free for Open Source Development

3.4. PhpStorm includes Webstorm

3.5. Composer Integration

3.5.1. Easily setup a composer project

3.5.2. Add dependancies easily

3.5.3. Plenty of Packages available Packagist.org

3.6. Deployment

3.6.1. Configure FTP!

3.6.2. Upload on save

3.6.3. Compare files between server and local version

3.7. Show changes / undo changes

3.8. Version control built in

3.8.1. Show changes

3.8.2. VCS History etc

3.9. Built in coding standards in PhpStorm

3.9.1. Eg. 4 spaces, 2 spaces

3.10. Great tool to take the 30 days trial!