Sublime Text 2 is an amazing code editor that I started using on the recommendation of a friend. I fell in love and haven’t looked back. Here are some recomendations for setting up Sublime Text 2 for PHP and WordPress development.
Continue reading “Sublime Text 2 for PHP & WordPress Development” »
Latest Posts
Custom User Providers in Symfony2
Why Custom User Providers?
At my current job all the database systems are managed by DB admins and the developers have to connect to the database via web services. We do not connect to the databases directly. This allows for better separation of concerns and allows experts to focus on their respective specialties. But if you are programming a Symfony2 app, that means you don’t get to use Doctrine or any other ORM, which in turn means you create your own models/entities.
When you want to develop the authentication parts of your new app you will quickly find that there is plenty of documentation for Doctrine/ORM based apps, but if you are using your own custom models then you run into pages like this one. (when I finish this post I will submit an article to the docs and see if they approve it) UPDATE: Someone beat me to it, there is now a good tutorial in the Symfony docs for custom user providers.
Why I Switched to Symfony 2 Framework
I have been working with the Zend Framework for the last 3 years. I like it. It is flexible, heavily object oriented, and organized. However, one thing that has always bothered me is that modules in ZF have been second-class citizens. Granted, in Zend Framework 2 this is not the case, but I needed to start a project right away, and since ZF2 is still in beta, I decided to go checkout some other frameworks again.
Continue reading “Why I Switched to Symfony 2 Framework” »
Siege Testing Your Site Behind a Login
I use Siege to test my web applications and get an idea of how much traffic they can sustain. It is a great tool and I suggest you read more about it here.
A few days ago, I needed to test a part of my application that was behind a login. I hit up UPHPU user group on IRC, and Carmony (a master website optimizer) suggested logging in on my browser and then hijacking the session in siege by setting header values. That is a great idea, but seems overly difficult. I doubted that I was the only one that ever wanted to do this. Isn’t there an easier way?
Continue reading “Siege Testing Your Site Behind a Login” »
Getting Started With Plivo
The open-source telephony development world has been changing drastically over the last 2 years. Projects like FreeSWITCH allow you to create simple phone applications with XML files, but until recently, advanced applications required a solid knowledge of the Erlang language. Then enters Twilio– which allows any web developer to make advanced telephony apps in the web language of their choice. But with Twilio’s pricing structure, you are looking at anywhere from 2 to 4 cents per minute IN ADDITION to your VOIP service while also being locked-in to their cloud. Must I learn Erlang if I want to make cool telephony apps for free?
Continue reading “Getting Started With Plivo” »
Speed Up Your WordPress Development Cycle With Git
If you have developed WordPress sites for clients this process might sound familiar to you:
- Get a new client that wants a wordpress site
- Download the most recent wordpress
- Find a good current blank wordpress theme to start implementing the design
- Upload to a staging server to for client to see
- Client requests changes
- You make changes on local server, then upload to staging server
- Repeat last three steps until finished and then you deploy the site to live
After lots of trial and error, I have come up with a process that is more efficient, and allows rapid development of wordpress sites. I use Git, Git Submodules, and WordPress child themes to get going quicker and keep code up to date with minimal effort. (If your not using a revision control system like Git or SVN for development, then check out this funny question and answer session on Stack Overflow)
Continue reading “Speed Up Your WordPress Development Cycle With Git” »
Wildcard Sub-Domains on OSX, Web Development on Localhost
Today’s post will be on setting up wildcard subdomains in OSX. This allows you to map folders in your web root to sub-domains on your local box. Why would you want to do this? It is nice to be able to type use http://myproject.clint.dev for the URL and have it map to the ‘myproject’ folder on your local box. No need to add a line to the etc/hosts file, and no need to add a virtual host in apache for each sub-domain. The method I will be outlining here will allow you to map x.yourdevdomain.dev to any folder ‘x’ using Bind and a wildcard virtual host in apache. This tutorial assumes you already have Apache setup on your local box.
Continue reading “Wildcard Sub-Domains on OSX, Web Development on Localhost” »
Zend Studio and Git(Hub)
I have been using Zend Studio as my IDE for years, and for version control I have always used SVN. Zend Studio Eclipse plays very nicely with SVN out of the box, but lately it seems Git has gained a lot of momentum so I thought I would look into it. It turns out Git is awesome and is much better suited for many of the things I do. (See: Why Git?)
But will Git play nicely with Zend Studio 8?
Thanks to eclipse plugins, you bet it will! Continue reading “Zend Studio and Git(Hub)” »
MongoDB Base Model for Zend Framework
I came accross MongoDB a few months ago and it seemed like a perfect fit for many of the projects I am working. Extremely fast inserts, map-reduce for complex queries, and most importantly, scaling is a breeze.
Since I am a Zend Framework guy I created a simple base model class for MongoDB. It is a very simple wrapper, but is effective for what I need. I usually create model classes for each “Collection” just like I would create models for each table in MySQL. Each model class extends from the new MongoDB base class and allows a low level “active directory” type access to MongoDB documents.
Continue reading “MongoDB Base Model for Zend Framework” »
Zend Framework Code Generator With Scaffolding – ZFcodo
Update: This project is now hosted at my GitHub account.
While I am a huge fan of Zend Framework, I miss having the code generation that is bundled with other frameworks I use. Since my favorite codegen/ORM is from the Qcubed project, I decided to take the Qcubed code generator and customize it for Zend Framework.
Continue reading “Zend Framework Code Generator With Scaffolding – ZFcodo” »