Sunday, July 17, 2016

Lightning Experience Development : User Interface Development Consideration

Note: All credit goes to Salesforce, I am just a developer who enjoy playing trailhead and try to make note to myself.

Two models of developing web app
Page Centric web application model
  • great to serve basic functionality.
  • not offer great user interactive experience
  • server side generate user interaction

App Centric mode
  • great user experience
  • client side
Three options that offered by Salesforce

Classic Visualforce

  • UI Generation - Server-side
  • Data and Business Logic-Apex standard or custom controller
  • Workflow
    1. User requests a page
    2. The server executes the page’s underlying code and sends the resulting HTML to the browser
    3. The browser displays the HTML
    4. When the user interacts with the page, return to step one.
  • Pros
    • Tried and true model
    • Easy to implement for greater productivity
    • Naturally splits large applications into small, manageable page
    • Has built-in metadata integration
  • Caveats
    • Limited interactivity (aside from added JavaScript functionality)
    • Higher latency, which degrades mobile performance
Visualforce as a JavaScript Application Container
-Empty visualforce with javascript code.In other word, Visualforce just add as javascript container.
  • UI Generation -Client-side (mostly JavaScript)
  • Data and Business Logic- Remote Objects or JavaScript Remoting
  • Workflow
    1. The user requests the “empty” Visualforce page containing only JavaScript includes
    2. The page is returned to the browser
    3. The browser loads the JavaScript application
    4. The JavaScript application generates the UI
    5. When a user interacts with the application, the JavaScript modifies the user interface as needed (return to the previous step).
  • Pros
    • Enables highly interactive and immersive user experiences
  • Caveats
    • Complex
    • No built-in metadata integration
    • Lack of an integrated developer experience. The Force.com Developer Console doesn’t explicitly support these JavaScript applications. Need to store javascript library in Static Resource
Lightning Components
  • UI Generation-Client-side (JavaScript)
  • Data and Business Logic-Apex controller
  • Workflow
    1. The user requests an application or a component
    2. The application or component bundle is returned to the client
    3. The browser loads the bundle
    4. The JavaScript application generates the UI
    5. When the user interacts with the page, the JavaScript application modifies the user interface as needed (return to previous step)
  • Pros
    • Enables highly interactive and immersive user experiences
    • Aligns with Salesforce user interface strategy
    • Built on metadata from the foundation, accelerating development
    • The Developer Console supports Lightning components, so there’s an integrated developer experience
  • Caveats
    • Higher learning curve compared to Visualforce
    • Higher complexity than Visualforce—you’re building an application, not a page
    • Since Lightning components are new, there are still some features that aren’t supported
    • There are a limited number of out-of-the-box components
Salesforce Trailhead Link

No comments:

Post a Comment