Wednesday, January 31, 2007

Announcing SuperHappyDevFlat 1


This kind of event is better known as SuperHappyDevHouse - but as you most probably know - in Switzerland we live in flats (the british english word for apartment). Matthias is setting up the stage for one night - a gathering of developers, hackers and designers to collaborate on serious - and not-so-serious stuff - get things done and enjoy a party atmosphere.

Friday 23 February - Zurich - starting 18:00 - get more information on the SuperHappyDevFlat Wiki.

About the poster: Artwork done by myself - thanks João for the pictogram. Download large version of the poster.

Feel free to spread the word - share the poster - I'm looking forward to an interesting night.

Tags:

Sunday, January 28, 2007

Operator Add-on - Add custom actions

The Microformats Add-on for Firefox - Operator - already provides built-in integration with widely used services from Google and Yahoo.
Mike has a brief post explaining the extensibility via custom JS scripts.

Summary:
  • Get the handler-example.js file from the Operator extension directory in your Firefox profile.
  • Create a new folder called "microformats" in the root of your profile directory (on Mac that is: Library > Application Support > Firefox > Profiles > %profileid%.default).
  • Edit the example JS to use your site and copy it into the new Microformats folder
  • restart Firefox.
A great way to learn the possibility of the JavaScript API provided by the add-on is to unpack the operator.jar (copy and rename to .zip for easy extraction). You find the operator.jar in the chrome directory of the extension folder in the Firefox profile. Once unzipped you find a bunch of JS files in the content/microformats folder that contain the built-in implementations.

Learning by Example until there is a proper documentation ;-) (maybe there is one - but I could not find it)

Update: Quickly hacked a script to look-up addresses and people in local.ch - download the Operator handler script here (use "Save Link as..." in the context menu).

Tags:

Operator Add-on - Microformats get useful

Discussions about native support for Microformats in 2008+ browser versions (FF3 and IE8) are up since the last major releases are public. The Operator Add-on for Firefox already shows possible ways how it could work. To install - visit Firefox Add-ons.

I especially like the "Highlight Microformats" function - that draws a black border around the semantic content when hovering over it with the mouse. The context menu adds actions that are possible in the context of the semantic mark-up. Like seen on the screenshot below for a hCalendar - ability to add the event to Google Calendar as an example.

Note that the "Highlight Microformats" has been added in version 0.6.2 and is yet disabled by default - use the Add-on Options to activate it.

For me - this finally shows the real power of Microformats - provide users the ability to easily reuse information and transport them between applications without losing semantics. In order to reach mainstream with Microformats we need the browser vendors to add infrastructure that allow services to hook-in on the semantics (like we have today with the search engine integration).

Read more about Operator on the announcement on labs.mozilla.org.

Tags:

Wednesday, January 17, 2007

My OpenID Speech - now on Google Video

I'm not used to hear me speaking nor see it too.. - well - I agreed that my recent OpenID speech at the Webtuesday is getting recorded and been made available on Google Video.

Many thanks to Corsin for all the work to get it done.



Get full screen video following this link to Google Video

The speech is in English - although I'm not a native speaker. Hope it's still understandable and doesn't hurt too much ;-) As you can expect.. there are things I said I already regret having said! If anybody mentioned feels offended - don't take it personal - I like to provoke and emphasize topics to get instant feedback from the audience (and not that they start sleeping in the back). Feel free to ask for more details if you think some facts/bashing need further elaboration.

I did the speech as learning experience - learning OpenID while preparing the talk and during the talk.

The speech goes for over a hour - the sound quality could be better (hey.. it's our first try) - you might have to set your volume a bit louder. The slides can be downloaded here.

Tags:

Wednesday, January 10, 2007

OpenID Speech at Webtuesday Zurich

Been doing some research on web-based authentication systems in Summer 2006 and came by OpenID. This week I shared my knowledge with the Webtuesday friends and held a speech.

You can download the slides as PDF - note that I use slides only to visualize my speech. For the attendees - you find all mentioned links clickable in the PDF. They are additionally on del.icio.us/keepthebyte/openid



Additional I provide the OmniGraffle file that contains various OpenID authentication flow charts: Download as Graffle, Download as Picture

More details about the mentioned implementation of OpenID at local.ch will follow as soon as it's live.

Update 16. Jan: Corsin just posted the video of the speech on Google Video - many thanks for all the work.

Update 17. Jan: Added link to download OpenID Process Overview as picture (from Flickr)

Tags:

Thursday, January 04, 2007

Howto: Secure Rails with OpenID Authentication

A step-by-step guide to extend an existing Rails app with OpenID authentication. Basically some notes I made during the development. Credits to Andrew - I learned a lot reading his howto.

  1. execute in terminal: gem install ruby-openid
    that should install "ruby-openid-1.1.4" and "ruby-yadis-0.3.4" by the time of writing

  2. if you are using Locomotive on Mac OS X - execute in terminal:
    mkdir -p ~/.rails/generators
    ln -s /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/powerpc/lib/ruby/gems/1.8/gems/ruby-openid-1.1.4/examples/rails_openid_login_generator/ ~/.rails/generators/openid_login
    Mind that you have to change the path for architecture powerpc/i386 and installation path of Locomotive and version numbers..

  3. execute in terminal:
    ./script/generate openid_login openid
    ./script/generate migration add_open_id_tables

  4. open the file in %yourapp%/db/migrate/???_add_open_id_tables.rb and add:
    class AddOpenIdTables < ActiveRecord::Migration
     def self.up
      create_table :users do |table|
       table.column :openid_url, :string
      end
     end

     def self.down
      drop_table :users
     end
    end

  5. execute in terminal: rake migrate

  6. change %yourapp%/app/controllers/application.rb to contain at least:
    require_dependency 'openid_login_system'

    class ApplicationController < ActionController::Base
     include OpenidLoginSystem

     def login_required
      if session[:user_id]
       return true
      end
      flash[:warning]='Please login to continue'
      session[:return_to]=request.request_uri
      redirect_to :controller => 'auth', :action => 'login'
      return false
     end

     def redirect_to_stored
      if return_to = session[:return_to]
       session[:return_to]=nil
       redirect_to_url(return_to)
      else
       redirect_to :controller=>'auth', :action=>'welcome'
      end
     end
    end

  7. change %yourapp%/app/controllers/auth_controller.rb
    remove this line:
    redirect_to :action => "welcome"
    replace with:
    redirect_to_stored

  8. change your app controller(s) %yourapp%/app/controllers/*_controller.rb
    add this line after the class name (probably the 2nd line in your file):
    before_filter :login_required

Now your actions need a valid OpenID authentication before they can be executed.

Update 7-Jan-2007: New version of OpenID lib 1.1.4

Tags:

Wednesday, January 03, 2007

Howto: Update Rails to 1.2 RC1 on Locomotive

Update Jan 19th: Rails 1.2 is final - and Ryan has updated Locomotive - get the updated bundle.

Some quick notes from my recent experience updating Locomotive 2.0.8 to Rails 1.2 RC1:

Read more about Rails 1.2 RC1 at: weblog.rubyonrails.org
  1. execute in terminal: gem install rails --source http://gems.rubyonrails.org --include-dependencies
    you will see some errors during installation of the documentation - ignore them.
  2. open %yourapp%/config/environment.rb and add the build number behind the RAILS_GEM_VERSION - the line should look like: RAILS_GEM_VERSION = '1.1.6.5618' That will switch to the new rails version on restart of your app.
  3. execute in terminal: rake rails:update
    that will update some files in your application.. e.g. the prototype.js (before update 1.5.0_rc0 - after update 1.5.0_rc2)
  4. open %yourapp%/config/routes.rb and add the line: map.connect ':controller/:action/:id.:format' before the map.connect ':controller/:action/:id' line.. that will allow you to use the enhanced "Formats and respond_to" feature
If you should have problems that Rails can't find files - or is searching the wrong path - try adding the RAILS_ROOT in environment.rb e.g. RAILS_ROOT = '/Users/Me/Documents/Sites/YourApp' - that looks more like a bug in the RC to me - the old version did as expected.

Check the log files for "DEPRECATION WARNING" - enjoy updating your code :-)

Tags:

About me

flickr.com Photos
... and travel photos at TrekEarth
Upcoming Events
Publishing with Blogger
CSS by Joé Lemelin & Stéphanie Léveillé
This site is XFN friendly
creativecommons by-nc-sa