flex on rails: rad race weapons
DESCRIPTION
Ernest Micklei's slide's of his presentation at the RubyenRails 2007 conf in Amsterdam.TRANSCRIPT
“Fighting Rules”
• Teams of 2 developers must create a Web Application on site
• Anything goes– Hardware, Software, Books,
Samples
• But – Mission is kept secret– No Internet access
2 of 7
“Guns and Ammo”
• Tools– IDE-s, Repository, Rake,
…
• Frameworks on top of– Ruby, Rails, AS3, Flex
• Machinery– 22” monitors– 3 laptops, hubs,
keyboards, cables, HD, stickies, printer, ….
* images are trademarked by their respective owners
RestWorks
3 of 7
Face Fear
• Internationalization• Session
management• X-layer Validations• Browser History• Report generation• Database import• XML Transformation• RSS• Help• Optimistic locking• Email
• Autorisation• Exception handling• Logging• Password
encryption• Look & Feel
• comply to the “ilities”– Usability– Maintainability– Testability– Extendability
4 of 7
“Secret Weapon”
• REST is all about Resource Access (CRUD)
• IMHO Resource Manipulation is “tricked”
=> Command + Reply
• RestWorks expirement– handle commands -> replies– handle exceptions -> restfaults– generate Flex code
• Services, Models, Views, Grids, Windows, Tests
5 of 7
Command and ConquerTM
* trademark of Electronic Arts Inc.
Flex
anOrderService.calculate(order_id,…)
<command name=“calculate”> <parameter name=“order_id” value=“42” /></command>
Rails
class OrderController < ApplicationController
def calculate(order_id) # fetch the order and compute totals Reply.status(“calculated”, total) end
<reply status=“calculated”> <result>169.58</result></reply>
6 of 7
Demo
7 of 7
until properly open-sourceddownload Rails plugin and Flex libraries from:
http://s3browse.com/explore/public.philemonworks.com
send comments to:
ernest.micklei @ qnh.nl
Questions?