SlideShare a Scribd company logo
1 of 20
Using Web Scripts in a REST-based Architecture Richard Im Solutions Engineer www.alfresco.com See the recorded webinar here: http:// snurl .com/ webscripts
* What is REST? * What is a Web Script? * Common uses of Web Scripts * Review a Web Script for UI components * Review a Web Script for data retrieval * Sample. Agenda: See the recorded webinar here: http:// snurl .com/ webscripts
Acronym for: Representational State Transfer ,[object Object],[object Object],[object Object],[object Object],What is REST? See the recorded webinar here: http:// snurl .com/ webscripts
Key Rest Principles ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The Principles of REST See the recorded webinar here: http:// snurl .com/ webscripts
REST v. SOAP WS ,[object Object],[object Object],[object Object],[object Object],[object Object],REST Web Services See the recorded webinar here: http:// snurl .com/ webscripts
REST & Alfresco = Web Scripts ,[object Object],[object Object],[object Object],[object Object],[object Object],Alfresco Web Scripts See the recorded webinar here: http:// snurl .com/ webscripts
Alfresco Web Scripts Web Script REST Dispatcher Web Script REST Infrastructure Content Services Rendition Services FreeMarker Repository Search Navigation Security HTML, ATOM, RSS, JSON URL JavaScript 2 3 5 4 6 1 ,[object Object],[object Object],[object Object],[object Object],See the recorded webinar here: http:// snurl .com/ webscripts
What makes a Web Script? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Alfresco Web Scripts cont... See the recorded webinar here: http:// snurl .com/ webscripts
XML Descriptor: docActions.get.desc.xml ,[object Object],[object Object],[object Object],[object Object],[object Object],Alfresco Web Scripts Example <webscript> <shortname> Document Actions (Office Add-In) </shortname> <description> Used by the Office Add-In to perform actions on managed documents </description> <url> /office/docActions </url> <authentication> user </authentication> <transaction> required </transaction> </webscript> See the recorded webinar here: http:// snurl .com/ webscripts
// Client has requested server-side action /* Inputs */ var runAction = args.a; /* Outputs */ var resultString = &quot;Action failed&quot;, resultCode = false; // Is this action targetting a document? var docNodeId = args.n; if ((docNodeId != &quot;&quot;) && (docNodeId != null))‏ { var docNode = search.findNode(&quot;workspace://SpacesStore/&quot; + docNodeId); if (docNode != null && docNode.isDocument) { try { if (runAction == &quot;makepdf&quot;)  { resultString = &quot;Could not convert document&quot;; var nodeTrans = docNode.transformDocument(&quot;application/pdf&quot;); if (nodeTrans != null) { resultString = &quot;Document converted&quot;; resultCode = true; } }... Javscript Controller: docActions.get.js Alfresco Web Scripts Example See the recorded webinar here: http:// snurl .com/ webscripts
Alfresco Web Scripts cont... JSON ATOM HTML See the recorded webinar here: http:// snurl .com/ webscripts
OK Great, now how do I apply this in a REST Architecture? ,[object Object],[object Object],[object Object],[object Object],[object Object],Web Scripts and REST Architecture See the recorded webinar here: http:// snurl .com/ webscripts
Office Plugin ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RESTful UI See the recorded webinar here: http:// snurl .com/ webscripts
Portlets/Gadgets ,[object Object],[object Object],[object Object],[object Object],RESTful UI See the recorded webinar here: http:// snurl .com/ webscripts
Sample DM Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RESTful DM Alfresco ECM Server Your Webapp See the recorded webinar here: http:// snurl .com/ webscripts
Sample Customer DM Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RESTful DM Alfresco ECM Server Your Webapp Alfresco ECM Server See the recorded webinar here: http:// snurl .com/ webscripts Firewall
Sample WCM Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RESTful WCM Alfresco WCM Server Your Webapp Alfresco Runtime Alfresco Runtime Alfresco Runtime See the recorded webinar here: http:// snurl .com/ webscripts Firewall
Links ,[object Object],[object Object],[object Object],[object Object],[object Object],Useful Links See the recorded webinar here: http:// snurl .com/ webscripts
Q&A and Resources 03.04.08 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],See the recorded webinar here: http:// snurl .com/ webscripts
See the recorded webinar 03.04.08 See the recorded webinar here: http:// snurl .com/ webscripts

More Related Content

Viewers also liked

Alfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a NodeAlfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a Node
PASCAL Jean Marie
 
Alfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 TalkAlfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 Talk
PASCAL Jean Marie
 
Alfresco in few points - Node Tutorial
Alfresco in few points - Node TutorialAlfresco in few points - Node Tutorial
Alfresco in few points - Node Tutorial
PASCAL Jean Marie
 

Viewers also liked (20)

Alfresco architecture-overview
Alfresco architecture-overviewAlfresco architecture-overview
Alfresco architecture-overview
 
Introduction about Alfresco webscript
Introduction about Alfresco webscriptIntroduction about Alfresco webscript
Introduction about Alfresco webscript
 
Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
 
PFE Scan (2)
PFE Scan (2)PFE Scan (2)
PFE Scan (2)
 
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + DemoAlfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
 
JM.PASCAL - This is my way...
JM.PASCAL - This is my way...JM.PASCAL - This is my way...
JM.PASCAL - This is my way...
 
Alfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a NodeAlfresco 3.0 Enteprise : View by a Node
Alfresco 3.0 Enteprise : View by a Node
 
Alfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 TalkAlfresco Android - Summit 2013 Talk
Alfresco Android - Summit 2013 Talk
 
ECM - Simple Definition ENG
ECM - Simple Definition ENGECM - Simple Definition ENG
ECM - Simple Definition ENG
 
Alfresco in few points - Node Tutorial
Alfresco in few points - Node TutorialAlfresco in few points - Node Tutorial
Alfresco in few points - Node Tutorial
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012
 
Apache Chemistry: The Alfresco Open Source Implementation of CMIS
Apache Chemistry: The Alfresco Open Source Implementation of CMISApache Chemistry: The Alfresco Open Source Implementation of CMIS
Apache Chemistry: The Alfresco Open Source Implementation of CMIS
 
Mise en place d’un module de génération du Simpl-IS pour L’ERP ODOO (ex. Open...
Mise en place d’un module de génération du Simpl-IS pour L’ERP ODOO (ex. Open...Mise en place d’un module de génération du Simpl-IS pour L’ERP ODOO (ex. Open...
Mise en place d’un module de génération du Simpl-IS pour L’ERP ODOO (ex. Open...
 
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
 
CMIS and Apache Chemistry (ApacheCon 2010)
CMIS and Apache Chemistry (ApacheCon 2010) CMIS and Apache Chemistry (ApacheCon 2010)
CMIS and Apache Chemistry (ApacheCon 2010)
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions
 
Intro to Alfresco for Developers
Intro to Alfresco for DevelopersIntro to Alfresco for Developers
Intro to Alfresco for Developers
 
Getting Started with CMIS
Getting Started with CMISGetting Started with CMIS
Getting Started with CMIS
 

More from Alfresco Software

More from Alfresco Software (20)

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossier
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management application
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of Alfresco
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest API
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Webscripts in an Alfresco REST Architecture

  • 1. Using Web Scripts in a REST-based Architecture Richard Im Solutions Engineer www.alfresco.com See the recorded webinar here: http:// snurl .com/ webscripts
  • 2. * What is REST? * What is a Web Script? * Common uses of Web Scripts * Review a Web Script for UI components * Review a Web Script for data retrieval * Sample. Agenda: See the recorded webinar here: http:// snurl .com/ webscripts
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. // Client has requested server-side action /* Inputs */ var runAction = args.a; /* Outputs */ var resultString = &quot;Action failed&quot;, resultCode = false; // Is this action targetting a document? var docNodeId = args.n; if ((docNodeId != &quot;&quot;) && (docNodeId != null))‏ { var docNode = search.findNode(&quot;workspace://SpacesStore/&quot; + docNodeId); if (docNode != null && docNode.isDocument) { try { if (runAction == &quot;makepdf&quot;) { resultString = &quot;Could not convert document&quot;; var nodeTrans = docNode.transformDocument(&quot;application/pdf&quot;); if (nodeTrans != null) { resultString = &quot;Document converted&quot;; resultCode = true; } }... Javscript Controller: docActions.get.js Alfresco Web Scripts Example See the recorded webinar here: http:// snurl .com/ webscripts
  • 11. Alfresco Web Scripts cont... JSON ATOM HTML See the recorded webinar here: http:// snurl .com/ webscripts
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. See the recorded webinar 03.04.08 See the recorded webinar here: http:// snurl .com/ webscripts