CakePHP vs. Ruby On Rails – A Very Bias Look at Why I Choose CakePHP

First of let me state that this post is very bias towards CakePHP. Truth be told, I haven’t even installed or used Ruby on Rails. The closest I’ve come is looking at various code snippets I’ve found around. With that said, you may want to stop reading now.

These arguments are not based on hard facts, since I haven’t done much research on the matter. A lot of them come from a post at Clickable Bliss discussing the PHP vs. Ruby On Rails Issue.

  1. Steep Learning Curve - Laziness

One thing I really hate is learning stuff. It is especially bothersome when you're trying to crank out a project or web application in a limited amount of time.

With CakePHP I'm required to learn about the **MVC style of development** as well as CakePHP **conventions**.

With Ruby on Rails, I would have to learn MVC, Ruby on Rails conventions and I would have to s**tart from scratch with the Ruby programming language** as well.

Cute CakePHP Trick of the Day – GenerateList Empty Slot In List

With this post I’m introducing a new segment to this blog: Cute CakePHP Trick of the Day. This is basically going to be a learn as I learn sort of thing. There are always a bunch of little things that I want to do in CakePHP, but just haven’t figured out. So every time I stumble onto something, I’ll let you guys in on it. I love the GenerateList() function. This is generally used when you have models with associations with other models.

AJAX and JavaScript Date Pickers

One thing which I usually find quite annoying is using input boxes in forms for user entered dates. Having the user manually enter date, day, month, year seems so 1997 to me. However in the interest of time, this is what most programmers slap into the web applications simply because it’s easier to produce and easier to maintain. Well here’s a handful of solutions that can solve that problem for you.

Need To Find A Dentist

I guess the thing with me is that I’m just so lazy. There’s not much else to it. Even with the world wide web sitting at my finger tips damn near anytime I please, I still haven’t taken the time to do what I should have done months ago, which is to find a local Dentist. Being in college for almost four (4) years has made me even lazier. The was only one dentist and that was in the on campus dental clinic.

Automate MySQL Database Backup With WebCron – No Cron Jobs? No Problem – Part 2

Got The Cron Web Cron is a great method of automating tasks on your server if you’re not blessed with cron jobs. However, after writing this I stumbled onto something that may fit your needs a bit better; Remote Cron is that service. It’s everything Web Cron is and more: It’s Totally Free It’s in English What more can you ask for? Yeah, I know, my standards are really low.

See How Easily You Can Increase Page Load Time 10 Fold With jQuery

Introduction

It’s no new news to us that images hurt a page’s load time worst then anything out there. There are a lot of things you can do to try and alleviate some of the problem. You can use smaler images, you can reduce the quality on images, etc.

But consider this. You know that your website is going to a long one. Meaning that the user is going to have to scroll. This means that they don’t see the entire page when they first load. Wouldn’t it be nice to only load what they need? You could load only the images that are in view. This will give the user time to read the content about the fold on your page, then as he scrolls down, you can gradually load the rest of the images.

This is referred to as Lazy Loading. It’s exactly the opposite of preloading images. We preload images for a lot of reasons. The classic example is in those old school JavaScript (and even CSS) rollovers, where we preload the rollover image so that there is no delay when they are needed.

Enter Lazy Load Plugin for jQuery

Lazyloader is inspired by YUI ImageLoader Utility by Matt Mlinac. It simply delays the loading of images on the web page until they are within view. This gives the page quicker initial load time.

This works out great if you have a page with a lot of heavy images lower down and a lot of navigation links at the top. If the user is trying to get to a specific page using this plugin would be a great help.

I Think I Owe IE 6 An Apology, Nah.

I had some downtime tonight (well not really, but I figure that was a good form of procrastination) so I decided to take a quick look into my blog and see what the issue was with Internet Explorer 6.0 and my sidebar. It turns out, as you may already know, that I’m an idiot. It wasn’t totally the browser’s fault. I was migrating (patching heavily) this theme from a dynamic/fluid width to a fixed width and I made a dumb mistake.

I Hate Internet Explorer 6.0 Even More

After all the trouble I went through making sure my theme works in Internet Explorer 7, you’d think that would be all right? Nope. Last night I had some problems trying to get Ubuntu on my computer. One of the steps involved restoring a previous disk image I had on when I just installed Windows XP. I usually back things up and restore this image every few months. It’s bare, clean and very fast.

Automate MySQL Database Backup With WebCron – No Cron Jobs? No Problem – Part 1

Clock

What To Do When You Can’t Cron

One pet peeve that I have with 1and1 hosting was their lack of Cron Jobs. Cron Jobs are basically the Unix method of scheduling stuff, much like the Windows Task Scheduler. If you’re on a Unix/Linux host, then they use cron jobs to schedule their internal activity. But not every host is kind enough to give you the same power to do so. Now that I’m on DreamHost, I don’t have this problem anymore, but a lot of shared hosts still lock up the cron jobs. And since hosts like 1and1 aren’t too reliable with their backups, doing your own backups becomes, more of less, essential. There are, of course, alternatives if your host doesn’t provide you with cron jobs, such as phpJobScheduler (used this a lot back in the day) and pseudo-cron.

How The Other Guys Work

The way these work is that, they keep track of tasks and times every time the cron job is called, but you need to include them in one of your highly accessed pages (e.g. Home page). With phpJobScheduler, you can include the file in your PHP code, or you can include it using the img tag. Using the second (2nd) method spits back a transparent GIF of 1 pixel, so nothing will be displayed on your page and you could even use it within plain HTML pages if you needed to. When this is triggered, it checks the database for time of each task, compares that to the current time, them if x > y it runs the task. Simple really. Since they need to be triggered via a user visit, it’s never going to be pin point accurate; this is why you need to include it on a page getting high traffic. Some of the scripts even have an option to build in to help with this. It’s a sort of buffer time. This says that even if the specific start time of the task hasn’t arrived yet, run it anyway if it’s within the buffer amount. You would increase or decrease the buffer based on your anticipated traffic.

Hardware Fax Solutions

Faxing is something you don’t really hear many people talking about these days. Now do you really blame them? With the advent of email, what’s really the point, right? But there’s a hybrid: there are high tech businesses that live in a world of fiber optics and T1 lines, but they also need to send and receive faxes. Are they really going to just stick a phone line in there, and slap an old school fax machine on there?