SlideShare a Scribd company logo
Building SharePoint Apps
With
By Ahmed Elharouny
22nd October 2014
Page
Agenda
› Introduction
› AppModelOverview(SharePoint-Hosted, SPA,AngularJS, RequireJS)
› High-levelDesign
› Demo&SampleCode
› Optimization
› UnitTesting
› Q&A
/ Copyright ©2014 by Readify Pty Ltd2
Page
Introduction
/ Copyright ©2014 by Readify Pty Ltd3
Ahmed Elharouny
Senior Developer at Readify
http://www.harouny.com
Twitter: @harouny
Github: harouny
• Microsoft Technology Specialist (MCTS Web)
• Professional Scrum Master (PSMI)
• 9 years of experience in web development
• I’m not a SharePoint specialist
• I started SharePoint Live Charts to learn about the new app model
Page
App Model
Overview
/ Copyright ©2014 by Readify Pty Ltd4
Page
SharePoint Hosted
/ Copyright ©2014 by Readify Pty Ltd5
• Development experience
• Instant deployment to SharePoint while modifying in debug mode.
• No external deployment steps
• i.e. IIS, Azure.
• No extra costs & concerns
• Who is paying for resources?
• Leverage SharePoint for services and data storage
• Using client APIs REST or CSOM.
• APP and data is a single unit
• Backup, Restore, Install, Uninstall single unit.
• Still protecting app business logic
• Using business connectivity services and workflows.
Page
Single Page App
/ Copyright ©2014 by Readify Pty Ltd6
• Simpler in development
• No need to manage user moving from page to page.
• Only update what you want to update.
• Persist state on client.
• Rich user experience
• No page reloads.
• Allow of rich UX.
• Progressively download resources when required.
• Modular approach
• Think about modules, not pages.
Page
AngularJS
/ Copyright ©2014 by Readify Pty Ltd7
• A JavaScript framework for building client side applications that
runs in the browser.
• Started by Google but quickly became a popular open source
project.
• It aims to simplify development, maintaining and testing
applications.
Page
AngularJS
/ Copyright ©2014 by Readify Pty Ltd8
1999 Inline
2007 Unobtrusive
Knockout
Angular
2013 Data Binding
Page
AngularJS
/ Copyright ©2014 by Readify Pty Ltd9
• Dependency Injection
• Data Binding
• Routing
• Templates
• MVC or MVVM
• Ajax, REST
• Unit Testing
• Animation
Page
AngularJS
/ Copyright ©2014 by Readify Pty Ltd10
• Modules
• Controllers
• Directives
• Filters
• Services
• Configs
• Routes
Services Recipes
Constant
Page
AngularJS - Modules
/ Copyright ©2014 by Readify Pty Ltd11
- A module is a logical container for the different parts of your app –
controllers, services, filters, directives, etc.
- A module is not a namespace.
DependenciesName
Page
AngularJS - Modules
/ Copyright ©2014 by Readify Pty Ltd12
Page
AngularJS - Controllers
/ Copyright ©2014 by Readify Pty Ltd13
- A Controller is a JavaScript function that is used to work with scope (view
model).
- Controllers are attached to DOM using ng-controller directive.
Name Dependencies Function
Page
AngularJS - Scope
/ Copyright ©2014 by Readify Pty Ltd14
- AngularJS will always create a root scope driven by the ng-app
directive.
ng-app
ng-controller
ng-controller
Page
AngularJS - Directives
/ Copyright ©2014 by Readify Pty Ltd15
Directives are markers on a DOM element that tell AngularJS to attach a
specified behavior to that DOM.
Built-InDirectives
Page
AngularJS - Directives
/ Copyright ©2014 by Readify Pty Ltd16
CustomDirectives
- Custom directive can be used to provide a declarative markup approach
and reusability.
- There are many ways to declare a directive in markup using (HTML
attributes, elements, comments and CSS classes).
Page
AngularJS - Services
/ Copyright ©2014 by Readify Pty Ltd17
- Services is a way to organize and share code across app.
- Services are lazy initialized and singleton.
Built-InServices
• $http
• $log
• $window
CustomServices
Page
RequireJS
/ Copyright ©2014 by Readify Pty Ltd18
• RequireJS is a JavaScript file and module loader.
• It supports Asynchronous Module Definition AMD.
• Asynchronous Module Definition (AMD) API specifies a
mechanism for defining modules such that the module and its
dependencies can be asynchronously loaded.
Page
RequireJS
/ Copyright ©2014 by Readify Pty Ltd19
common.js
common.config.js
• Load scripts faster.
• Manage script dependencies
for you.
• Script loading is
Configurable.
• Mock scripts during test.
Page / Copyright ©2014 by Readify Pty Ltd20
High-level Design
Route
Page / Copyright ©2014 by Readify Pty Ltd21
High-level Design
Page
Demo
/ Copyright ©2014 by Readify Pty Ltd22
https://github.com/harouny/GitHubAppForSharePoint
Sample Code
Page
Optimization
/ Copyright ©2014 by Readify Pty Ltd23
Page
RequireJS Optimizer
/ Copyright ©2014 by Readify Pty Ltd24
• Combine related scripts together into minified files.
• Uses r.js file.
• node is recommended to run it. (java, browser can do it as well).
• Add this to a Post Build Script.
Build output
configs
Build folder
Page
RequireJS Optimizer
/ Copyright ©2014 by Readify Pty Ltd25
• You can switch between the optimized and the non-optimized versions.
• The non-optimized version is needed during development and debugging.
Page
Optimizing HTML files
/ Copyright ©2014 by Readify Pty Ltd26
• You can minify, combine, cache HTML templates used by AngularJS so that
Angular doesn’t need to make an Ajax request for every new template.
• Can be done manually or with a tool like grunt-angular-templates
See it in action
Page
Unit Testing
/ Copyright ©2014 by Readify Pty Ltd27
Page
Unit Testing
/ Copyright ©2014 by Readify Pty Ltd28
• Jasmine
• Chutzpah
• Chutzpah configuration file
• RequireJS setup
• angular-mocks
Page
Q & A
/ Copyright ©2014 by Readify Pty Ltd29
Thank you

More Related Content

What's hot

Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside App
Ravi Teja
 
Angular resolver tutorial
Angular resolver tutorialAngular resolver tutorial
Angular resolver tutorial
Katy Slemon
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
Rolands Krumbergs
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
NCCOMMS
 
Angular overview
Angular overviewAngular overview
Angular overview
Thanvilahari
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
 
Build HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI CoreBuild HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI Core
Lohith Goudagere Nagaraj
 
Angular js for enteprise application
Angular js for enteprise applicationAngular js for enteprise application
Angular js for enteprise application
vu van quyet
 
Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...
AEM HUB
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePoint
Kirti Prajapati
 
Server rendering-talk
Server rendering-talkServer rendering-talk
Server rendering-talk
Daiwei Lu
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
Harbinger Systems - HRTech Builder of Choice
 
Single page applications & SharePoint
Single page applications & SharePointSingle page applications & SharePoint
Single page applications & SharePoint
Fabio Franzini
 
Build Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia DevicesBuild Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia Devices
Lohith Goudagere Nagaraj
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien
 
Maurice de Beijer
Maurice de BeijerMaurice de Beijer
Maurice de Beijer
CodeFest
 
How to Build Dynamic Forms in Angular Directive with a Backend
How to Build Dynamic Forms in Angular Directive with a BackendHow to Build Dynamic Forms in Angular Directive with a Backend
How to Build Dynamic Forms in Angular Directive with a Backend
Backand Cohen
 
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
Lohith Goudagere Nagaraj
 
Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17
BIWUG
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
Max Klymyshyn
 

What's hot (20)

Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside App
 
Angular resolver tutorial
Angular resolver tutorialAngular resolver tutorial
Angular resolver tutorial
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
Angular overview
Angular overviewAngular overview
Angular overview
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
 
Build HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI CoreBuild HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI Core
 
Angular js for enteprise application
Angular js for enteprise applicationAngular js for enteprise application
Angular js for enteprise application
 
Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePoint
 
Server rendering-talk
Server rendering-talkServer rendering-talk
Server rendering-talk
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
 
Single page applications & SharePoint
Single page applications & SharePointSingle page applications & SharePoint
Single page applications & SharePoint
 
Build Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia DevicesBuild Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia Devices
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
 
Maurice de Beijer
Maurice de BeijerMaurice de Beijer
Maurice de Beijer
 
How to Build Dynamic Forms in Angular Directive with a Backend
How to Build Dynamic Forms in Angular Directive with a BackendHow to Build Dynamic Forms in Angular Directive with a Backend
How to Build Dynamic Forms in Angular Directive with a Backend
 
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
Server Side Responsive Layouts for ASP.NET WebForms using Telerik UI for ASP....
 
Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 

Similar to Building share point apps with angularjs

Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
Ahmed Elharouny
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
Florian Fesseler
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
Chakkrit (Kla) Tantithamthavorn
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMconnectwebex
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
 
Android Mobile Development Course
Android Mobile Development Course Android Mobile Development Course
Android Mobile Development Course
RMS Software Technologies
 
Applying Advanced Techniques to Azure Web Apps
Applying Advanced Techniques to Azure Web AppsApplying Advanced Techniques to Azure Web Apps
Applying Advanced Techniques to Azure Web Apps
Roy Kim
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring Toolkit
AppDynamics
 
The app of the possible Shailen Sukul MBUG gets Modern Apps and Modern User ...
The app of the possible Shailen Sukul MBUG  gets Modern Apps and Modern User ...The app of the possible Shailen Sukul MBUG  gets Modern Apps and Modern User ...
The app of the possible Shailen Sukul MBUG gets Modern Apps and Modern User ...
CSIRO National AI Centre
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
Priyanka Verma
 
Building your own calendly using amazon app sync
Building your own calendly using amazon app syncBuilding your own calendly using amazon app sync
Building your own calendly using amazon app sync
Dhaval Nagar
 
Adobe App Builder Overview & Get Started Guideline
Adobe App Builder  Overview & Get Started GuidelineAdobe App Builder  Overview & Get Started Guideline
Adobe App Builder Overview & Get Started Guideline
Tuyen Nguyen Ngoc
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
Apigee | Google Cloud
 
Sam segal resume
Sam segal resumeSam segal resume
Sam segal resume
samuel segal
 
Anjular js
Anjular jsAnjular js
Anjular js
Naga Dinesh
 
Selenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver BasicsSelenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver Basics
ITProfessional Academy
 
Angular JS Training Agenda
Angular JS Training AgendaAngular JS Training Agenda
Angular JS Training Agenda
RMS Software Technologies
 

Similar to Building share point apps with angularjs (20)

Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
Android Mobile Development Course
Android Mobile Development Course Android Mobile Development Course
Android Mobile Development Course
 
Applying Advanced Techniques to Azure Web Apps
Applying Advanced Techniques to Azure Web AppsApplying Advanced Techniques to Azure Web Apps
Applying Advanced Techniques to Azure Web Apps
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring Toolkit
 
The app of the possible Shailen Sukul MBUG gets Modern Apps and Modern User ...
The app of the possible Shailen Sukul MBUG  gets Modern Apps and Modern User ...The app of the possible Shailen Sukul MBUG  gets Modern Apps and Modern User ...
The app of the possible Shailen Sukul MBUG gets Modern Apps and Modern User ...
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
 
Building your own calendly using amazon app sync
Building your own calendly using amazon app syncBuilding your own calendly using amazon app sync
Building your own calendly using amazon app sync
 
Adobe App Builder Overview & Get Started Guideline
Adobe App Builder  Overview & Get Started GuidelineAdobe App Builder  Overview & Get Started Guideline
Adobe App Builder Overview & Get Started Guideline
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 
Sam segal resume
Sam segal resumeSam segal resume
Sam segal resume
 
Anjular js
Anjular jsAnjular js
Anjular js
 
Selenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver BasicsSelenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver Basics
 
Angular JS Training Agenda
Angular JS Training AgendaAngular JS Training Agenda
Angular JS Training Agenda
 
SamSegalResume
SamSegalResumeSamSegalResume
SamSegalResume
 

More from Ahmed Elharouny

Deep dive into azure durable functions
Deep dive into azure durable functionsDeep dive into azure durable functions
Deep dive into azure durable functions
Ahmed Elharouny
 
Applying microservices principles to front end
Applying microservices principles to front endApplying microservices principles to front end
Applying microservices principles to front end
Ahmed Elharouny
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
Ahmed Elharouny
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require js
Ahmed Elharouny
 
Advanced Jquery
Advanced JqueryAdvanced Jquery
Advanced Jquery
Ahmed Elharouny
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
Ahmed Elharouny
 
Design patterns
Design patternsDesign patterns
Design patterns
Ahmed Elharouny
 

More from Ahmed Elharouny (7)

Deep dive into azure durable functions
Deep dive into azure durable functionsDeep dive into azure durable functions
Deep dive into azure durable functions
 
Applying microservices principles to front end
Applying microservices principles to front endApplying microservices principles to front end
Applying microservices principles to front end
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require js
 
Advanced Jquery
Advanced JqueryAdvanced Jquery
Advanced Jquery
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Design patterns
Design patternsDesign patterns
Design patterns
 

Recently uploaded

Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
iemerc2024
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
RicletoEspinosa1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 

Recently uploaded (20)

Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 

Building share point apps with angularjs

  • 1. Building SharePoint Apps With By Ahmed Elharouny 22nd October 2014
  • 2. Page Agenda › Introduction › AppModelOverview(SharePoint-Hosted, SPA,AngularJS, RequireJS) › High-levelDesign › Demo&SampleCode › Optimization › UnitTesting › Q&A / Copyright ©2014 by Readify Pty Ltd2
  • 3. Page Introduction / Copyright ©2014 by Readify Pty Ltd3 Ahmed Elharouny Senior Developer at Readify http://www.harouny.com Twitter: @harouny Github: harouny • Microsoft Technology Specialist (MCTS Web) • Professional Scrum Master (PSMI) • 9 years of experience in web development • I’m not a SharePoint specialist • I started SharePoint Live Charts to learn about the new app model
  • 4. Page App Model Overview / Copyright ©2014 by Readify Pty Ltd4
  • 5. Page SharePoint Hosted / Copyright ©2014 by Readify Pty Ltd5 • Development experience • Instant deployment to SharePoint while modifying in debug mode. • No external deployment steps • i.e. IIS, Azure. • No extra costs & concerns • Who is paying for resources? • Leverage SharePoint for services and data storage • Using client APIs REST or CSOM. • APP and data is a single unit • Backup, Restore, Install, Uninstall single unit. • Still protecting app business logic • Using business connectivity services and workflows.
  • 6. Page Single Page App / Copyright ©2014 by Readify Pty Ltd6 • Simpler in development • No need to manage user moving from page to page. • Only update what you want to update. • Persist state on client. • Rich user experience • No page reloads. • Allow of rich UX. • Progressively download resources when required. • Modular approach • Think about modules, not pages.
  • 7. Page AngularJS / Copyright ©2014 by Readify Pty Ltd7 • A JavaScript framework for building client side applications that runs in the browser. • Started by Google but quickly became a popular open source project. • It aims to simplify development, maintaining and testing applications.
  • 8. Page AngularJS / Copyright ©2014 by Readify Pty Ltd8 1999 Inline 2007 Unobtrusive Knockout Angular 2013 Data Binding
  • 9. Page AngularJS / Copyright ©2014 by Readify Pty Ltd9 • Dependency Injection • Data Binding • Routing • Templates • MVC or MVVM • Ajax, REST • Unit Testing • Animation
  • 10. Page AngularJS / Copyright ©2014 by Readify Pty Ltd10 • Modules • Controllers • Directives • Filters • Services • Configs • Routes Services Recipes Constant
  • 11. Page AngularJS - Modules / Copyright ©2014 by Readify Pty Ltd11 - A module is a logical container for the different parts of your app – controllers, services, filters, directives, etc. - A module is not a namespace. DependenciesName
  • 12. Page AngularJS - Modules / Copyright ©2014 by Readify Pty Ltd12
  • 13. Page AngularJS - Controllers / Copyright ©2014 by Readify Pty Ltd13 - A Controller is a JavaScript function that is used to work with scope (view model). - Controllers are attached to DOM using ng-controller directive. Name Dependencies Function
  • 14. Page AngularJS - Scope / Copyright ©2014 by Readify Pty Ltd14 - AngularJS will always create a root scope driven by the ng-app directive. ng-app ng-controller ng-controller
  • 15. Page AngularJS - Directives / Copyright ©2014 by Readify Pty Ltd15 Directives are markers on a DOM element that tell AngularJS to attach a specified behavior to that DOM. Built-InDirectives
  • 16. Page AngularJS - Directives / Copyright ©2014 by Readify Pty Ltd16 CustomDirectives - Custom directive can be used to provide a declarative markup approach and reusability. - There are many ways to declare a directive in markup using (HTML attributes, elements, comments and CSS classes).
  • 17. Page AngularJS - Services / Copyright ©2014 by Readify Pty Ltd17 - Services is a way to organize and share code across app. - Services are lazy initialized and singleton. Built-InServices • $http • $log • $window CustomServices
  • 18. Page RequireJS / Copyright ©2014 by Readify Pty Ltd18 • RequireJS is a JavaScript file and module loader. • It supports Asynchronous Module Definition AMD. • Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded.
  • 19. Page RequireJS / Copyright ©2014 by Readify Pty Ltd19 common.js common.config.js • Load scripts faster. • Manage script dependencies for you. • Script loading is Configurable. • Mock scripts during test.
  • 20. Page / Copyright ©2014 by Readify Pty Ltd20 High-level Design Route
  • 21. Page / Copyright ©2014 by Readify Pty Ltd21 High-level Design
  • 22. Page Demo / Copyright ©2014 by Readify Pty Ltd22 https://github.com/harouny/GitHubAppForSharePoint Sample Code
  • 23. Page Optimization / Copyright ©2014 by Readify Pty Ltd23
  • 24. Page RequireJS Optimizer / Copyright ©2014 by Readify Pty Ltd24 • Combine related scripts together into minified files. • Uses r.js file. • node is recommended to run it. (java, browser can do it as well). • Add this to a Post Build Script. Build output configs Build folder
  • 25. Page RequireJS Optimizer / Copyright ©2014 by Readify Pty Ltd25 • You can switch between the optimized and the non-optimized versions. • The non-optimized version is needed during development and debugging.
  • 26. Page Optimizing HTML files / Copyright ©2014 by Readify Pty Ltd26 • You can minify, combine, cache HTML templates used by AngularJS so that Angular doesn’t need to make an Ajax request for every new template. • Can be done manually or with a tool like grunt-angular-templates See it in action
  • 27. Page Unit Testing / Copyright ©2014 by Readify Pty Ltd27
  • 28. Page Unit Testing / Copyright ©2014 by Readify Pty Ltd28 • Jasmine • Chutzpah • Chutzpah configuration file • RequireJS setup • angular-mocks
  • 29. Page Q & A / Copyright ©2014 by Readify Pty Ltd29