Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Wulin Kungfu - Fight for Ruby Enterprise problems

Jimmy Huang
November 18, 2012

Wulin Kungfu - Fight for Ruby Enterprise problems

My topic on RubyConfChina2012, introduces wulin_master gem which is used for building enterprise application with ruby.

Jimmy Huang

November 18, 2012
Tweet

More Decks by Jimmy Huang

Other Decks in Programming

Transcript

  1. Background !   FIFA World Cup 2010 in South Africa

    !   BSS software managing the Broadcasting of the event !   TV and Radio orders !   Broadcasting instructions !   Temporal booking !   Spatial booking !   Finance
  2. Problems ! Extjs (everything is JavaScript) !   Code duplication

    !   Controllers setup for the JSON !   JavaScript setup of the grid and screens !   Heavy UI - Instability
  3. We hope … !   Lighter !   Easier !

      DSL !   Faster productivity
  4. WulinMaster !   A Ruby on Rails based framework !

      For resolving enterprise problems !   Developer friendly !   Extensible
  5. Tools and technologies !   Based on: !   Ruby

    on Rails ( >= 3.1 ) ! SlickGrid ( https://github.com/mleibman/SlickGrid ) ! jQuery plugins (jQuery UI, BBQ …) !   The Wulin plugins are Rails Engines. !   Use JSON as communication format.
  6. Architecture Your Application Ruby on Rails WulinMaster WulinGrid WulinScreen SlickGrid

    WulinPanel jQuery Plugins WulinScreenController WulinOAuth WulinAudit WulinPermit WulinExcel Other Wulin Plugins GridAction GridBehavior GridRelation GridColumn WulinHomeController GridStates
  7. Wulin Grid !   Fundamental component !   Remote data

    !   Auto cell types !   Association columns
  8. Wulin Screen !   Fundamental container !   One/more grids/panels

    !   Specific configurations for grids in it
  9. Model View Controller Browser Rails MVC Model Screen Controller Browser

    Wulin MVC both change Auto generated grid grid
  10. Build a screen and a grid rails g wulin_master:screen_and_grid blogger

    name:string age:integer country:reference create db/migrate/20121115075159_create_bloggers.rb create app/controllers/bloggers_controller.rb create app/screens/blogger_screen.rb create app/grids/blogger_grid.rb create app/models/blogger.rb create app/views/bloggers route resources :bloggers
  11. Grid Action !   A toolbar button !   Active

    – respond to a user event !   Implemented in JavaScript !   Default actions are: Add, Edit, Delete !   Plugins might provide default actions such as Export Excel, Audit, etc.
  12. Grid Behavior !   Passive Triggered by grid event !

      Implemented by JavaScript !   Default behaviors
  13. Grid Relation !   One screen, multiple grids !  

    Interaction between grids !   Default relations
  14. Crafting your own weapon !   Rails Engine !  

    Write your own components !   Define your own actions / behaviors !   Equip it