RIA Development via Adobe Flex + JRuby on Rails


Published on

Published in: Business, Technology
1 Comment
1 Like
  • Hi its nice presentation about development via photo shop.
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

RIA Development via Adobe Flex + JRuby on Rails

  1. 1. RIA Development via Adobe Flex + JRuby on Rails Prepared By Chua Chee Seng
  2. 2. The RIA Definition <ul><li>Adobe : Rich Internet Application, Microsoft : Rich Interactive Application </li></ul><ul><li>Well, definition from Wikipedia: </li></ul><ul><li>RIAs are web applications that have the features and functionality of traditional desktop applications. RIAs typically transfer the processing necessary for the user interface to the web client but keep the bulk of the data back on the application server. </li></ul>
  3. 3. RIA Battlefield <ul><li>AJAX, Flex, Silverlight 2, JavaFX </li></ul><ul><li>AJAX : Heavy use of Javascript and abstraction libraries (e.g. YUI) for interactive web UI development, based on web standard and no plugin required. </li></ul><ul><li>Flex : Use ActionScript 3.0 (aka Javascript 2) and Flex framework for interactive web UI development, runs on Flash Player plugin. </li></ul><ul><li>Silverlight 2 : Able to use .NET languages like C# for development, back-ed by rich .NET runtime libraries, runs on Silverlight 2 plugin. </li></ul><ul><li>JavaFX : Rebranded Java Applet (first RIA platform in the world since a decade ago, isn’t it?), written in F3 script. Runs in Java plugin. </li></ul>
  4. 4. Adobe Flex <ul><li>Adobe Flex = Brand Name </li></ul><ul><li>Technically, ActionScript 3.0 is the language (compatible with EMCAScript 4.0), while Flex is the application development Framework written in ActionScript 3.0 calling Flash API. </li></ul><ul><li>Flash API (package prefix with flash.*) provides low-level functions, such as graphic, networking, event processing, printing, text processing, XML processing etc. </li></ul><ul><li>Flex framework provides high-level application controls, such as Button, DateChooser, List, DataGrid, Tree etc. These controls are written by calling low-level Flash API. </li></ul><ul><li>The outcome of Flex Development is SWF file, which runs in Flash Player 9.0. </li></ul>
  5. 5. ActionScript 3.0 – Language Wise <ul><li>Object-Oriented </li></ul><ul><li>Supports inheritance, interfaces, packages, error handling like Java. </li></ul><ul><li>Supports properties like C#. </li></ul><ul><li>Optional Dynamic Typing </li></ul><ul><li>Function is the first class object. </li></ul><ul><li>Event Processing is baked into the language. </li></ul>
  6. 6. Flex Development Model <ul><li>MXML + ActionScript 3.0 </li></ul><ul><li>Describe UI using MXML, code controller logic using ActionScript 3.0. </li></ul><ul><li>MXML is translated into ActionScript before compiled to binary. </li></ul><ul><li>MXML => ActionScript => SWF </li></ul>
  7. 7. Custom Controls, 3 rd Party <ul><li>You can create custom controls by writing it from the ground up using ActionScript 3.0, subclass existing controls, or combine few controls into one new control. </li></ul><ul><li>There are numerous custom control written by 3 rd party, some open source, free, some commercial. </li></ul><ul><li>You can write your own and sell. </li></ul>
  8. 8. Talking to Server <ul><li>Web Service </li></ul><ul><li>XML </li></ul><ul><li>JSON </li></ul><ul><li>AMF </li></ul><ul><li>HTTP </li></ul><ul><li>Socket </li></ul>
  9. 9. Ruby on Rails <ul><li>MVC web framework. </li></ul><ul><li>Good support for agile development methodology. </li></ul><ul><li>Promote Convention over Configuration </li></ul><ul><li>Boost developer productivity by code generation (scaffolding), less code to write and maintain. </li></ul>
  10. 10. JRuby on Rails <ul><li>Ruby interpreter implemented in Java </li></ul><ul><li>Use OS Thread instead of green thread </li></ul><ul><li>Use unicode support in Java </li></ul><ul><li>Java Integration </li></ul><ul><li>Compile to byte codes </li></ul>
  11. 11. A Simple Blog Application <ul><li>Build User Interface via Flex </li></ul><ul><li>Build Middle-tier via JRuby on Rails </li></ul><ul><li>Makes then talk via XML and HTTP </li></ul><ul><li>A little bit of AIR - Make the same code to run both in Web Browser and Desktop </li></ul>
  12. 12. Blog Editor <ul><li>Easy backend via JRuby on Rails </li></ul><ul><li>Create Blog Editor UI via Flex </li></ul><ul><li>Add flex_create action in controller </li></ul><ul><li>Flex to call flex_create action </li></ul>
  13. 13. Blog Viewer <ul><li>Add flex_list action to controller </li></ul><ul><li>Create Blog Viewer UI via Flex </li></ul><ul><li>Flex to call flex_list to get blog data </li></ul><ul><li>Data type serialization -> converting date </li></ul><ul><li>Formatting data </li></ul>
  14. 14. Using 3 rd Party Control <ul><li>Use SearchGrid to filter data. </li></ul><ul><li>The processing is done at the Client side, the Server does not need to handle everything, thus help improve scalability. </li></ul>
  15. 15. A little bit of AIR… <ul><li>Adobe Integrated Runtime (AIR) platform makes your Flex application to run on Desktop Platform </li></ul><ul><li>Reuse code written in Blog Editor and Viewer to create Desktop version of them. </li></ul>