James Crisp

Software dev, tech, mind hacks and the occasional personal bit

Sydney ALT.NET Launched & Ruby Slides

This evening we had the first Sydney Alt.Net meeting. It went really well. Our venue at the ThoughtWorks offices was pretty packed with about 35 interested people coming along. We started with a discussion of news in the .NET space, and then broke for food. After that we had my presentation on Ruby & Rails from a .NET perspective, followed by Richard’s presentation on Rhino Mocks. We ended with a retrospective to gather feedback and thoughts for future meetings. Thanks to everyone for coming along and making it such a great night! And also a big thank you to ThoughtWorks for the venue, food and drink.

Here’s the slides from “Ruby and Rails from a .NET perspective”. It’s a bit hard to give you a transcript of the demos but here is a taste of some of the ruby commands we looked at today.

Basic IronRuby Console demo

4+4
"hello".class
$friends = ["James", "Richard", "Bill"]
$friends.find_all { |f| f.include? "a" }
$friends.collect { |f| f.length }
"-" * 100
$person_type = Struct.new(:name, :age, :sex)
$j = person_type.new("James", 27, "m") 

Iron Ruby Calling WinForms

require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 
Form = System::Windows::Forms::Form  
MessageBox = System::Windows::Forms::MessageBox  
Button = System::Windows::Forms::Button 

$b = Button.new
$b.text = "Hello Button"
$f = Form.new
$f.controls << $b
$f.show_dialog 

Simple Rails App Demo

rails myapp
ruby script/generate scaffold Person name:string age:integer
rake db:migrate
ruby script/server

First Sydney ALT.NET Meeting on 30 Sept

Exciting news! We now have an ALT.NET group in Sydney! Our first meeting is Tuesday 30 September. Meetings will be the last Tuesday of the month.

Rough agenda for the first meeting is:

6:00pm   Meet & Greet time and then Kick Off!
6:30pm   “Ruby, Rails and IronRuby from a .NET perspective” (me).
7:00pm   Break with food and drink
7:30pm   “Mocking with Rhino Mocks 3.5” (Richard Banks).
8:00pm   Wrap up & go home.

ThoughtWorks is sponsoring the event with a nice office location in the CBD, and also pizza and beer. So if you’re planning to come, please comment or send me or Richard Banks a mail to help us get enough food and drinks for everyone.

Address is:
Level 8, 51 Pitt Street
Sydney NSW 2000 Australia
[Map]

ALT.NET is about designing and building the best solutions possible. This means continuous improvement, retrospection and often reaching outside the mainstream, considering Open Source frameworks and tools, Agile methodologies and ideas from other language communities such as Ruby, Java and Haskell.

For more info about ALT.NET, check out our Sydney ALT.NET Blog, and the main ALT.NET wiki.

See you on the 30th!

REST and .NET talk at ACS on 1 October

I’ll be giving a talk at the ACS (in Sydney CBD) on 1 October, about REST, designing good RESTful systems and implementing them in .NET. It will be quite similar to the REST Patterns in .NET talk I gave at Tech Ed. For more information, please check out the blurb at the ACS site.

Slides from Tech Ed “Rest Patterns and .NET” Talk

Here’s the slides from “REST Patterns and .NET”. I’ve put some extra info in the notes on various slides, so suggest browsing with notes displayed.

You might also be interested in more information about the talk or the simple rest client with code I mentioned during the presentation.

Contact Form For Mephisto updated for Drax 0.8

Mephisto Drax (version 0.8) introduces breaking changes for plugins. I’ve just finished updating the contact / feedback form plugin. It’s now working fine and tests passing.

Installation instructions are the same as before except that the ‘contact_notifier’ has moved from the ‘lib’ directory to the ‘app’ directory. It still needs to be updated to include your destination email address for contact mails.

If you’re a Mephisto plug-in developer, you might be interested in checking out my post on migrating Mephisto plugins to Drax. It’s based on my experiences with the contact_form.

Migrating Mephisto Plugins to Drax 0.8

There have been some major changes to Mephisto in the latest release (0.8 Drax) that break existing plugins. If you’re interested in migrating your existing plugin(s) over to Drax, read on.

Repository Move
First thing to note is that the Mephisto code base has moved from SVN to github.

Plugin Architecture Changes
There is no longer a base class for Mephisto plugins. Instead, you create Mephisto plugins using Rails Engines. If you’re migrating a pre-Drax plugin to Drax and Rails engines, you’ll most likely need to:

  • Remove your plugin file – there’s no base class for it any more so you’ll get errors like: ‘superclass must be a Class (Module given) (TypeError)’
  • Move your routes into a ‘routes.rb’ file in your plugin root directory.
  • In your plugin root directory, create an ‘app’ directory, with ‘views’, ‘models’ and ‘controllers’ sub-directories. Move your code files into the appropriate folders in the ‘app’ directory. These will be auto-loaded.
  • Remove various lines in your init.rb which manually add your plugin file directories to the load paths, if you have these.
  • If you inherit from the ApplicationController, add ‘unloadable‘ to your controller class. This will fix errors in development mode like ‘A copy of ApplicationController has been removed from the module tree but is still active!’
  • An example
    You can have a look at my contact_form plugin code. Revision 18 is before Drax and engines and uses the old approach. Revisions 19 and later are using Rails engines and will work with Drax.

    UPDATE: Latest code at GitHub
    http://github.com/jcrisp/mephisto_contact_form/tree/master

Simple REST Client

While preparing for my upcoming REST talk, I made a basic REST client. It’s nothing special but allows you to set the verb, request body and see the status code and all the headers on the response. It’s quite handy for debugging and exploration of RESTful services.

Feel free to download the:

Hope it is useful and saves you having to whip up your own little client!

UPDATE: Source now available on GitHub!

RiskAssess – Risk Assessments for Schools

I’ve been developing RiskAssess, an online risk assessment system for schools. RiskAssess helps teachers and lab assistants to quickly and easily produce risk assessments for laboratory experiments which meet Australian standards. RiskAssess should help decrease the number of accidents in school laboratories, and also help schools meet legal requirements.

I’m pleased to say that the site is now well and truly launched and we have schools doing risk assessments every day using RiskAssess. There’s still much to do and many new features to add, but so far we’ve had very positive feedback from the schools using the system.

On the technical side, RiskAssess is a Ruby on Rails site.

Tech Ed Talk: REST Patterns and .NET

I’ll be giving a talk at Tech Ed this year on REST and how it can be implemented in .NET, much inspired by the thoughts of Jim Webber on good RESTful web services, and Garr Reynolds on the “Zen” presentation style. Here’s some more info:

REST Patterns and .NET

Sydney Convention Centre, Darling Harbour
5 September 2008
10:15am – 11:30am
(ARC306)

REST has sparked furious debate, and reactions from fan-boy adoration to hate. As the arguments quiet and the dust settles, it is becoming clear that the RESTful style is a viable choice for the Enterprise. Framework support is growing rapidly. WCF now provides basic REST support. Meanwhile, the budding MVC framework opens the door to building services which leverage hypermedia. This talk will leave you with an understanding of the RESTful architectural style and provide you with recommendations on designing and building both simple and hypermedia driven web services in .NET.

Hope to see you there!

F-Secure Optus Internet Suite – To be avoided!

Optus, my ISP, is kind enough to give subscribers a free copy of F-Secure’s security suite which offers anti-virus, anti-spam and firewall. I read some half decent reviews of the product so I thought I’d install it and give it a go. Unfortunately, it was fraught with problems. First of all, after installing I got a blue screen on reboots. After uninstalling AVG (my previous anti-virus) in safe mode, my computer could boot. Next, I tried to do a full system scan, but the F-Secure automatic update kicked in at the same time and it crashed the scanner. So, I rebooted, and tried a full system scan. I tried twice, but each time, it hung on a random .class (compiled Java) from GlassFish. Not great. So I went to the F-Secure website to submit a bug report. I filled in the form, and couldn’t submit it because one of the drop down lists which was mandatory was disabled in Opera. I then thought I’d try the site in IE7, but IE7 just hung, presumably thanks to F-Secure’s firewall.

Overall, I would strongly suggest that you do not bother to try the F-Secure product suite, even if it is offered to you for free.

Page 10 of 20

Powered by WordPress & Theme by Anders Norén