Learn how to leverage the SharePoint App Architecture by using Single Page Apps.
You will get familiarised with the concept, pros, cons and javascript frameworks that make it possible.
18. Feature
.NET Framework or Silverlight
object models
JavaScript object model
REST/OData endpoints called
from a Windows platform or
JavaScript
Object-oriented programming Yes Yes No
Batch processing Yes Yes No
APIs for conditional processing
and exception handling
Yes No No
Availability of LINQ syntax Yes No No
Combining list data from different
SharePoint web applications
Yes No Yes
Familiarity to experienced
REST/OData developers
No No Yes
Similarity to non-Windows
programming or JavaScript
programming
No Yes Yes
Strong typing for list item fields No (except with LINQ) No
Yes, from Windows platform
No, from JavaScript
Leveraging jQuery, Knockout, and
other JavaScript libraries
No Yes
No, from Windows platform
Yes, from JavaScript
Web app that fits on a single web page
Leverage client side code to provide a great UX
Uses AJAX to load all necessary code with a single page load
Also known as SPA
Reach different devices of different sizes, platforms and browsers.
Fits on a single web page
Keeps navigation history, deep linking
Persists state on the client (in cache or local storage)
Heavy utilization of javascript
Complex coding
No compiler help
SEO challenges
Time consuming /difficult if not utilising a SPA framework or libraries
Demo
Sample SPA
Navigation history and deep linking
Caching
MV* - Separation of concerns using pattern, either MVC, MVVM
Routing and Navigation. Make sure we can go from page to page. It is very likely that we are gonna have an application that will have multiple views, right?
Data Binding – To handle plumbing code to allow data in and out from code to screen.
DOM Templates – ability to have some templates so you don’t need to repeat sections of code to put information on the views
Views – a way to manage and organize, so we can direct which views get loaded and associated to controllers/viewmodels.
Pub / Sub for messaging.
DI – Dependency Injection. Make sure we can manage the dependencies of the application.
Demo
MV*
Routing
Data Binding
DOM templates
Views
DI
Pub/Sub
Demo
REST x JSOM (CSOM)
Complement each other
Can coexist in the same app
With AngularJS, REST integrates better.
More details:SPC:423 Deep dive: REST and CSOM comparison