dlw

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + AmitRanjan Amit Ranjan 2 years ago
    this preso seems to have conversin problems... if you had transitions, this might occur.

    also if your images had transparent backgrounds, we don’t handle that very well as yet...
Post a comment
Embed Video
Edit your comment Cancel

Favorites, Groups & Events

dlw - Presentation Transcript

  1. Flex on Rails: the Good, the Bad and the Ugly
  2. The speaker
    • Background in Java, content management, mobile
    • Interests in Rich UI (Flex, WPF) and agile development (Rails, Sling)
    • Co-founder of viibee.com
    • Evangelist for Day Software
  3. The project: viibee.com
    • video-based dating platform
    • Focus on fun and interaction
    • Because: finding a partner is visual
    • Plus: social match making
  4. Flex: what and why
    • Flash for developers Has the “right” development paradigms
    • Construct UI in xml
      • Programming in actionscript
      • similar to WPF, XUL, …
    • Deployment, deployment, deployment!
    • Runs in Flash Player (compiles to swf file)
    • Integrated solution excellent for gfx heavy stuff and animations
    • Why not JS? The Flash player can do some tricks
  5. Rails: what and why?
    • Ruby-based framework for database-driven web sites
    • MVC architecture, convention-over-configuration
    • Extremely efficient, focuses on developer productiveness
    • Very agile (when you need a server in a hurry…)
    • viibee is self-funded
  6. My experiences on how to integrate these two best-of-breed technologies? Need to know about Flex and/or Rails This talk is not about scaffolding an mxml file
  7. The Good The Good
  8. Client-server communication
    • Flex/Rails is more like client-server than like web
    • Good news: the Rails server only needs to server data, not “the whole UI”
    • Need a data exchange mechanism
    Flex Client Rails Server
  9. Client-server communication
    • Good stuff: RESTful approach possible
    • chose the classic: xml over http
    • JSON would have saved some pain, but was not working as expected at beginning of project
    • Next best alternative would have been AMF
    Flex Client Rails Server xml over http
  10. XML/HTTP vs. AMF
    • XML/HTTP
    • Proven
    • Cacheable on client and server (but watch out for browser dependencies)
    • Easy to debug
    • Implicit API
    • Re performance: everything is asynch (unlike a typical web app)
    • But : requires code for model serialization and deserialization
    • AMF
    • Binary, faster
    • Less code through shared model
    • Harder to debug/understand
    • requires: web orb component
    Might need AMF anyway: for video recording and playback
  11. Tools
    • Eclipse: FlexBuilder and RadRails
    • Same ideas: unit tests , MVC, ant and svn (hence Trac)
  12. Tools
    • Silos less probable, essential for agile development
  13. The Bad The Bad The Bad
  14. Rails development is really DRY
  15. Now prepare to get wet
  16. Wet? Why?
    • The model is shared between client and server
    • Change the model in the db Rails will pick it up, but in the client you need to…
      • Adjust the xml parser
      • Adjust the client-side value objects
      • Adjust the client-side model code
      • Probably adjust the delegate
    • Plus: db and client need to be in sync
    • So you need some versioning system for the communication
    Wanna buy a wet suit?
  17. Wet? Why?
    • You will need something like Cairngorm – a client-sided MVC
    • Coming from Rails: this is a shock. Feels like Java EE is back.
    But if you do not use it you are likely to reinvent Cairngorm
  18. For example, adding a method in Rails controller means in Cairngorm
    • Create a new command
    • Create Cairngorm event
    • Add event and command to Cairngorm controller
    • Possibly create a new value object
    • Create a new responder
    • Possibly add a method for parsing response
    • Add method to delegate
    • Add entry in services.xml
  19. And some minor issues
    • Slower development (compile cycles)
    • i18n configuration is split out over different systems
    • Slower deployment (uploads)
  20. The Ugly The Ugly
  21. Model state on the client X=0 X=0 X=1 X=1 User interaction When? After UI change? Before UI is changed? Constraints?
  22. Shared model state on the client 2 1
    • Example use cases:
    • Chat
    • Inbox update
    If you stick to http: requires comet, polling or dealing with inconsistent data
  23. My Conclusion
    • More good than bad
    • Rails is a good backend choice for Flex apps
    • XML/HTTP works good enough for us and stays out of the way
    • Keep state to UI logic if possible, do not spread out model state
    • Develop vertically, no silos
  24. Questions?

+ mmarthmmarth, 2 years ago

custom

668 views, 0 favs, 2 embeds more stats

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 668
    • 613 on SlideShare
    • 55 from embeds
  • Comments 1
  • Favorites 0
  • Downloads 1
Most viewed embeds
  • 54 views on http://michaelmarth.blogspot.com
  • 1 views on http://www.blogger.com

more

All embeds
  • 54 views on http://michaelmarth.blogspot.com
  • 1 views on http://www.blogger.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories