Thursday 17 April 2008

Beautifulpure gets a makeover - extreme edition

Beautifulpure got a major facelift yesterday:


  • New design - nice fresh new look

  • Moved from Ferret to Sphinx for search

  • Upgraded back end admin

  • Lightbox to Thickbox

  • No more Prototype/Scriptaculous - only jRails

  • Under the hood top secret stuff ;-)

  • New email/newsletter signup functionality

  • Improved support for Internet Explorer 6.0



A cool site just gets cooler and better. We're happy, Marc (Beautifulpure) is happy. Take a look!

Friday 4 April 2008

jRails

Standard Web 2.0 coolness done easily and nicely

As Rails users we are well familiar with script.aculo.us and the Web 2.0 coolness that is pretty much built in to Rails.

Standard Web 2.0 coolness done better

To be frank, our js framework of choice is actually jQuery. We prefer the lighter weight, power and general betterness.

Show stopper?

Thing is, we've found a few negative points of using both jQuery and script.acol.us together:


  • Heavier pages due to more libraries


    • Slightly mitigated through packing and caching


  • Not working nicely together


    • Having to use noconflict

      • var J = jQuery.noConflict();

      • A minor inconvenience really...


  • Mixing frameworks is just plain messy



All is not lost

So, we've elected to use jRails. We now use only one js framework resulting in lighter, cleaner and nicer Web 2.0 apps. No changes are required to most .rjs scripts and you still get pretty much all the functionality required from script.aculo.us.

Minor gotcha

We did find a slight omission however. Where script.aculo.us Ajax calls use
loading
to prescribe Ajax loading behaviour, jQuery uses
beforeSend
This is not supported in the current
options_for_ajax
We have been in touch with Aaron and hopefully a fix will be posted...Till then, here's a patch:


options_for_ajax
.
.
.
js_options['beforeSend'] = "function(xhr) {xhr.setRequestHeader('Accept', 'text/javascript'); #{options.delete(:loading)};}"


Of course, if you're using Piston, you'll be fine.

p.s.

More news soon on Moneyspyder's newest clients and work...!