SlideShare a Scribd company logo
SINGLE PAGE APPLICATION 6
ENG. ISMAIL ENJRENY
Caching
• $cacheFactory
• Service in module ng
• $cacheFactory.Cache
• A cache object used to store and retrieve data, primarily used by $http and the script
directive to cache templates and other data
$cacheFactory
• Factory that constructs Cache objects and gives access to them.
$cacheFactory.Cache
• A cache object used to store and retrieve data, primarily used by $http and the
script directive to cache templates and other data
• Methods
• put(key, value)
• var obj = get(key)
• remove(key)
• removeAll()
• destroy()
• info()
RESTful Services
• AngularJS resources allow us to define object models, and in a descriptive
manner, to specify:
• The server-side URL for the resource
• The types of parameters that are commonly seen for such requests
• You automatically get get, save, query, remove, and delete for free
• Some additional methods that encapsulate specific functionality and business logic
for the object model
• The expected types of responses (an array or an object)
• The headers
$resource
• A factory which creates a resource object that lets you interact with RESTful
server-side data sources.
• The returned resource object has action methods which provide high-level
behaviors without the need to interact with the low level $http service.
$resource(url, [paramdefaults], [actions], options);
$resource (cont.)
var User = $resource('/api/angapi/:id', { id: '@id' });
var user = User.get({ id: 123 }, function () {
alert(user);
});
var user = user.query(function () {
alert(user);
});
NEXT?

More Related Content

PDF
Cassandra rapid prototyping with achilles
ODP
Indexed db
PDF
State of search | drupalcamp ghent
PDF
How to search extracted data
PDF
State of search | drupal dinner
PDF
State of search | drupalcon dublin
PPTX
Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)
KEY
コードで学ぶドメイン駆動設計入門
Cassandra rapid prototyping with achilles
Indexed db
State of search | drupalcamp ghent
How to search extracted data
State of search | drupal dinner
State of search | drupalcon dublin
Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)
コードで学ぶドメイン駆動設計入門

What's hot (20)

PDF
Bonjour, iCloud
KEY
An Evening with MongoDB - Orlando: Welcome and Keynote
PDF
Who's afraid of front end databases?
PDF
iOS & Drupal
PDF
ORM Pink Unicorns
PPTX
Elasticsearch { "Meetup" : "talk" }
PPTX
Utilizing the OpenNTF Domino API
PDF
Redis the better NoSQL
PDF
Simplify AJAX using jQuery
PPTX
Hibernate Performance Tuning @JUG Thüringen
PPTX
Object Oriented Programing in JavaScript
PPTX
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
PPTX
Entity framework amit gupta
PDF
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
PDF
MongoDB Schema Design
PDF
Flex/Flash meets HTML5 Family
PPTX
Getting Started with Javascript
PPTX
Docker & Azure
PDF
Killing Shark-Riding Dinosaurs with ORM
PDF
Starting with MongoDB
Bonjour, iCloud
An Evening with MongoDB - Orlando: Welcome and Keynote
Who's afraid of front end databases?
iOS & Drupal
ORM Pink Unicorns
Elasticsearch { "Meetup" : "talk" }
Utilizing the OpenNTF Domino API
Redis the better NoSQL
Simplify AJAX using jQuery
Hibernate Performance Tuning @JUG Thüringen
Object Oriented Programing in JavaScript
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
Entity framework amit gupta
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
MongoDB Schema Design
Flex/Flash meets HTML5 Family
Getting Started with Javascript
Docker & Azure
Killing Shark-Riding Dinosaurs with ORM
Starting with MongoDB
Ad

Similar to Single page application 07 (20)

PPTX
Building an API in Node with HapiJS
PDF
FITC presents: Mobile & offline data synchronization in Angular JS
PDF
HTML5 JavaScript Interfaces
PPTX
Academy PRO: HTML5 Data storage
PPTX
Single page application 05
ODP
Introduction to Angular js
PPTX
Scale Your Data Tier With Windows Server App Fabric
PPTX
AngularJS 1.x - your first application (problems and solutions)
PDF
Always on! ... or not?
PPTX
AngularJs $provide API internals & circular dependency problem.
PPTX
Angular js 1.0-fundamentals
PDF
Mobile & Desktop Cache 2.0: How To Create A Scriptable Cache
PPTX
Caching up is hard to do: Improving your Web Services' Performance
PPTX
Microsoft Windows Server AppFabric
PDF
Workshop 13: AngularJS Parte II
PDF
Angular.js is super cool
PDF
Simple server side cache for Express.js with Node.js
PPT
Using RESTFUL APIs in ANGULARJS
PPT
Caching for J2ee Enterprise Applications
PPTX
Optimizing Angular Performance in Enterprise Single Page Apps
Building an API in Node with HapiJS
FITC presents: Mobile & offline data synchronization in Angular JS
HTML5 JavaScript Interfaces
Academy PRO: HTML5 Data storage
Single page application 05
Introduction to Angular js
Scale Your Data Tier With Windows Server App Fabric
AngularJS 1.x - your first application (problems and solutions)
Always on! ... or not?
AngularJs $provide API internals & circular dependency problem.
Angular js 1.0-fundamentals
Mobile & Desktop Cache 2.0: How To Create A Scriptable Cache
Caching up is hard to do: Improving your Web Services' Performance
Microsoft Windows Server AppFabric
Workshop 13: AngularJS Parte II
Angular.js is super cool
Simple server side cache for Express.js with Node.js
Using RESTFUL APIs in ANGULARJS
Caching for J2ee Enterprise Applications
Optimizing Angular Performance in Enterprise Single Page Apps
Ad

More from Ismaeel Enjreny (20)

PPTX
Introduction to Elasticsearch
PPTX
Fleet and elastic agent
PPTX
Elastic 101 ingest manager
PPTX
Elastic 101 - API Logs
PPTX
WSO2 Identity Server - Getting Started
PPTX
Elasticsearch k8s
PPTX
ELK Observability 1
PPTX
ELK observability 2
PPTX
Wso2 is integration with .net core
PPTX
Deploy Elasticsearch Cluster on Kubernetes
PPTX
Redis 101 Data Structure
PPTX
Redis 101 - INTRO
PPTX
Elastic 101 ingest manager
PPTX
Getting started with Elasticsearch in .net
PPTX
Elastic 101 log enrichment
PPTX
Elastic 101 index operations
PPTX
Elastic 101 - Get started
PDF
دليل البرمجة باستخدام Dynamo DB للمبتدئين
PPTX
Amazon services iam
PPTX
Amazon services ec2
Introduction to Elasticsearch
Fleet and elastic agent
Elastic 101 ingest manager
Elastic 101 - API Logs
WSO2 Identity Server - Getting Started
Elasticsearch k8s
ELK Observability 1
ELK observability 2
Wso2 is integration with .net core
Deploy Elasticsearch Cluster on Kubernetes
Redis 101 Data Structure
Redis 101 - INTRO
Elastic 101 ingest manager
Getting started with Elasticsearch in .net
Elastic 101 log enrichment
Elastic 101 index operations
Elastic 101 - Get started
دليل البرمجة باستخدام Dynamo DB للمبتدئين
Amazon services iam
Amazon services ec2

Recently uploaded (20)

PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
Cost to Outsource Software Development in 2025
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
history of c programming in notes for students .pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Website Design Services for Small Businesses.pdf
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Salesforce Agentforce AI Implementation.pdf
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Monitoring Stack: Grafana, Loki & Promtail
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Cost to Outsource Software Development in 2025
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
history of c programming in notes for students .pptx
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Download FL Studio Crack Latest version 2025 ?
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Reimagine Home Health with the Power of Agentic AI​
Website Design Services for Small Businesses.pdf
Weekly report ppt - harsh dattuprasad patel.pptx
Nekopoi APK 2025 free lastest update
Complete Guide to Website Development in Malaysia for SMEs
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Digital Systems & Binary Numbers (comprehensive )
Salesforce Agentforce AI Implementation.pdf

Single page application 07

  • 1. SINGLE PAGE APPLICATION 6 ENG. ISMAIL ENJRENY
  • 2. Caching • $cacheFactory • Service in module ng • $cacheFactory.Cache • A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data
  • 3. $cacheFactory • Factory that constructs Cache objects and gives access to them.
  • 4. $cacheFactory.Cache • A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data • Methods • put(key, value) • var obj = get(key) • remove(key) • removeAll() • destroy() • info()
  • 5. RESTful Services • AngularJS resources allow us to define object models, and in a descriptive manner, to specify: • The server-side URL for the resource • The types of parameters that are commonly seen for such requests • You automatically get get, save, query, remove, and delete for free • Some additional methods that encapsulate specific functionality and business logic for the object model • The expected types of responses (an array or an object) • The headers
  • 6. $resource • A factory which creates a resource object that lets you interact with RESTful server-side data sources. • The returned resource object has action methods which provide high-level behaviors without the need to interact with the low level $http service. $resource(url, [paramdefaults], [actions], options);
  • 7. $resource (cont.) var User = $resource('/api/angapi/:id', { id: '@id' }); var user = User.get({ id: 123 }, function () { alert(user); }); var user = user.query(function () { alert(user); });