Joget Workflow v5 Training Slides - Module 22 - Best Practices on Application Building

  • View
    556

  • Download
    1

Embed Size (px)

Text of Joget Workflow v5 Training Slides - Module 22 - Best Practices on Application Building

  • All Rights Reserved Joget Inc

    Joget Workflow v5

    Best Practices on Application Building

    http://facebook.com/jogetworkflowhttp://twitter.com/jogetworkflow

    Last Revised on Jan 2017Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Prerequisites

    1. Understand all major components of Joget Workflow.

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Content

    1. Application Building Best Practices

    2. Performance

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Chapter 1

    Application Building Best Practices

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Application Building Best Practices

    1. Draw a Site Map

    2. Iterative Build Process

    3. Naming Convention

    4. App Versioning

    5. Process or Data

    6. Defaults

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Draw a Site Map

    Before you start designing your app, try to visualize on all these components would work together. Workflow Process

    Form

    List

    Userview

    by using the Userview as the centerpiece of the planning.

    6All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Draw a Site Map Leave App

    7All Rights Reserved Joget Inc

    HTML Page to serve as the Landing Page End User should see this

    when they come to the site

    Inbox where everyone will access their assignments (i.e. Approve Leave, Acknowledge

    Leave Approved)

    Run Process to start the

    Leave Application process

    List list down current users applications.

    List manager view to list all applications.

  • All Rights Reserved Joget Inc

    Iterative Build Process

    Build as you go.

    Establish the most basic layer first.

    Modularize.

    Design, configure and test individual module independently when possible.

    Increase complexity between each iteration.

    Team work is good but. Must work in the same server.

    Must work on separate item at any point of time.

    Communication and expectation must be set clearly between each team member.

    Assign a App champion to oversee and delegate tasks.

    8All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Iterative Build ProcessIncrementally go through each step thoroughly before going to the next1. Process Design

    Verify that all possible routes flow as intended to.

    2. Form Design Build and test with and without being part of the process. Define table names with ERD in mind.

    3. Form with Process With form and process individually tested and verified, then only add Form layer on top

    of process layer.

    4. Datalist With all Form and Process verified and tested, then only design the Datalist for reporting

    purpose.

    5. Userview Should come last depending on the flow of design you have. With everything tested, one

    can now add in permission control across all the layers.

    Once a cycle is completed, consider versioning it to save your work.

    9All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Naming Convention

    Use Camel Case when appropriate. Particularly:-

    App ID

    Process ID

    Activity ID

    Because Joget uses underscore (_) as the separator in the naming of Process Instance ID.

    All Rights Reserved Joget Inc 10

  • All Rights Reserved Joget Inc

    Naming Convention

    Use Camel Case for the rest as well to maintain consistency. Form ID

    Datalist ID

    Userview ID

    Workflow Variable

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Naming Convention

    Use underscore when dealing with database related fields. Particularly:- Form Element ID

    Form Table Name

    Define a prefix for Form Table Name All apps form data are stored in the same database.

    Prevent other App from writing into other Apps set of tables.

    12All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Naming Convention

    Not to be confused with Form Table Name on the previous slide, Form Name should be named with process prefix and numbering if it is bounded to a workflow process.

    Example:-

    Joget Inc Internal Use Only

    Form Name

    L-1-Submit Leave

    L-2-Approve Leave

    L-3-Acknowledge Leave Approved

    EL-1-Submit Leave

    EL-2-Acknowledge Emergency Leave Submission

  • All Rights Reserved Joget Inc

    App Versioning

    Between each development cycle, it is recommended to create a new App version before moving on to the next iteration.

    Plan your release to the production.

    Beware: Each New Version and Import App would increase the App

    Version count in your environment.

    Production servers app version Dev servers app version.

    14All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Process or Data

    Do you really need a Workflow Process?

    Are you merely doing a CRUD?

    15All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Defaults

    To minimize maintenance, one may consider to use

    Plugin Default Properties

    16All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Defaults

    To minimize maintenance, one may consider to use

    Environment Variable

    17All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Defaults

    Its good to. only apply/add in after each plugin is tested individually to steer clear of configuration mistake.

    18All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Chapter 2

    Performance

    19All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    A word on Performance

    Performance varies wildly from one to another depending on factors such as:- Total number of users

    Maximum expected concurrent users

    Number of apps running on the platform

    Complexity of each of the apps

    Amount of data generated in each app

    Network infrastructure

    etc

    20All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Scripting

    Scripting

    Beanshell scripts are good for rapid development, but for large deployments, it may be slow.

    Consider developing plugin.

    21All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Resource Usage

    Any resource usage (e.g. JDBC connections in Beanshell scripts or plugins, IO, etc) must be closed in a try-finally block to prevent leaks.

    Monitor using tools like VisualVM to fine tuning resources allocation.

    22All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Integration

    Any integration (e.g. SQL queries, REST calls, etc) may be slow, so optimize them.

    23All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    Database Indexing

    Form Data are stored with the prefix app_fd.

    Columns are saved in text/varchar to maintain flexibility.

    Add indexing as needed depending on use case.

    MySQL related: Enable slow query logging to track and improve slow queries.

    24All Rights Reserved Joget Inc

  • All Rights Reserved Joget Inc

    More

    Visit http://dev.joget.org/community/display/KBv4/Joget+Workflow+Deployment+Best+Practices for more deployment best practices and tips.

    Visit http://www.slideshare.net/joget/joget-workflow-clustering-and-performance-testing-on-amazon-web-services-2014for performance testing on AWS.

    25All Rights Reserved Joget Inc

    http://dev.joget.org/community/display/KBv4/Joget+Workflow+Deployment+Best+Practiceshttp://www.slideshare.net/joget/joget-workflow-clustering-and-performance-testing-on-amazon-web-services-2014

  • All Rights Reserved Joget Inc

    Module Review

    1. Application Building Best Practices

    2. Performance

    Joget Inc Internal Use Only

  • All Rights Reserved Joget Inc

    Stay Connected with Joget Workflow

    http://www.joget.org

    http://community.joget.org

    http://twitter.com/jogetworkflow

    http://facebook.com/jogetworkflow

    http://youtube.com/jogetworkflow

    http://slideshare.net/joget

    Joget Inc Internal Use Only

    http://www.joget.org/http://community.joget.org/http://twitter.com/jogetworkflowhttp://facebook.com/jogetworkflowhttp://youtube.com/jogetworkflowhttp://slideshare.net/joget