Archive for November, 2007

Pake: propel-build-all-save-mysql

I tended to use fixtures in order to save my data before propel-build-all commands. In a discussion on syncing development database structure with production, Mike mentioned he uses mysqldumps. This is actually not a bad idea, given that it is faster and less error prone (propel will never bug you). The downside is off course that it only works for mysql.

Here 3 Pake tasks to automate your mysql dumping:

  1. mysql-dump-data
  2. mysql-load-data
  3. propel-build-all-save-mysql

Download all three pake tasks. To install them simply copy the file to myproject/data/tasks/

You will have to edit the file to configure your database settings.

Note that this is only a temporary solution. I personally would be very happy to see Propel making database structure changes.

I didn’t see any manual on creating Pake tasks. Improvements and suggestions are more than welcome.

PHP & Symfony & Web Development tschellenbach 11 Nov 2007 3 Comments

CSS Vista is great

For those trying to debug their CSS in Internet Explorer (if you still support that browser)

Have a look at CSS vista, it is free and helped me a great deal.

Css & Web Development tschellenbach 10 Nov 2007 Comments Off

CommentHub.com – Developed with Symfony

CommentHubCommentHub.com has been developed with Symfony and is currently in Alpha testing. Needless to say it is a great pleasure to use Symfony and new features are being added effortlessly.

CommentHub.com aims to raise the standard in online commenting and make it more social. Commenting has become an important aspect of the internet, however a central system has not been available so far. CommentHub offers a plug and play comment system for your website. Whether it is your blog or any other page, you can add an advanced comment system in a minute. Currently it supports the following features:

  • Fast Ajax commenting
  • Threaded comments
  • Voting on comments
  • Gravatar images
  • Edit capabilities
  • Spam prevention and protection
  • Distinct look for admin comments
  • New comment notification emails for admins
  • Comment RSS Feed
  • Login (to remember email, name and site across websites)

Stronger email integration, personal RSS feeds and social features are all under development. Furthermore the system is already supporting templates. An interface to upload CSS templates will be available soon.

To see the comments in action just scroll down to the bottom of this page. Another example (with more comments) may be found by looking at my previous post.

Currently it is rather bootstrapped and in Alpha testing. To try it out for your website you can register for a webmaster account here (Enter mellow as your invitation code). The product is still under heavy development. Feature request, bug reports and comments are more than welcome.

To have a sneak peak at how easy the implementation actually is, view getting started with CommentHub. Plugins for major blogging systems will soon be available. (If anyone feels like contributing some plugins, it would be greatly appreciated.)

Thanks to Symfony for making the development such a pleasure.

Business & PHP & Symfony & Web Development tschellenbach 08 Nov 2007 1 Comment

Updated cross site ajax plugin for Prototype

The first post on my cross site ajax plugin for Prototype (1.5.0) was received with great enthusiasm. It was very nice to see my own work on the great Ajaxian website and the delicious front page. Since that post the quality of the plug-in has improved quite a bit. Especially cross browser compatibility improved. I made a test page to evaluate this; have a look to test your own browser. Furthermore some 14 screen shots show that the compatibility is good.

Here the new version: Download the cross site ajax plugin.

The syntax remains exactly the same:

new Ajax.Request(url, {
method: 'GET',
crossSite: true,
onLoading: function() {
//things to do at the start
},
onSuccess: function(transport) {
//things to do when everything goes well
},
onFailure: function(transport) {
//things to do when we encounter a failure
}
});

Cross Browser Compatibility

First of all thanks to Kris Kowal and Gary Gurevich for spotting the problems with Safari. Prior to the changes the plugin used three different methods to detect the loading of the script element. For Safari and Konqueror a sequential script technique was used. This technique has now been replaced with the polling technique, like in COWS. So the following three solutions are used.

1.) For IE it used its proprietary onreadystatechange event
2.) For Safari and Konqueror it uses the polling technique
3.) For Firefox and Opera it uses the standard onload event

Timing problems

In addition to the cross browser compatibility problems I noticed another complication. In Prototype 1.5.0 the onLoading, onSuccess etc., are generally fired by running the onreadystatechange function. However this is not the case for a transport status below 2. Actually the onLoading event is triggered by a delayed function after the open command. I didn’t realize this initially. However if you have a script which loads rather fast it will result in onSuccess executing before onLoading. This issue was fixed by calling respondToReadyState directly.

Points of Improvement

Firstly the current implementation detects browsers, not capabilities. This might create problems with future or buggy versions of browsers.
Secondly the usage of a global variable to indicate transport status makes it impossible to handle simultaneous requests nicely.
Thirdly the script currently does not clean up the script nodes.

If these points turn out to be troublesome, I will use a modified version of COWS for the transport aspects.

Conclusion

The new version of this plug-in is widely cross browser compatible. Currently it is suitable for a large variety of applications. It is however not yet ready to deal with simultaneous requests.

Javascript & Prototype & Web Development tschellenbach 07 Nov 2007 2 Comments

Google at the Campus

GoogleI was so surprised to see a stand from Google at the Erasmus campus today. Usually we don’t see too many hi-tech companies visiting a business university. Google has an amazing brand name amongst students, this was very clear from the crazy amount of attention they got. The staff from Google was representing their Dublin headquarters. Working benefits seem pretty amazing over there.

Good job Google! (why don’t other tech companies do this?)

The movie they recommended us to watch:

Events tschellenbach 07 Nov 2007 2 Comments