Several components make up this web development environment.
PHP Fog and AppFog belong to the same company. Actually the PHP Fog project was renamed AppFog. I keep referring to both of them because they both have very informative websites. However, I’ll be registering at the AppFog website.
Web Development Workstation
Why a development workstation:
- I’m assuming I’ll be using AppFog as my host. However, before I finalize my decision to use it I need to make sure I’ll have the proper developer knowledge to work in the AppFog environment.
- I’ll use AppFog (which is an SaaS style web host.)
- They’ll make me choose a method for code updates: Git or manual.
- I’ll choose Git.
- I’ll need to have a firm understanding of where my files reside in production. The reason this is so important is that some of my scripts will maintain data in files on the file system. If the load balancer runs the same scripts off different servers then where are these (log or backup) files being stored. Will AppFog be assigning me special writable directories for this purpose?
- However, I want to use Git the way a pro does:
- keep development separate from production
- have snappy edit/test environment
- less uploading
- I may need a full development workstation. It all depends on what the common practice is with others who use Git, GitHub and AppFog.
Why use Git:
- can host a production copy of my code while maintaining a development copy at my workstation (using a Git client).
- PaaS hosting services have Git integration
- can facilitate collaboration if I use GitHub
There will be three copies of my file tree:
- production copy
- development workstation copy
- GitHub repository copy
Speed, redundancy and collaboration.
PHP Fog / AppFog
Why use PHP Fog:
- It is a PaaS hosing service.
- New Relic performance monitoring.
- Uses Cloud Foundry (initiated by VMware).
- Elastic computing
- Handle users from different places in the world.
- Integrates Git.
- Quickly set up a LAMP platform software.
- Easier upgrades of platform software.
- Cache layer for PHP code.
- Load balancing.
- Optimized PHP compiler (APC)
- locked down and secure server environment
- can make directories writable to apps which need it
- all apps get a primary and passive MySQL database
- the database slave gets used for app fail-over in case the primary server isn’t behaving properly
- can scale up the database storage space
- can upgrade to dedicated database server
“There are a few different best practices for Cloud Foundry than your normal hosting environment. The one I believe to be the most important is if your application needs to store uploaded files on the web server, you will need to use an external storage server or a CDN since Cloud Foundry is designed for static application files that are only pushed by the developer. See Cloud Foundry & NoOps.”