Challenge Overview

Project Overview

Meli command center is a hybrid mobile app for the iPad, iOS 7 that leverages Cordova (PhoneGap) and the Salesforce Mobile SDK.  It will be retrieving most of the data via REST APIs, connecting mostly to a Salesforce Org.  There are some 3rd-party APIs that will be used to pull extra data into the app.

Competition Task Overview

For the coming days, we will launch a series of code challenges for building out prototype to a functioning application. For this challenge, competitors need to integrate the provided iPad prototype with the Assets REST API and get related pages working end to end. 

Below are the User Interface areas to work on:

  • Asset List (This is the modal that appears when you touch on the assets icon in the left panel).  templates/assets-panel.html

    • Asset Name should hyperlink to /assets/:assetId

    • Address under name should map to asset.location field

    • when panel is opened, should show first 20 assets (All)

    • if scrolled to the bottom of the list, load the next 20 assets

    • On the top toggle button, change “By Space” to say “Following.” When toggled to “Following”, the panel list should update to show the results of the “assets I follow” method and handle batching the same way.

    • Ignore “Asset Alert” column for now

    • Planned Service Column - should map back to field (we will update the service to include this field).

    • Spaces/Alerts should be renamed to Related Spaces

      • This should be the Names of the Spaces in the asset.spaces list.  Hyperlink should go to /spaces/:spaceId

    • Follow/Following: If asset.following == true, show green Following.  if not, show blue Follow.  this should already be working, but when the user toggles this, it should call the follow/unfollow REST service defined above.  Update the button to have the new value/style.

  • Asset Detail Page - (From the asset List, touch on an asset name to go to detail page). templates/asset-details.html

    • All the fields/sections described in the Asset List should have the same mapping/functionality on this page (Name, Follow/Following, PlannedService, location, list of spaces).

    • Image should map to asset.profileImage.  This will be a url field.  should lazyload the image when the detail page shows.

    • Chatter/collaboration panel should be ignored for now

User Interfaces should make use of these factory methods below.  Please update UIs to call methods properly and use data returned.  Current prototype data may not be consistent with data structure returned from service calls so you may need to update the related templates and controllers to get the previous prototype to work correctly.

  • Create SFDC_API_URI constant in app.js pointed to our SFDC endpoint (available in forums)

  • Add  support to manage list of assets "assetList" (build onto what already exists, services.js -> AssetService).   

  • On load of application, if the asset list is empty, call the assets REST service:

    • Use “AssetService -> findAll”

  • Types of asset queries should run off stored assetList, not calls to the server. If assetList is empty, requery all assets (lazily load, use AssetService -> findAll). Factory should provide ability to:

    • return all - standard set of all assets. Note: the service should be returning these in alphabetical order and all the queries should keep that sorting.

    • return all that I follow - loop through assetList to find all where asset.following == true

    • return all for a space Id - loop through assetList to find all where the asset.spaces array contains a matching spaceId

    • return asset by assetId - loop through assetList to find a particular asset and return that asset

    • return next 20 (pagination) - should work for “return all” or “return all that I follow”.  allow ability to send batch number.  create variable for batch size - default to 20.  when batch number is sent, return starting with batchNumberx20.

    • method/s to follow or unfollow an asset.  should call the chatter follow REST service. service call criteria are defined below.

      • Follow

        • ChatterService -> followByUserId

          • userId = “me”

          • followData = “{ "subjectId": "{{assetId}}" }”

      • Unfollow

        • ChatterService -> deleteSubscriptionById

          • subscriptionId = {{assetId}}User Interfaces should reflect the above factory methods.  Please update UIs to call methods properly and use data returned.  Current prototype data may not be consistent with data structure returned from service calls so you may need to update the related templates and controllers to get the previous prototype to work correctly.  Below are the User Interface areas to update to use the above queries/methods:

Please ask questions in the challenge forum if you feel anything confusing

Materials Provided

1. iPad Prototype with Angular JS services/controller

2.  Login Account for salesforce org will be provided as per request in the challenge forum

Technologies

1. Apex

2. Salesforce

3. REST

4. PhoneGap



Final Submission Guidelines

Getting Started

  • Download the included zip of iPad prototype app from challenge forum
  • Request login account in the challenge forum
  • Build/run datacenter.xcodeproj in xcode and use the assigned account to login.

Submission Deliverables

  • Upload all your source code as a zip (you can simply zip up your source codes) and provide any documentation and/or instructions that are needed.
  • A Final Documentation that covers Deploy/Install, Configuration for the solution. Please be clear and concise with any setup instructions.

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30042313