My PHP framework dilemma

Posted on 2008.10.09
Categories: PHP; Tagged with: , ,

I use several pieces of PHP software very often:

All of the above tools are indispensable tools, particularly the blogging platform that runs four of my Web sites and that is used by millions of other people. But my dilemma rests with the last two products.

Recently, I’ve been working on three projects — SiteElements, FriendStalkr, and one other project. All three of these projects have been built on top of the Model-View-Controller structure provided by CodeIgniter, an excellent, efficient, and lightweight PHP framework.

My previous Web developments have never used an MVC structure, where the content (view) is separated from (yet dependent on) the backend (controller), which is separated from the data processing (model). Yet I believe that my choice to use MVC for these three sites is a good decision, since MVC makes code maintainable and probably will also help if the database structure or the site design are ever changed.

My previous Web developments on PHP also didn’t use CodeIgniter. The creator of PHP himself recommended CodeIgniter because it was the most lightweight of all of the viable frameworks and fastest (right behind core functions). Zend Framework, my framework of choice, is much less efficient, perhaps due to the number of files that need to be loaded when many classes are used.

I like CodeIgniter because it is extremely efficient, and its MVC structure is quite easy to use. The framework can be extracted and used as-is, since the ZIP archive contains the directory structure that is used by default. CodeIgniter also makes it easy to use built-in classes as well as extra helpers to simplify development and enhance functionality.

However, CodeIgniter lacks the comprehensive functionality of Zend Framework, and cannot, by any means, compete with Zend Framework on that level. Zend Framework is the most powerful and extensive set of libraries that I know of, which is why I began using it in the first place. Unfortunately, Zend Framework loses out to CodeIgniter and many other PHP frameworks in its MVC implementation (which is optional), and sometimes awkward to use.

My dilemma is simple: I want the simple structure, lightweightedness, and speed of CodeIgniter, while also making use of the powerful libraries in Zend Framework. Although it should be possible to combine the two and use both frameworks, doing so would inevitably slow down the site — unless memory caching was implemented, which I cannot do at this point.

I have not considered switching any of the sites to another PHP framework like CakePHP or Symfony, perhaps because I want to stick to the frameworks that I prefer, and also because many developers have the same closed-mindedness that prompts them to use what they know rather than what’s new or better. Nevertheless, I will not use CakePHP or Symfony; Zend Framework and CodeIgniter are, by far, the best frameworks for my purposes, as well as the best documented.

What can I do? In my mind, I can do nothing.

But I also believe that the possibility of switching to the less efficient Zend Framework exists. For sites that may require speed, such a switch could not be possible. However, for a development such as SiteElements — which will require advanced API functionality present in Zend Framework and not CodeIgniter — it is conceivable that I could choose to use Zend Framework.

What can I do? Perhaps the better question is, “what should I do?”

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4 out of 5)
Loading ... Loading ...

Free .biz domains (seriously!)

Posted on 2008.09.03
Categories: Internet; Tagged with: , , , ,

I’m totally serious.

I got an e-mail not too long ago from 1&1 telling me of their free .biz domains offer.

Although I’m not sure whether this offer is also valid for new users, I’m extremely pleased with 1&1’s services, and have great confidence that they are absolutely honest and non-deceptive in this offer. I’ve registered “freddyware.biz” among others, all of which I plan on developing — there’s a requirement that you can only register .biz domains if you are going to use it for business/commercial purposes (which do not include selling or trading domains).

Anyhow, check it out. This is an offer webmasters cannot miss out on.

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 1.67 out of 5)
Loading ... Loading ...

Free Polls Service

Posted on 2008.01.25
Categories: Internet; Tagged with: , ,

Easy-Poll.com has one of the easiest poll services I’ve ever tried. They have a wide selection of different poll styles, including designs for darker sites (like Geekie.org), colorful designs with bars indicating yes/no, and code that displays perfectly simple HTML.

It’s incredibly easy to produce any sort of one-question interactive poll, whether it’s for your blog, or if you’re making myspace polls. We’ve previously posted on our site a poll made on Easy-Poll.com that asks for user preference in terms of logos for PersonalLog, and the behaviour is a bit different from what I’ve previously tried. The designs may not be Web 2.0, but the functionality is there — vote on a poll and the results appear in a popup, so a visitor voting on a poll isn’t being taken away from the site.

When someone creates a poll, he or she can easily enter information such as the question, possible answers, and the category of the poll.

Creating a poll on Easy-poll.com

(Click on the image to enlarge.)

And the system generates a piece of HTML code that you can directly copy and paste to display the poll.

Code output on Easy-poll.com

What concerns me is this code, for which there is a warning above the box telling me that my account will be deleted if I change this code. (I’m sure this is to keep the links there, but they should be clearer and allow customization to make the code valid XHTML.) If you click on the image above, you’ll see that (clearly) some parts have been highlighted and some parts have been censored. I did the erasing because I didn’t want to actually allow someone to put up the code for an existing poll I’ve published, and I’ve done the highlighting to point out a few things:

  • Its HTML design could be improved by not using tables and using more CSS-based design
  • It uses the border attribute for many tags, which should be replaced with CSS-based design
  • It messily links back to Easy-Poll.com

While I’m certain these are some of the minor shortcomings of their code, these are not huge issues that decreases its value. In fact, Easy-Poll’s code is in fact hugely faster than ones from more complicated services like the one I used previously to survey users on CMS software preference. It’s a small piece of code, the JavaScript doesn’t take up much, and copying and pasting is all that’s needed — even on WordPress blogs that (normally) misinterpret code pasted into it.

Overall, Easy-Poll.com provides a valuable service (up to 99 polls of each type — multiple-choice and yes/no) that many webmasters can find useful. A quick registration process coupled with the fact that all of the data is managed on Easy-Poll.com makes it a valuable tool.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...