PHP

Reader Input: Picking A CMS – Part 1

Reader Input: Picking A CMS – Part 1

In The Series Part 1 Part 2 Part 3 Part 4 Define The Problem In the past, I’ve done some freelance Web Development and Web Design for different clients. One question I’ve always had to ask myself is: How will the user be updating this website? That question is usually preempted by a question to the client: Do you have any HTML experience? I can count (on one hand) the number of times that I’ve heard a yes to this question.

Comment Relish Plugin + High CPU Usage – Fixed The Right Way

How The Problem Started Christmas Eve have just started at about 12:03 AM, when I logged on and saw that dreaded message: Your Account Has Exceeded Its CPU Quota So I did what all normal people do at first: I ignored it. Actually, I had a very good reason to at the time. Since it was 12:03 AM, I assumed that my nightly backup job (backup and compress files and databases) was causing the issue.

A Bit On Open Source And Some Baz Background

This has always been a touchy subject, especially in larger computer firms. But first, let me tell you how I got into Open Source. I started coding in Turbo Pascal 7.0, in about 1996 when I was in Grammar School. I took Turbo Pascal more as an introduction to Programming, instead of a product to do something constructive in.

After Pascal, I was looking into something visual. Hence, I fell into Visual Basic 5.0. Yeah, I know, I’m sorry.

Now this was my first step towards the open source community. I must admit, that I downloaded a pirated copy and ran with it for a while. Now, that was all well and good when I was sitting home playing around with stuff. But when it came to actually, to producing something for a market, you can’t (or should I say, shouldn’t) do that with pirated software.

After that, I got into web development. For this, there was a plethora of free tools available, for use. So I did that for a while. When I got back to college, I got into C++ (using Visual Studio, but still essentially free). That was a step in the right direction. However, as the semesters went on, we got more into using the .NET library. However, for my web development I never got into ASP.

The First Real Plunge into Open Source - Enter PHP

Bit by bit, web development gave way to web programming. This is where PHP came in. I got more familiar with PHP when I started working on different projects for clients. I chose PHP for a few main reasons:

  1. Free Documentation: I could learn almost everything I needed through online documentation.
  2. Cost: My first problem was hosting. ASP hosts used to be almost twice as expensive as their Linux counterparts.

The Open Source Misconception

One of the problems that people have with Open Source is that they think that it’s unsupported. People seem to think that open source software is written by a bunch of kids in basements or something. This is not the case, by any means.  For example, a lot of the Linux distributions are totally free and totally supported.  Wake up people; free doesn’t mean unsupported. The whole “You get what you pay for” isn’t always true.

Your Choice of Web Development Framework Doesn’t Matter

After reading about Matt’s Experience with the Zend Framework, I came to the conclusion that one’s choice of a Web Development Framework doesn’t really matter. There are tons of frameworks out there and there’s a good reason for that. People still use them. If no one used a framework it would die a quick and painless death. Different frameworks offer different benefits to different people. However, I’m willing to bet that First Choice is one of the main factors affecting a developer’s choice of framework.

Poll Results – What Do You Look for in a PHP Framework?

Poll results for What Do You Look for in a PHP Framework are in: Most of you prefer a framework that is Quick and Easy. Hey, I’m totally with you guys on that. When deciding on a web development framework, it has to be easy. It’s no fun if it takes hours to learn and saves you minutes. For me, CakePHP definitely fits this bill. The bake routines save me so much time during initial development.

Web Development 2.0 Carnival – September 8, 2007

I am proud to present the first edition of Carnival of Web Development 2.0. This is my first time hosting one of these things, so enjoy: General Doug Boude presents DEMYSTIFYING JSON posted at Doug Boude (rhymes with ‘loud’) sylv3rblade presents Stages of Software Development posted at Atma Xplorer, saying, “My take on the process of software development” prakash presents A2Z Informative-Technology, Software, Internet, Tips, Ideas posted at A2Z Informative, saying, “Identifying the color code of an image on the screen is not an easy task.

The Secret of CakePHP Advanced Routing – Even Better URLs

The power of CakePHP has a lot to do with conventions. The framework (like many others) harnesses its power by enforcing certain conventions and standards that users must follow. You name your database tables, file names, etc; a particular way and boom, models, views and controllers are automatically created and ready for use. This is the beauty of the MVC structure. Your URLs also follow thing structure: www.site.com/controller/action/params.

Straying From Convention

But sometimes, conventions suck. Sometimes you want greater control over things, but still don’t wanna do them from scratch. The strictness of the MVC structure dictates how your URLs will look. Consider this: CakePHP has a basic pages controller, which you can use when you don’t need a model or controller. You just enter the view and voila , a page. But your pages have a URL of:

www.site.com/pages/page

Wouldn’t you rather:

www.site.com/page.htm

The Routes Configuration examples in the CakePHP manual are a bit simple. Here’s how to use a bit more advanced routing:

Router::connect('/(.*).htm', array('controller' => 'pages', 'action' => 'display'));

This says, consider everything that comes in with an HTM extension and send the URL as a parameter to the display action on the pages controller.

The idea was stolen from Lumad CMS. They use the following in Rewrite in .htaccess for their pages:

RewriteRule ^~(.*) content_pages/displayurl/$1 [L]

They use a prefix of ‘~’ instead of a suffix of ‘.htm’, but you get the picture. I’m sorry to disappoint you, I’m not as creative as you thought.

XAMPP Lite on USB Disk – Benchmark PHP and MySQL by Slowing Down Your Server

To develop PHP and MySQL on a Windows machine, I usually use WAMP. I had tried XAMPP before, but I found that it was a bit bloated, with the OpenSSL and FTP Server, etc. So WAMP it was. But lately, I decided to give XAMPP another try and I like what I’ve got so far. For the past three weekends, I’ve been away from my personal computer. The only life line I’ve had is my stock of Portable Apps on my 512MB USB disk.

CakePHP Installation Guide: Just Add Water and 2 Medium Eggs

Introduction As you guys know, I’ve recently discovered the marvels of rapid web development with CakePHP. This shall be the first in a long serious of CakePHP related material coming from me since I’ve now veered off on a slightly different focus. After a short analysis, I’ve picked CakePHP as my framework of choice. I’ve been struggling through it for a few months now, but it’s by far better than the alternative of coding by hand (Yeah, I know I’m lazy).

New Domain: WebDevelopment2.com, New Focus: Frameworks, CakePHP, Javascript, Web 2.0

New Domain I has finally occurred to me that I should have gotten my own domain name a long time ago. Really, I don’t know what I was waiting for, but it was about time. Since my focus is Web 2.0, WebDevelopment2.com was an obvious choice. I’ve already written about moving wordpress to a different domain, so moving to this domain was walk in the park. I loaded up PhpMyAdmin and exported my database.