Posts tagged iphone

Friday (ish) links – January 15th 2010

A few random selections from this week’s reading.

Discussions of online privacy continue to rumble on. ReadWriteWeb had a piece about (facebook’s) Mark Zuckerberg repeating the adage that “the age of privacy is over.” Zuckerberg’s comments would appear to continue the confusion around facebook and privacy. Facebook’s popularity is at least in part due to peoples’ perceptions that there is some privacy (or at least control) inherent in it, but they keep eroding that. I deleted my facebook account a few weeks ago, partly because I was tired of negotiating its plethora of options. Twitter’s “always public” or “private” are really so much easier to handle.

Jeremy Gould pointed out O2’s SIM only iPhone plan on twitter the other day. I really wish I could find an equivalent in the US. On our last trip I was carrying two iPhones and a Palm Pre, but ended up buying a $10 virgin mobile phone from Best Buy.

Perhaps the biggest news in web development this week was the release of jQuery 1.4. The full announcement is here. I’m particularly pleased about all events now supporting live(), the improved support for contexts for actions, and the performance speedups, but many of the API changes look very nice. It’s been great to see several meaty blog posts about how some of the new features/improvements were achieved, such as this one on how the live() support works and Ben Nadel’s piece on handling problems with mouseover/mouseout.

In a similar vein I continue to enjoy Yehuda Katz’ coverage of Rails 3, including this piece on ActiveModel. It’s great to finally have a simple way to use AR’s validations, callbacks, etc. outside of ActiveRecord without resorting to nasty tricks. Gabe de Silveira also deserves some credit, not only for his very useful looking validation_scopes gem, but also for a dissection of its writing.

I missed this month’s LRUG but have been reading up on Dragonfly, a ruby library to handle image uploads and produce resized versions on the fly based on directives in a view. Putting that logic in the view makes a lot of sense and I really like the rails integration being handled by inserting rack middleware. I’ll definitely be looking for a project to try it out on.

Ajaxian continues to be the best source for impressive efforts with javascript. This week I was especially taken by efforts to implement audio sampling in firefox.

Fresh from Silicon Roundabout’s appearance in the latest issue of Wired UK, Ben Terrett of RIG has been working on some merchandise. I guess this joke’s just going to keep going.

TinyMCE is now on github. Chances are it’ll remain a pain to use (as are all editors of its ilk) but at least it can be checked out more quickly now.

And of course it’s been impossible to miss the tragedy in Haiti. The past few years have seen really impressive efforts to harness open source tools and techniques for use in disasters. Andrew Turner’s blog is a good stopping off point to find out what the mapping community has been up to.

Selected (belated, extended) Saturday Links

The past two weeks haven’t really left time to compile my selected links, though there have been many. A few days at SxSWi (on which more, later) followed by travelling with the family and the inevitable work backlog moved blogging way down the priority list. So here’s a mammoth selection to get me caught up. Particularly interesting has been the discussion around the future of newspapers (represented here by Clay Shirky, Steven Johnson and Russell Davies), which seem to have finally pushed beyond “how t ind a good business model for papers” to looking at where the real value for society lies and how we can preserve and extend that in a changing landscape.

Selected Saturday links

It’s always a little embarassing to realise that two or more consecutive blog postings are nothing more than a collection of links, but that’s the way it is at the moment. Busy-ness, illness and distractedness have all kept me from the blog this week. There aren’t any clear themes in this week’s links either. Chatter around OAuth has continued apace, as have musings about fuzziness, location, time, and the web (represented well by Matt Jones’ piece), but mostly this is the (to be) usual random assortment that have spent more than a few seconds open in my newsreader or web browser

Rails 2.0 : Very Soon Now!

All reports, and the evidence of the subversion commit log, says Ruby on Rails 2.0 will be with us very shortly. Apparently the announcement has been delayed until the gems have properly circulated. For those who’ve not been following, Rails 2.0 isn’t going to seem like a huge step forward as it’s mainly focussed on cleaning up existing features, and moving quite a few out of the core and into plugins.

I’ve converted quite a few projects over to be 2.0-compatible over the past few weeks and I’ve always come away feeling like my projects are cleaner as a result. It’ll be interesting to see what the benchmarks say about the performance impact of the new release.

Some of my favourite features of the new release are:

New view filenames and improved mime type support

Rather than filling up your views folders with .rhtml, .rxml, and .rjs files you’ll now be looking at filenames of the form myaction.html.erb, myaction.atom.builder, etc. If you ever found yourself working with the likes of myaction_atom.rxml, myaction_rss2.rxml, and so on, you’ll understand that the new naming system makes life simpler and your code simpler. In general, it really feels like the support for different formats that has been creeping into rails for a while now is finally coming of age with 2.0.

Pseudo-mime types

Closely related to the previous point, it’s nice to see an officially supported way to present different content to different devices just as you’d supply different formats for different requests. That’s written up well in this piece on building an iPhone UI for your Rails 2.0 application, and would have come in very handy when I was doing my work on intercepting microformats in rails input. Put simply you can define extra aliases for a given mime type, eg:

Mime::Type.register_alias "text/html", :my_extra_format

then use a before filter to identify a request as your pseudo-mime type:

  before_filter :detect_input_format
 
  def detect_input_format
    if request_matches_my_criteria?
      params[:format] = "my_extra_format"
    end
  end

and then the resulting action will render the view myaction.my_extra_format.erb (or myaction.my_extra_format.builder, etc.).

If the long-predicted explosion of the mobile web does indeed come in 2008, or more people adopt the facebook application approach, I can see this feature getting a lot of attention.

ActiveRecord Query Caching and Serializations

Lots of databases support native query caching, but it’s good to see it going in at the ActiveRecord level as it’ll sit a little closer to your app and be something you can rely on. I’ve seen a good speed up on some apps that I’ve been running on Edge.

ActiveRecord objects can now be created from XML and serialized to json much more easily, making inter-operability still easier.

And a lot more

The new initialization process is great, being able to specify :moved_permanently in redirects has cut out code I never liked, fixtures make a lot more sense, the view cleanups are great, and there’s a lot of stuff I never used which is no longer taking up memory in my processes. My experiences with Edge Rails lately mean I’m very pleased with Rails 2.0, am glad that this release is so focussed on clean-up, but I’m also looking forward to seeing what radical changes and refactoring come along once this version is out the door.

You can learn more about Rails 2.0 by checking out this post on the Riding Rails blog, the videos at railscasts.com and Ryan Daigle’s posts on Edge Rails. I’m sure a lot more will emerge over the next few weeks.

UPDATE (later that day): DHH has announced it and it’s official: Rails 2.0 is now out.