A potpourri of Web Developmemt, Linux, and Windows tidbits and observations

MySQL Workbench – a Review

Posted by dale | MySQL,Software | Sunday 27 June 2010 1:27 pm

The MySQL Developer Tools Team have just released their Release Candidate 3 of MySQL Workbench. This release fixed another 70 “issues” they missed in the last release candidate 5.2.22 RC 2, where they fixed 76 bugs, and follows the previous release, RC 1, where they fixed 62 bugs.  MySQL  Workbench is an open source project running on Windows, Linux, and Mac.

The older MySQL Administrator and the accompanying MySQL Query Browser were tools that were much beloved, that you kept going back to, and using over and over again,  like a nice fitting driving gloves, comfortable, useful, and empowering.  Since I started working with MySQL, I can’t remember not having them on my desktop, ready at a moments notice.

Because of that, I have looked upon MySQL Workbench with much suspicion and doubt. And indeed before this release, I would say the MySQL Workbench could not replace the previous Administrator and Query Browser. Now, I’m not too sure. With this release that has changed. Workbench includes the integration of MySQL Administrator, and MySQL Query Browser into an integrated environment, with much potential for growth through plug-ins, much like Eclipse, although don’t get me started on the integration of Eclipse plug-ins, another topic.

Workbench is like the French three-pronged fleur-de-lis, three separate tool areas open from a central core, Workbench Central.

Workbench Central

Workbench makes heavy use of “breadcrumb” like menus without tabs. Menus run horizontally across different windows in the Workbench, and clicking on the name brings you to the next screen. It took a second to get use to, but once I did, I liked the layout and the way workbench integrated.

You go back to Workbench Central by clicking “Home” in the upper left. If you click on any of your db connections, or menus across the top,  you enter into one of the three program areas: SQL Development with Query Browser, Data Modeling, and Server Administrator. It is obvious that each of these three sections is its own program, as they each take awhile to open at first.

Before MySQL Workbench folks were using DBDesigner to model their databases and do their EER diagrams. The Data Modeling section probably needs a little clean up and streamlining, as it opens rather “clunkily,” but once open works well.

Workbench Data Modeling

The administrator works well, but needs a little configuring as it checks your connections, and let’s you know if your missing an ini file or config setting.     You can configure multiple database connections to multiple servers, and reach each database with a click of the mouse.  The Administrator includes a series of graphs along the top of the window, which look nice, but I’m not sure are that useful.   The Administrator is laid out horizontally in keeping with the overall layout template of the Workbench, but I think I like the original Administrators vertical menus a little better.

Workbench Administrator

You can tell the Development Team has put some time into the Query Browser, and it shows.  You’ll find that the Query Browser is an improvement over the previous independent version. A red error x pops up as you type a query if you have the syntax wrong, this is immediate, instead of waiting until after you execute the query, very nice.  Query’s form a horizontal s menu along the top of the window as you make them, yes, the older version had this, but this is more automatic. Errors are reported when you execute the query, the same as the old version, with an obtuse error number.  My only gripe, which has nothing to do with the current Workbench, as the same was true of the previous version, is I wish the error messages were a tad more verbose.

Workbench Query Browser

MySQL Workbench is coming into its own and is starting to show the promise in its developer’s eyes.  The Developers Tools Team should be applauded for their dedication and persistence to get it right, and the outcome of this dedication is that MySQL Workbench is getting better and better.   I would look for the official release to follow closely after this RC 3 release.  I recommend you not wait for the official release,  go ahead, and get this release now, and start using it.  There is much to discover as you integrate Workbench into your databases, and begin working with it.  Enjoy.

PHP Frameworks – a Conclusion

Posted by dale | PHP,Software | Friday 4 June 2010 12:03 pm

We’ve looked at what a framework is, what to look for in a framework, PHP framework benchmarks, and the features of the current leading PHP frameworks. I’d like to back off a notch, and take the 50,000 foot view of frameworks.

Web developers use frameworks to make their development go quicker, easier, and more organized. This ultimately leads to repeatability. If I use the same framework each time I develop a web application, often times I can repeat what I’ve already written in a previous application, and the frameworks syntax and organization is already known to me. Everything becomes quicker. For those doing freelance development, quicker means more development jobs, and ultimately more money.

Since I want to complete my applications quicker, I want the framework to help me do that, or else why would I use it. Things I want the framework to help me with are things like validation, forms, the database , internationalization, ajax, and security. Here’s what I ideally want from a framework.

  • Built in security. I want to know if I use the framework, my application will be secure from hackers.
  • I want my classes to be automatically loaded through out the application, instead of having to remember where they are located and have to physically load them, called an autoloader.
  • I want a way to translate database sql to objects and make my interaction with a relational database easier, called an ORM.
  • A logical organization of files and places to put the various types of files I have so that everything works well together
  • A rich set of helper applications to make my coding go faster and more intuitive.
  • A way to make my URL’s easier to read and thus, easier to categorize by the search engines.
  • I want a quick framework. I already give up some speed by using a framework. I don’t want my customers saying my application is a dog.

All of the above is goodness, but most important is I don’t want to have to spend hours having to figure out how to use the framework. The framework should be easy to learn, with good documentation leading me into each section of the code. Good documentation explains what that section is about, and gives you a code snippet to show you how to use it and the syntax.

When I’m knee deep in an application, and run into a problem, I want to know I can get some help if not from the documentation, then from an active forum.

You may not have a choice of what framework you use. You might join a company that has already standardized on a framework, and you’ll have no choice, but to learn that framework. For the freelancers out there, let’s take a final look at the current frameworks from the above perspective.

  • In the relatively slow category, I would put the following frameworks, Cake, Symfony1.2.4, and Zend.
  • In the not well supported, or used, I would place: Fuse and Solar.
  • In the, rails-like, and slow category: Akelos and Qcodo. This may be tad unfair, since there was only one Akelos benchmark, and no Qcodo benchmark, but my thought is the code generation overhead may get in the way of the speed. We need more benchmarks on these two to tell.
  • In the new architecture, or new versions, and not yet well documented category, I’d place: Kohana 3 and Symfony 2, which is not yet officially released.
  • In the not all PHP5 object-oriented class: Codeigniter.
  • In the light on security and features class: DooPHP.

The way I see it that leaves you with only one framework left standing, Yii. Yii is quick, PHP5 only, has good security, a good user community, and good documentation. Yii uses a slightly different architecture then straight MVC, but it’s not that far off and seems easy to grasp.

DooPHP, the quickest of the bunch, is still relatively new and light on features, like security, but it is well documented if you want to go really light. Both should be relatively easy to learn.

That’s the story, but only at this point in time, June, 2010. I don’t see Cake, Akelos, Zend, and probably Qcodo changing much in speed or architecture in the future. Symfony2 is certainly fast enough to be considered, if the learning curve is easier, it too would be a viable candidate. Codeigniter 2, whenever that comes, could blow us away. And finally, Kohana 3 could really improve their documentation over the next couple of months to regain its former high rating, and become more than a viable contender, only time will tell. Chow.

PHP Frameworks – A Review

Posted by dale | PHP,Software | Wednesday 2 June 2010 9:49 am

I’ve gone over what frameworks are, what I look for in a framework, and the relative performance of the various PHP frameworks available. With this article I’d like to review each of the most popular PHP frameworks, and the current state of PHP Frameworks. Let’s get started.

In selecting these frameworks, I have eliminated commercial frameworks, specialized frameworks, component frameworks, frameworks with CMS, and frameworks that are no longer in development. You want a supported framework with developers working on improving the framework.

This drops the list from over 70 to 10 frameworks consisting of, needless to say, currently the most popular frameworks: Akelos, CakePHP, Codeigniter, DooPHP, Fuse, Kohana, Qcodo, Solar, Symfony, Yii, and Zend. If I missed a couple, we’ll get them next time. I’m going to go over these one at a time and just give you my impressions.

Akelos was made to mimic Ruby on Rails in PHP with an MVC architechture. It offers code generation, scaffolding, and i18n internationalization. It has good documentation offering tutorials, videos, a manual and a wiki. I’d rate their doc a 4.0 on a scale of 1 to 5 with 5 being best. It has a fairly active forum. Akelos uses Active Records, like Rails, for database hookup. It runs both PHP4 and 5, and therefore is not truly object oriented. My initial impression of Akelos is it is farily bloated, and almost too aligned with its Rails clone image.

CakePHP has an excellent and passionate user community. Documentation is just OK, I rated it a 2.0. There are currently four books published on CakePHP. However, I did not see any tutorials, or videos on their site. They have an API, but send readers to buy the books to learn Cake. Cake is very restrictive in the way things are connected in your application. Although people rave about this frameworks automatic connections, because of their strict naming conventions, if I was just starting out, I would pass, the learning curve seems steep compared to other frameworks, and the performance is not there.

Codeigniter has excellent documentation, they have video tutorials, tutorials, a user’s manual, a wiki, and an active forum. There are four books published on Codeigniter. I rate their documentation at 4.5. Codeigniter is one of the quickest frameworks. However, it is still PHP4 based. They have said they are working on Codeigniter 2.0 based on PHP5, but it will not be fully PHP5 until version 2.1. Codeigniter is made by Ellis Labs who have treated it as a hobby, and notoriously have taken a very long time between releases, which is one of the reasons Kohana spun off a fork. Don’t expect 2.0 to be soon, but their working on it.

DooPHP claims it is the “fastest PHP framework,” and if their benchmarks are to be believed, it truly can haul butt. It supports PHP5 only, an ORM,  i18n international, templates, and URI routing. However, it achieves this speed by being light in its functionality and implementation, and at present there is no consideration of overall security. Their documentation and web site are excellent, and well written. I rate the docs a 4.00. Although they do not have videos, or a wiki, they have an excellent online manual, a class API, and tutorials to get you started. They have an active forum. My impression is they are still a little early in their development.

Fuse barely made this list. There were no benchmarks. However it is PHP5 based with an ORM and URI routing. They have a video, a wiki, and a class API with good install documentation. However, their documentation is sparse, and I rate it only a 1.5. There last forum update was two weeks ago. This framework feels like it is subsidiing with its last release in June of 2009.

Kohana is always changing and there lies its problems. When it forked from Codeigniter it quickly became popular as the PHP5 object oriented Codeigniter, and it is almost as fast as Codeigniter. It had good documentation for Kohana 2.4, however they just released 3.0 where they introduced a completely new architecture. They did this to become the only PHP framework supporting the HMVC architecture, read this as multiple MVC’s on multiple servers all connected. I think they made this change knowing Codeigniter is working on their PHP5 version, and they wanted to separate themselves. However, at this writing, their documentation is awful for 3.0, which is what they recommend you use for a new project. I rate it a 1.0. There are no tutorials, no videos, and no books, just a sparse wiki and API. The forum is not really there yet. At this writing their lack of 3.0 documentation and support is enough to choose another framework, or use Kohana 2.4. Again, they just released 3.0. I do expect the documentation to get better, as they do have an active community, that will gradually build their new documentation, and when they do, Kohana’s HMVC will again, emerge as a premier framework for large projects. Kohana gives me the impression that it is made for those that know PHP5 cold, and know what they are doing, not for the beginner.

Qcodo is similar to Akelos in that it models itself on Rails. It is PHP5 based, offers scaffolding, code generation, something called Qforms,  i18n, and database profiling. They advertise a rapid application development platform that rolls out in minutes instead of hours. However, I found no benchmarks on Qcodo, and I suspect some bloat here due to the code generation. I put them in the same category and performance as Akelos, with Akelos in the lead, because of their documentation, although they are newer and are PHP5 only. Qcodo’s documentation is lacking, there are no videos, no wiki, no tutorials, not a good install doc, but they do have some online docs, and a Class API. I rate their doc at 1.5. They do have an active forum.

Solar almost did not make this list, but I found some benchmarks so I included them. They are PHP5 and MVC, with a good form modeler, but no ORM. Their documentation is OK. They do not have video tutorials, but they do have tutorials, and very good online documentation integrated with the API. I rate their doc a 2.5, but sadly I could not find a forum.

Symfony 1.4.2 was in the CakePHP performance category, a dog. Their new release 2.0 is three times quicker, and now respectable. However, their new release is not out for another month or so. You can get the preview release now, which is how benchmarks on the 2.0 framework started showing up. Symfony has a wide following at the corporate level. It has a reputation as being difficult to learn as evidence by their seven published books. It’s documentation falls into the same category as Kohana, slim on the new release and better on the old release. The old version has video tutorials, tutorials, documentation, no wiki, and their install doc is so-so. I rate their old documentation a 2.5 and their new version a 0.5. They have an active forum.

Yii started out as a competitor to Kohana. It is PHP 5 only, they use an Active Records, i18n, and themes. They initially generate the site from the command line. They bill themselves as an MVC, but they use a front-end application controller that distributes to other controllers, which is not strictly MVC. Yii is reusable and extensible. It’s fast and just as quick as Kohana and Codeigniter. For awhile, Kohana had its way, but gradually over time Yii has been coming on strong, due to greatly improving documentation. Now with the release of Kohana 3.0, I’d have to give the nod to Yii. Yii’s current documentation is excellent, they have good install docs, tutorials, a Class API, and good online docs. They do not have video tutorials, or a wiki, but I still rate their documentation at 4.5. They have an active forum and a growing user base.

Zend is a rich library, since the Zend framework is supported by Zend the makers of PHP, it is up to date and full of functionality. However, it is bloated, almost reminds me of the PEAR library, instead of a framework, and their performance shows it. Unfortunately Zend uses the framework as a “come on” for you to buy their other products. The documentation for the framework is buried around their commercial products on their web site, and hard to find. When you get to it, it is thorough with a Class API, however there are no tutorials. Zend has the reputation as being difficult to learn, and hard to use. There are currently 6 published books about it. I rate their documentation at a 3.0. Zend integrates their framework into their commercial tools, and tries to lock you into using the framework, because of that integration. They have an active forum.

That’s it for now, I will sum this all up in a summary and conclusion in my next article.

Perforce’s P4Merge File Comparison Editor – a Review

Posted by dale | Software,Version Control | Tuesday 11 May 2010 1:06 pm

When I was searching for a good file comparison editor to use with Git, I was shocked to find 46 different editors available. Which one do you use?

To separate these 46 editors I came up with a list of criteria I wanted.

  • The editor had to run on Windows, Linux, and the Mac, and look the same. No matter what platform I used, I did not want to relearn a new merge tool, and I wanted it to be the same so there was no slow down in my work. This criteria alone cut the list down to 20 editors.
  • Since there were so many editors out there, and there was not that much difference in their functionality, I decided I wanted a free or open source editor. This cut the list down to 14 editors.
  • I wanted an editor that handled both difference in two files, and merging three files in one editor. We’re down to five editors: kdiff3, Sourcegear’s diffmerge, Perforce’s P4Merge, vimdiff, and xxdiff. A quick way to separate these five is to go to Google Images and search for the above editor’s name to see a screen shot of the editor.
  • I wanted a modern looking editor that didn’t look like it was made to run in Dos. We’re down to three: kdiff3, Sourcegear diffmerge, and Perforce PP4Merge with kdiff3 being borderline.
  • And finally I wanted lines running between the two files comparing the differences, as opposed to bars running vertically along the side of the page. This is a personal preference, but it seems like an easier way to work for me. This left one: Perforce P4Merge.

P4Merge comes as a free utility with the Perforce Client. Perforce makes version control software for large organizations with a client server set up, where you load the client on each user’s computer. Because of this, and to be fair, P4Merge does not have some features, that if your looking for, you should try another editor. P4Merge does not handle version control browsing, binary comparison, directory comparison, syntax highlighting, or reports. What it does handle well is resolving file differences.

P4Merge comes bundled as a separate utility with Perforce’s commercial version control software client. To get it, go here, and click on your platform under “The Perforce Client (P4V).” You will download a 22Mb file that contains several pieces of software, click on the .exe to to start the install. When it asks you to select application packages, select P4Merge and the command line tool. You do not need the Client or SCC plugin. P4Merge will install and your all set.

Install showing not installing Client or SCC module

Working with you local server. Ignore instructions and put in localhost.

Here’s some screen shots of the editor with two files and three files. On the merge tool with the three files shown below, notice the tree with icons in the upper left showing you exactly how you are merging.  I haven’t seen another editor with this feature.  Each window is color and icon coded so you know exactly which is the base, local, and remote version.  You edit in the lower window and you can switch which version you edit by clicking on the icons on the right.  Notice also that the lines run across the screen showing you where the edits need to be resolved.

P4Merge showing two files with differences

P4Merge showing a Merge window for three files

Once you edit your changes,  and save the resulting merge file, you’ll want commit your changes in your version control software,  now that you’ve resolved your conflicts.  The results should be that there will no longer be any conflicts when you do your commit.

Overall, P4Merge is an exceptionally nice merge tool. It is easy to use, nice looking, and works well with Git, my version control software. If you’d like to configure it with Git, please see my article on: “Installing Perforce’s P4Merge in Git for Windows.”

I have to give Perforce’s P4Merge a 5-star rating, and thank Perforce for making such a nice file comparison tool available to the community.

The Elastic CSS Framework – a Review

Posted by dale | CSS,Software | Monday 10 May 2010 1:48 am

CSS Frameworks help by reducing the amount of work you need to set up an initial site when integrating CSS and XHTML to form a nice looking web page that is compatible across all browsers.  It seems like with every new web site you go through the same process over and over again,  and a framework can  save time.

I had evaluated CSS Frameworks about a year and a half ago notably Yahoo’s YUI grids, Elements, Blueprint, Tripoli, Hartija, and BlueTrip.  Elements included a folder systems for the entire site.  BlueTrip is Tripoli and Blueprint combined.  YUI, Blueprint, and BlueTrip feature a grid system to make multiple columns easier to implement.  Hartija is for printing.  Tripoli is a minimal framework that features a reset and font styling, but no column grids.

The outcome of the above review was I decided I had no problem making grids in CSS.  These frameworks seemed to add a lot of bloat with a learning curve.  I did not need a folder set up. I needed to have browser compatibility handled by Tripoli, and needed printing, handled by Hartija.  That’s what I settled on and use with all my sites.

I searched for CSS Frameworks and found some new ones I missed in my earlier survey:  “960″ was new and looked nice, then there was jQuery UI framework, and YAML.  I didn’t jump to  look at any of these until I ran across a framework called Elasticss or Elastic CSS.

What hooked me on taking a closer look at Elastic.  A very simple grid system, elastic or fixed width columns, built-in event handling, and elastic and fixed height columns.  The last two features is what hooked me, no other framework I saw offered built in event handling and variable height columns, except maybe jQueryUi, which looked a lot more complicated to implement.  I decided to give Elastic a look.

I downloaded it, set up an HTML page, and started to link in their CSS and Javascript libraries.  And that’s where I started having trouble.

I just could not get the thing to work initially.  I had problems with understanding how to set up the html tags to make the framework work.

The elastic site had documentation, but it had problems.  It seemed complete, but what was wrong, was the developer had changed the syntax from one release to another and had some documentation one way, and some the other, which made things very confusing when the site didn’t work.

The way I made it work was to look at their demo pages, view the page source in the browser, and copy there tags to my html page.

After I got everything working, I had mixed results.  On the plus side, their column system is excellent, and is not really a grid system. It features English language intuitive syntax. It is the easiest column system I have run across.  Columns are very flexible and easily re-size across the page and can be multilayer.   The ease of making columns, with intuitive English tags, alone would make me consider using this framework.

Html file showing Elastic CSS English language column syntax

The event handling was accomplished by linking in jQuery with the framework.  I was happy with this, since once jQuery was linked in, I could use it on the site, and with other plug-ins.  It did all the normal framework things well, like layout, browser reset, printing, and font styling.

On the minus side, I could not get the variable height columns working, and this was the main reason I evaluated the framework, and I tried.  I figured maybe a piece of the code had an error.

I put all the CSS through a validator and found two of the six CSS files did not validate, nor did the javascript come up clean.  I was not sure by the error, whether a  “*font-size”  tag, for example, which throws an error in the validator, was somehow part of the framework, or simply should be taken out and made “font-size.”

I was almost already to far into it when I wondered if I had the absolute latest version, I decided to download the entire project located on github.  Did I mention how much I love git and github.

I opened the project, used the latest files, and still could not get the heights to adjust.  Bummer.

The resulting web page from the above Html file with CSS styling.

Elastic CSS looks to be about a year and a half old from its inception.  My hope is the developers will keep working, I think they could eventually have something special.  Right now, however, I don’t think Elastic is quite there yet.

Here’s what I want from a CSS Framework, and so far, I haven’t found one that has it all.  If anyone knows of a framework with these features please let me know.  An easily understood and implemented multiple column system that handles elastic, jello, and fixed layouts, the same identical page in all browsers, print formatting, vertical column flexibility to eliminate “faux columns,” and make columns have equal heights, the ability to style layouts, fonts, and colors easily across the site in separate css files.  jQuery integrated with the framework.  Finally, all of this imported with one line into a skeleton xhtml file that is a template to produce your page, and when I unzip the file and place it on my server, everything is linked up.  Now that would save  me time and is worth the cost of admission.

In thinking about what I’m asking for, it doesn’t seem that unattainable, what it takes is someone with some spare cycles to put it together, or for the Elastic developers to polish their already nice framework to get the heights to work out of the box.   It also would be nice if everything validated.   I have my fingers crossed.

Next Page »