Website Caching for n00bs « Web Development

Don't be a Caching Dummy - Read my Article!I finally installed a caching plugin for this site, because I know that I’m so awesome that any day now, millions of beautiful women will be clamoring to visit my website at the same time.  Some things you are just sure of.

While I wait for that day, it makes sense to have a caching plugin anyway.  Let’s count the reasons:

  1. It’s super easy, so time investment costs almost nothing,
  2. I’m on shared hosting, so every saved bit counts,
  3. Caching makes everything faster even when traffic is low, and
  4. I never know when I may actually write something useful, and thousands of denziens from the across the Internet will come and bring my poor little Dreamhost server to its knees.

So what is caching anyway?

Read more

CodeIgniter on the Command-Line « Web Development

Credit: http://www.flickr.com/photos/ripton/So, yesterday, I spent a few hours trying to create a robust command-line interface for one of my CodeIgniter applications.  I learned a lot about PHP-CLI.  I also came to remember why it’s a bad idea to try and fit a round peg in a square hole.

The thing is, CodeIgniter is a great little web framework.  See the key word in that sentence?  Yes, you can hack some CLI functionality in, but if you want to start doing fancy stuff like adding multiple levels of interactive menus and such, then its time to rethink what you’re doing.

On the other hand, there are many reasons to create a simple CLI-interface to your web application.  The main use would be for running of maintenance tasks and automated CRON scripts.  For this kind of task, it’s very easy to create a CLI entry-point for your app.

Read more

Playing with Asynchronous PHP Processing « Web Development

Picture Credit: konszvi at FlickrA subject that has intrigued me lately is this topic of asynchronous PHP processing.  The idea is you have a web application that includes a task which takes a long time, like, say processing video files or sending mass emails.  Your users should be able to click a button, get a notification that their job is waiting to be processed, and then go about their business.

I’ve run across all sorts of really cool queuing technologies, all of which have PHP libraries. So creating and managing job queues was no problem for me. My confusion was how to setup a worker script to process those queues. Read more

Gone is Gone: The Case Against “Delete” « Web Development

The Effects of Deleting DataI love, love, love getting rid of crap.  Maybe that’s why I like to read Unclutterer, or think that the 100 Things Challenge is such a great idea.  In real-life, I’m a minimalist, but when it comes to programming web apps, I’ve become a digital pack-rat.

I don’t care if my database grows into a giant data-monster, ready to ravage my server’s hard disk and slow queries down to a crawl; I’ll deal with it.  The key here is to not allow any important history of data to get lost.

Read more

« Previous PageNext Page »

Better Tag Cloud