SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere Àhnliche Inhalte

Andere mochten auch

Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
Noushad Kabeer
 
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
 
ECM - Simple Definition ENG
ECM - Simple Definition ENGECM - Simple Definition ENG
ECM - Simple Definition ENG
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
 

Andere mochten auch (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
 

Mehr von Alfresco Software

Mehr von 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
 

KĂŒrzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

KĂŒrzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

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