Tuesday, November 17, 2009

RobotLegs Hello World Video Tutorial

RobotLegs logo

Hey everyone. Long time, no see. I've just been super busy leading a team of flash guys on a big project which has left very little time for experiments and playing with code. Anyway, hopefully I'll get back into my routine and get a few posts out a week again.

This post comes courtesy of Joel Hooks offering a free t-shirt to anyone who made a RobotLegs Screencast. I'm a sucker for geek apparel, so here's what I made:


For more info on RobotLegs, check out www.robotlegs.org and join the google group.

59 comments:

  1. andreitt12:59 AM

    thanks John. nice demo of robotlegs and you got me sold on fdt after this video.

    ReplyDelete
  2. The speed in which you write code is not human.

    ReplyDelete
  3. Awesome, nice simple framework and of course awesome usage of FDT! Thx for the tutorial, need to check it out!

    Michael,
    FDT Team

    ReplyDelete
  4. hey john, thanks for this neat tutorial on robotlegs, seems to be a pretty solid framework..

    @paul, that's exactly what i thought, when i first saw a flasher code in fdt.. but it's really simple, just have a bunch of fdt shortcuts on hand, and your workflow speeds up tremendously!

    ReplyDelete
  5. Excellent tutorial, I'm pleased to see someone who uses FDT to it's highest potential, although you are missing one great speed trick.

    Under (FDT->Editor->Code Assist) replace "auto activating triggers" with ".qwertyuioplkjhgfdsazxcvbnm". Basically this means that instead of waiting for "." before bringing up the auto complete box, it does it on every keystroke, much like FlashDevelop.

    So I'm wondering what the typical footprint of RobotLegs is? I know you have the SmartyPants IoC in there (or you did last time I checked), for example, what is the "build release" size of the swf in this example?

    ReplyDelete
  6. John Lindquist12:37 AM

    @enzuguri - I can't stand having code complete on every keystroke, especially on larger projects.

    ReplyDelete
  7. @John Lindquist Ok fair enough, just checking out some the examples on the robotlegs site, 12.5kb is a nice small footprint. I was originally porting a site framework from PureMVC to parsley, but these has proven to be too large. I think these may be the solution I am looking for, kind of a "best of both worlds" experience.
    Cheers, keep up the great work!

    ReplyDelete
  8. Speed up your navigation by using the quick outline. I see you are jumping to classes and then moving down the cursor... no need to do that.

    Jump to your class>hit command-O>start typing the method name> hit enter.

    Also try adding Next/Previous History to key stokes. I use Command -(left arrow) / (right arrow)

    ReplyDelete
  9. John Lindquist3:44 AM

    @Alan - Trust me, I use quick outline all the time when the method isn't already visible on the screen. Seems a little gratuitous in these tiny classes though.

    ReplyDelete
  10. Watches video.
    Feels like a bunny in front of 3000KW headlights.
    I have absolutely no idea what I just watched.

    ReplyDelete
  11. No chance of seeing this on Vimeo is there?

    ReplyDelete
  12. John Lindquist8:32 AM

    @Alec - Why Vimeo? I chose to provide it in a format that anyone can easily download and watch later...

    ReplyDelete
  13. That's where @darscan's videos on Robot Legs are. I've been collecting interesting and useful as3 videos into a channel (http://vimeo.com/channels/69084). Yours would be a welcome addition. I like knowing I can go back to one place for useful videos.

    No big deal if you don't want to put it up, it's entirely your prerogative, of course. I just wondered if you would. Sorry I should have written at more length to start with, but it's late on Friday evening where I am and I'm tired!

    ReplyDelete
  14. John, your explaination is very good.

    What theme do you use for eclipse?

    ReplyDelete
  15. Hello,

    I copy all your code step by step, for one hour. I compile and I have an runtime error. I can't resolve it. Can you share the sourcecode please ? Thanks :)

    ReplyDelete
  16. hello john and thanks.
    I'm impressed by FDT!!! and your coding speed! I saw you coding in Flex builder, but god this is awesome. Unfortunately FDT is very expensive!!
    Cheers.

    ReplyDelete
  17. Anton Mills7:52 AM

    your a machine! I've tried FDT before but I guess I didn't give it a real chance and reverted to FlexBuilder, I've reinstalled FDT and will try to give it some love this time!

    Great vid, I was struggling to get my head around RobotLegs but it really helped me to get a handle on the basics, really looking forward to the next installment!

    Cheers,

    ReplyDelete
  18. Nice example.
    Im glad to see someone else coding on a black background.

    ReplyDelete
  19. Hi, i've got an error on SimpleViewMediator/onRegister(). It seems that "eventDispatcher" in eventMap.mapListener(eventDispatcher, GreetingEvent.GREET, onGreet);
    is null.
    Can you share the source? Thank you very much.

    ReplyDelete
  20. hi John, thanks for this! Hope you got the t-shirt :P
    I have a problem:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at simplerobotlegs.controller::RequestGreetingCommand/execute()
    Maybe the injection it's not working? Do you have any clue?

    thanks,
    .am

    ReplyDelete
  21. [...] any change requests, just ask. especial thanks to John Lindquist for his online Robotlegs intro tutorial. This entry was written by chad, posted on 2010/01/17 at [...]

    ReplyDelete
  22. At 6:27, you write "in" and FDT propose you [Inject]. I haven't the same with my FDT. Can you tell how do this please ?

    ReplyDelete
  23. Nice example.
    Im glad to see someone else coding on a black background.

    ReplyDelete
  24. for anyone curious about FDT's quickkeys for that awesome auto completion we're seeing, i found a complete list here:
    http://fdt.powerflasher.com/blog/?tag=tutorial
    command + 1 was the one i was searching for. you just instantiate a variable as if it were already declared and hit command + 1 and poof! it brings up a declaration dialog box.

    fdt 3.5 also has a similar mechanism for auto generating event constants. its so sweet.

    i've been a Flex Builder 3 user for a while but am now making the switch so i can do all code editing (html, java, css, as3, js, php) in one place.

    ReplyDelete
  25. [...] RobotLegs Hello World Video Tutorial by John Lindquist [...]

    ReplyDelete
  26. Billy4:04 AM

    To everyone getting excited about FDT, be warned. It is buggy as hell. It works brilliantly 90% of the time, but the other 10% of the time is spent trying to work out why your workspace won't open or you've lost code completion.

    ReplyDelete
  27. [...] RobotLegs Hello World Video Tutorial | pv3d.org [...]

    ReplyDelete
  28. This is my first attempt at MVC... and I have followed your tutorial to the letter, except in one point. Despite my efforts, the way the Robotlegs library loaded looks different on your screen. ( On mine it shows as a linked library...) Originally I got an error because I hadn't included swiftsuspenders, but I sorted that out. Still I get this: I see others have too. It appears as though injection is not happening. Can you give any clue why?
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at org.robotlegs.base::EventMap/mapListener()
    at org.robotlegs.examples.hworld::SimpleViewMediator/onRegister()
    at org.robotlegs.base::MediatorBase/preRegister()
    at org.robotlegs.base::MediatorMap/registerMediator()
    at org.robotlegs.base::MediatorMap/createMediator()
    at org.robotlegs.base::MediatorMap/onViewAdded()
    at flash.display::DisplayObjectContainer/addChild()
    at org.robotlegs.examples.hworld::MainContext/startup()
    at org.robotlegs.mvcs::Context/checkAutoStartup()
    at org.robotlegs.mvcs::Context()
    at org.robotlegs.examples.hworld::MainContext()
    at Main()

    Many thanks.

    ReplyDelete
  29. sine12:36 AM

    Hi,
    My problem is now sorted... by replacing the robotlegs framework (with swift suspenders added manually) and linking the robotlegs framework- v1.0.3 swc instead.
    Thanks for the tutorial. I'm learning!

    ReplyDelete
  30. Dmitry3:00 AM

    Very nice into, thanks. So, in order to wire that simple app, we need to have 6 classes. What would be for more complex real world example? Seriously guys, is there a value in all these frameworks? Not only one should think and code the business logic, but now, deal with x6 more classes for every new view and controller. Please let me know if I'm wrong.

    ReplyDelete
  31. awesomebot1:39 PM

    Thanks John! Great intro, good to get us up and running. And I agree with Paul - you're a machine man.

    ReplyDelete
  32. P48l07:26 AM

    someone knows what font is he using in his Eclipse IDE?

    ReplyDelete
  33. abunur2:58 AM

    In real life you wouldn't use a framework to write a hello world app, this, like any other, is an example to introduce you to the core concepts. Where you actually see the value in frameworks actually IS in large, complex applications with multiple developers. And no, the amount of framework classes doesn't grow exponentially - large applications are actually kept cleaner and more maintainable with a good framework, especially when it comes to getting someone new to the project up to speed.

    ReplyDelete
  34. Thomas4:41 AM

    Great introduction! I'm switching from PureMVC to RobotLegs and this is just what I needed - swift and precise :-)

    ReplyDelete
  35. Nikos8:22 AM

    I soo want to get fdt into flash builder 4 now. You made me jealous
    but this looks a pain
    http://www.communitymx.com/content/article.cfm?...

    ReplyDelete
  36. [...] lots of others across the internets) dealing with various Robotlegs topics. John Lindquist has a Hello World screencast on his blog (watching him use FDT is interesting in and of itself). Additionally there is a Best [...]

    ReplyDelete
  37. [...] FlashBuilder to FDT can almost seem magical. I’ve heard time and again that people who watch my introduction to Robotlegs video that features many of the FDT tricks are blown away by the speed at which you can crank out [...]

    ReplyDelete
  38. pointyMan8:58 AM

    Love the IDE, but my head exploded from all that code! Looking forward to more examples

    ReplyDelete
  39. I saw you got the list of classes in project, what's the shortcut?
    In Textmate, that's CMD+T

    ReplyDelete
  40. [...] http://www.robotlegs.org/ - Robot Legs Home page, great resources there http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/ - Tutorial on Robotlegs by legendary John Lindquist [...]

    ReplyDelete
  41. In watching this video tutorial, other video tutorials, and reading text tutorials involving Robotlegs I feel I have a fairly good understanding of how the wirings are supposed to work. I am curious though, the tutorials I've viewed and read are all simple and essentially small in scale. So, I had a few questions...

    1) Is it considered good practice to have a unique Model object for each View (view component and it's mediator)?

    2) Is it safe to assume the context class for a large program will have a ton of mappings? Often organized by three "hooks" at a time; 1) mediatorMap mapping, 2) commandMap mapping, 3) injection of the view component (if necessary). Or is there a better way?

    ReplyDelete
  42. [...] my attempt to better understand the RobotLegs framework, I was viewing the RobotLegs Hello World Video Tutorial by John Lindquist when I noticed the power of his Actionscript editor. The editor was FDT, which [...]

    ReplyDelete
  43. [...] HIER und Asynchrone Kommandos [...]

    ReplyDelete
  44. Enrique1:20 AM

    Please post the source of the project :(

    ReplyDelete
  45. John, this was very helpful. I was able to get started with the framework right after viewing the tutorial. Thanks!

    ReplyDelete
  46. Hello guys , I'm trying to do this tutorial but I have an error in my SimpleViewMediator class , I have a null reference on the eventMap.mapListener into the onRegister() method... Does anyone has an idea about it ??

    Thank you guys

    ReplyDelete
  47. [...] the middle of this slideshare by Joel Hooks, he explains the workings of this framework. Plus this hello world video tutorial by John Lindquist explains quite a bit about the framework. Then on InsideRIA, there is an [...]

    ReplyDelete
  48. Cubanpete4:52 AM

    @Ced: me to, did you find a solution?

    ReplyDelete
  49. [...] Here’s another video by John Lindquist this time showing how to setup a simple Hello Robotlegs Application [...]

    ReplyDelete
  50. Bryan, Choi2:57 AM

    Thanks for your tutoring.

    I want to get your code asist in IDE.

    Let me know how to get it, please~~~!!

    oopchoi@naver.com

    ReplyDelete
  51. Yuri Visser7:16 PM

    What would you say is the big difference from PureMVC, they seem to be pretty much identical, with some minor naming and concept changes.

    ReplyDelete
  52. Very good tutorial, one thing to point out, at the very end where you do new MainContext(this), I read somewhere that you should set that as a class level variable to avoid it being marked for GC which can cause issues.

    ReplyDelete
  53. Pjakobsen10:55 AM

    Great video. Looking forward to more. How did you make your code window black?

    ReplyDelete
  54. [...] lots of others across the internets) dealing with various Robotlegs topics. John Lindquist has a Hello World screencast on his blog (watching him use FDT is interesting in and of itself). Additionally there is a Best [...]

    ReplyDelete
  55. [...] dealing with various Robotlegs topics including this 25 minute screencast. John Lindquist has a Hello World screencast on his blog. Additionally there is a Best Practices document that has proven helpful for many. You [...]

    ReplyDelete
  56. [...] dealing with various Robotlegs topics including this 25 minute screencast. John Lindquist has a Hello World screencast on his blog. Additionally there is a Best Practices document that has proven helpful for many. You [...]

    ReplyDelete
  57. [...] I love screencasts, they give a great insight into how stuff works (in no time and without any effort!). So here is a Hello World screencast by John Lindquist: http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/ [...]

    ReplyDelete