Showing posts with label www. Show all posts
Showing posts with label www. Show all posts

Friday, March 23, 2007

Qcodo

In my random internet wandering today, I stumbled upon a fairly slick PHP Development Framework called Qcodo. One of the things I dislike the most about PHP is the tendency to mix in PHP code with the HTML. This can make maintenance of the site fairly messy, and breaks the mantra of separating the data and implementation from the presentation.

Qcodo is a framework built from the ground up to address this issue. It works from a base data model (e.g. database schema) and builds up objects which map to this data model. It features some pretty slick code creation that also creates default HTML forms for adding, editing, listing and deleting this data as well. Toss in some AJAX functionality for good measure, and you have yourself one heck of a package.

About the only negative points I can see right now are the following:
  1. It is still in the beta stage, so if you decide to give it a whirl, expect some issues and future changes.
  2. It requires PHP 5 and MySQL. If you only have PHP version 4 installed, it is a show stopper. The developers of Qcodo are working on database adapters to support DBs other than MySQL (such as PostgreSQL), so this particular issue may fall by the wayside in a future release.
I'd recommend you visit the Qcodo website and take some time and look through the screencasts they provide - it is very impressive.

Friday, January 26, 2007

Firebug: Debugging Web Development

If you do any kind of web development, then you are familiar with how difficult it can be to figure out how a complex web page has gone wrong. When you add in Cascading Style Sheets (CSS), another layer of complexity is added, compounding the difficulty. Finally, if you are jumping onto the Web 2.0 bandwagon and looking to add Asynchronous Javascript And XML (AJAX) into the mix, then things can get downright unpleasant.

So, what is the harried web developer to do? Who or what will come to the aid of our intrepid master of all things www?


Firebug to the rescue! Firebug is a Firefox extension which does so many tasks so well, that it is difficult to summarize them in this short blog post. However, I'll do my best to highlight a few.

Firebug lets you explore the structure of any web page in a variety of ways. When Firebug is active, it resides in a window at the bottom of your web page. Alternatively, it can appear in a separate window, although I like the integration with the page I am viewing. Combine this with tabbed browsing and you have separate Firebug windows for each tab.

In HTML mode, Firebug displays the source code of the current page, initially folder for a good overhead view. When you put your mouse cursor over an element in the HTML display, the portion of the web page to which it corresponds is highlighted. There is also functionality to revers this process: hit the 'Inspect' button on firebug, move your mouse over a portion of the web page you are intereted in, and the HTML view will move to that part of the source.

The HTML display is updated in real time as well. As I am typing in this post, I have Firebug open and see it add my text to the web page as I type. The HTML display allows you to edit the source in place as well. This sentence was typed in the Firebug HTML view...

When you select an HTML element in Firebug, another sub-window displays the CSS properties of that element. Now, you will know exactly why an element looks the way it does, and from which CSS rule the look and feel descended. It has a very nice visual representation of the CSS box model for each element, cleanly conveying the offset, margin, border, padding, and size of the element.

There are so many other features to describe: a javascript console, a windows to monitor and time network requests, DOM functionality, and more. The latest issue of Dr. Dobb's Journal (February 2007) has a nice article on Firebug, which is available online. After reading through that article, go download and experiment with Firebug - I bet that it will become an essential tool for your web development needs!