$30 off During Our Annual Pro Sale. View Details »

Making Modelling "Fun" with GWT by Chris Ainsley

GWTcon
November 15, 2016

Making Modelling "Fun" with GWT by Chris Ainsley

Making Modelling "Fun" with GWT by Chris Ainsley
GWTcon2016 - Firenze 14-15th November 2016

https://goo.gl/7M1k3L

NOTE: This speakerdeck presentation omits some animated screencast gifs, which can be viewed in the original presentations via the google slides link provided above).

GWTcon

November 15, 2016
Tweet

More Decks by GWTcon

Other Decks in Technology

Transcript

  1. Making Modelling “Fun” With GWT
    Chris Ainsley

    View Slide

  2. Speaker

    View Slide

  3. Introduction
    Modelling
    Rion
    Myrion
    Agenda
    Example

    View Slide

  4. Let‘s Begin

    View Slide

  5. much wow !!!!!!
    such fun
    so profesunel
    i’m
    scared

    View Slide

  6. View Slide

  7. Where does it go?
    The burden of choice
    Does it matter where it goes?
    I need to talk to expert

    View Slide

  8. Easier to understand
    Productivity through structure
    The model will guide us
    Acts as tutorial of problem domain

    View Slide

  9. Read Data
    Create well-structured in-memory Model
    Utilize Model
    Model Driven Development
    Over Simplification

    View Slide

  10. Application Configuration
    Basic Scripting Functionality
    Asset Generation
    Uses Of A Well-Formed Model
    Development Tools

    View Slide

  11. Approaches to Modelling
    Annotation Based

    View Slide

  12. Annotation Based

    View Slide

  13. Array / Lookup Table Based
    Annotation Based

    View Slide

  14. Array / Lookup Table Based

    View Slide

  15. Array / Lookup Table Based
    DSL Based
    Annotation Based
    Domain Specific Language

    View Slide

  16. Write Parser and more
    Utilize DSL Toolkit
    Both non-trivial to get working with
    GWT on client side
    Or

    View Slide

  17. Array / Lookup Table Based
    DSL Based
    Annotation Based
    Schema Based

    View Slide

  18. XML Schema

    View Slide

  19. XML Schema
    Non trivial to get working with GWT on client side

    View Slide

  20. Rion

    View Slide

  21. GWT Compatible
    Easy to Visually Scan
    Many Advanced
    Features
    Strongly Typed Syntax Highlighted
    Rion
    Attribute Object
    Collection

    View Slide

  22. Id Value
    Id Values
    Id
    Multi Line
    Attribute Value
    Leading & trailing whitespace not significant
    Attribute Syntax

    View Slide

  23. Object Syntax
    Id Type
    Id and type

    View Slide

  24. Collection Syntax
    Collection Id Identified objects within collection
    Collection Id Anonymous objects within collection

    View Slide

  25. Rion – Active Content
    $${…} blocks are active content.

    View Slide

  26. Id Dictionary Lookup Key
    Id Value Backslashes interpreted literally
    in this syntax
    Regular expression syntax
    Dictionary Syntax

    View Slide

  27. Rion – Conditional Blocks
    Environment filter
    Model elements to be
    excluded unless
    environment filter matches

    View Slide

  28. Myrion

    View Slide

  29. Rion
    Myrion
    XML
    XML Schema / JAXB
    Client-side GWT compatible

    View Slide

  30. Schema Driven Development

    View Slide

  31. Schema Driven Development

    View Slide

  32. Schema Driven Development

    View Slide

  33. Schema Driven Development

    View Slide

  34. Schema Driven Development

    View Slide

  35. Tight Integration With Rion
    Object Orientated
    Easy to learn
    Myrion Design Considerations
    Rapid Creation
    Portable

    View Slide

  36. What is in the metaschema?
    Class / Interface hierarchy
    Class Members
    Validation rules
    Scoping / referential integrity
    More

    View Slide

  37. Creating A Schema

    View Slide

  38. Form Item
    A simple model
    Gui
    Form
    Multiple
    Choice
    Text Widget
    Dropdown
    Radio Buttons
    Textbox Text Area Date
    1 .. n
    1 .. n

    View Slide

  39. Creating a schema
    Press
    Ctrl + Space

    View Slide

  40. Creating a schema
    Package / Domain
    Defined classes
    Root class / Entry point
    Entry point class
    Expected items within class

    View Slide

  41. model/Gui.java
    0100
    Modified Snippet from Gui.java

    View Slide

  42. builder/GuiBuilder.java
    0100
    Modified Snippet from GuiBuilder.java

    View Slide

  43. Define a skeleton ‘form’ class
    classes[]

    View Slide

  44. classes[]/gui//content[]//forms
    Gui.java
    Define Forms At Root Level

    View Slide

  45. Schema So Far

    View Slide

  46. Valid document
    Invalid document

    View Slide

  47. Creating a Regular Expression
    /
    GuiBuilder.jav
    a

    View Slide

  48. Defining An Enumeration
    enumerations[]
    IconType.java

    View Slide

  49. Add some attributes to “form”

    View Slide

  50. classes[]/form/content[]
    Form.java

    View Slide

  51. classes[]/form/content[]
    Form.java

    View Slide

  52. Creating the “formitem” abstract class

    View Slide

  53. classes[]
    FormItem.java

    View Slide

  54. classes[]
    Create Text Widget Base Class

    View Slide

  55. classes[]
    Adding Concrete Widgets

    View Slide

  56. classes[]/form/content[]
    Adding Form Items To A Form

    View Slide

  57. classes[]
    classes[]
    Multiple Choice Widgets

    View Slide

  58. GWT Archetype + Code Generation

    View Slide

  59. View Slide

  60. View Slide

  61. Model Module
    Builder Module
    Client Module
    3 GWT Modules Generated
    Engine Project
    Web Project

    View Slide

  62. Engine Project
    Model Module
    Builder Module

    View Slide

  63. Web Project
    View Rendering Code Goes Here
    Everything underneath src-gen
    should not be manually edited

    View Slide

  64. J2CL archetypes should be trivial to produce

    View Slide

  65. Writing Client Code

    View Slide

  66. Rendering code goes here
    GuiView.java

    View Slide

  67. Dispatchers
    Brittle By Design

    View Slide

  68. Serializing The Model
    Autogenerated, no external library dependencies
    Next version uses java.lang.Appendable

    View Slide

  69. Generated Documentation

    View Slide

  70. View Slide

  71. Summary
    Enables A New Class Of Applications
    Can be used client side or server side
    Leverages Strengths of GWT / J2CL
    So much more

    View Slide

  72. Availability
    Available Q1 2017
    Looking at Dual Licensing Options

    View Slide

  73. Rion rionx.io
    Myrion myrion.io
    Contact [email protected]
    Feedback bit.ly/2fibiir
    Twitter @x202122
    Questions

    View Slide