Rails vs Grails vs Django models

Coming back to Rails after being away from some time in Django land I discovered a huge difference in how Rails, Grails and Django treats your models. In Django and Grails you can look at a model class and see all the properties it has: [python] class Organization(models.Model): name = models.CharField(max_length=255) url = models.URLField(verify_exists=False) orgtype = models.ForeignKey(OrgType) [/python] The same model class in Rails typically looks like this: [ruby] class Organization < ActiveRecord::Base belongs_to :OrgType end [/ruby]...

June 24, 2009 · Peter Krantz

Building your own Twitter client with Fluid and jQuery

Like many before me, I was searching (unsuccessfully) for a decent twitter client. There are many, but most seem to be ad sponsored or based on a rather hefty framework like AIR (which by now, I guess, has been silently installed on my computer anyhow). Update: This project is now deprecated and Twitter has removed basic authentication. Custom apps have major implications for usability so I decided to roll my own....

July 31, 2008 · Peter Krantz

Quick site performance improvement

I have been playing with YSlow, Yahoo’s tool for web site profiling, for a while. If you haven’t tried YSlow (which is a Firefox addon to Firebug) I recommend you try it right away. Install the Firebug extension first and then add YSlow. It is amazing how much you can improve the percieved site speed by some minor changes to your htaccess file. This site runs Wordpress and I was tempted to install the WP-Super-Cache plugin but was put off by some of the incompatibility issues that were reported with the latest version of Wordpress and PHP safe mode....

July 17, 2008 · Peter Krantz