Web Programming world is now shifting its gears towards scripting and there are many frameworks evolved recently all focused on the Model – View * pattern. Everything has got its own pros and cons.
- Knockout JS
- Angular JS
- Backbone JS
- Enber JS
All you need is to do some research and find out the best framework that is suitable for your developmental and business needs. After looking into the tutorials and demo I am much interested with the Angular JS as it is easily understood and got a good learning tutorials, help and support on the web. This is a small step towards learning Angular JS as well as integrating it with the SharePoint. (As SharePoint is my bread and butter 🙂 )
OK. Its time to begin the show now. (I’m so much excited about this stuff)
Goal: Show all the list items from a custom list on a SharePoint Page
I used REST API to talk to SharePoint and get the data from the list. I am not going to discuss much about the REST services as many folks has already done a great work on explaining about REST API service
I developed all these stuff using SharePoint Designer.
Upload the required files to the Style Library or any location where you want to store your script files. OR you can use the direct CDNs in your references
- Angualr JS https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js
- jQuery http://code.jquery.com/ui/1.10.3/jquery-ui.min.js
Build a view for displaying the data. Here is a sample for the Employee list
Build a controller file and reference it in the page
Once everything is set in place this will pull the data from the SharePoint list and show it in the template given in the view. I used a table as a template to show data.
I am going to do more research with this new framework and will post you updates. Stay tuned and Happy Coding…!!!