Built in 60: Build a Simple Wiki with Web Scripts Luis Sala Senior Director of Solutions Engineering www.alfresco.com See ...
Introduction <ul><li>Luis Sala, Senior Director of Solutions Engineering http:// blogs .alfresco.com/ luissala </li></ul><...
Agenda <ul><li>Web Script Overview </li></ul><ul><li>Web Script-based Wiki </li></ul><ul><li>Other Wiki Options </li></ul>...
What are Web Scripts? Web Scripting <ul><li>Agile Script-Driven MVC </li></ul><ul><li>Multiple uses </li></ul><ul><ul><li>...
Components of a Web Script <ul><li>XML Descriptor </li></ul><ul><ul><li>URI Templates </li></ul></ul><ul><ul><li>Authentic...
Two types of Web Scripts… <ul><li>Data Web Script </li></ul><ul><ul><li>RESTstyle / RESTful URL </li></ul></ul><ul><ul><li...
Web Scripts as Gadgets <ul><li>Virtually  any  Web Script can be a gadget by using its URL. </li></ul><ul><li>http:// HOST...
wiki.get.js (part 1) // Extract the Wiki Space DBID from PATH // Eg. http://localhost/alfresco/s/wiki/ 1234 var wikiId = p...
wiki.get.js (part 2) // Get the designated page or home page. if (pageNode == null) { pageNode = wikiSpace.createFile(page...
Other Wiki Alternatives <ul><li>MediaWiki Integration </li></ul><ul><li>Available since Alfresco 2.1 </li></ul><ul><li>Alf...
Wiki Article – MediaWiki Preview  See the recorded webinar here: http:// tinyurl .com/ simplewiki
Wiki Article – MediaWiki Edit  See the recorded webinar here: http:// tinyurl .com/ simplewiki
Wiki Content stored  in Wiki Spaces See the recorded webinar here: http:// tinyurl .com/ simplewiki
Repository with Wiki content and images See the recorded webinar here: http:// tinyurl .com/ simplewiki
Wiki Article Details Page (with Template) See the recorded webinar here: http:// tinyurl .com/ simplewiki
Versioning and Workflow See the recorded webinar here: http:// tinyurl .com/ simplewiki
Edit Content See the recorded webinar here: http:// tinyurl .com/ simplewiki
<ul><li>DEMO </li></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
Q&A and Resources 03.04.08 Q&A and Resources <ul><li>Any Questions? </li></ul><ul><li>Resources: </li></ul><ul><ul><li>wik...
View the recorded webinar <ul><li>See the recorded webinar here: </li></ul><ul><li>http:// tinyurl .com/ simplewiki </li><...
Shapes & Colors Normal Text <ul><li>Bullet </li></ul><ul><ul><li>Sub-Bullet </li></ul></ul>Normal Text Normal Text
Upcoming SlideShare
Loading in...5
×

Alfresco - Building a Really Simple Wiki

13,236

Published on

http://tinyurl.com/5exxyo <-- View recorded webinar
Web Scripts provide a simple means of extending Alfresco\'s functionality. Learn how to apply them to create a simple, bare-bones wiki that can be expanded as the need arises.

This session applies to anyone interested in learning more about Web Scripting and covers:

* Developing Web Scripts
* Creating a simple wiki UI.
* Exposing to the Alfresco UI.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
13,236
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
479
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • Alfresco - Building a Really Simple Wiki

    1. 1. Built in 60: Build a Simple Wiki with Web Scripts Luis Sala Senior Director of Solutions Engineering www.alfresco.com See the recorded webinar here: http:// tinyurl .com/ simplewiki
    2. 2. Introduction <ul><li>Luis Sala, Senior Director of Solutions Engineering http:// blogs .alfresco.com/ luissala </li></ul><ul><li>Former Chief Solutions Architect at Epicentric and Principal SE at Vignette </li></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    3. 3. Agenda <ul><li>Web Script Overview </li></ul><ul><li>Web Script-based Wiki </li></ul><ul><li>Other Wiki Options </li></ul><ul><li>Quick Demonstration </li></ul><ul><li>Q & A </li></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    4. 4. What are Web Scripts? Web Scripting <ul><li>Agile Script-Driven MVC </li></ul><ul><li>Multiple uses </li></ul><ul><ul><li>Roll your own API </li></ul></ul><ul><ul><li>Create new UI components </li></ul></ul><ul><ul><li>Create portlets/widgets </li></ul></ul><ul><ul><li>Expose WCM/AVM features </li></ul></ul><ul><li>Script-based implementation </li></ul><ul><ul><li>Server-side JavaScript </li></ul></ul><ul><ul><li>Freemarker </li></ul></ul><ul><li>Limited only by your imagination </li></ul><ul><ul><li>Integration: Create a mashup </li></ul></ul><ul><ul><li>Search: Exposed to other systems. </li></ul></ul><ul><ul><li>Rich Internet Applications </li></ul></ul><ul><ul><li>Cross-language </li></ul></ul><ul><ul><li>Cross-platform </li></ul></ul>JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) See the recorded webinar here: http:// tinyurl .com/ simplewiki Consumer / Client
    5. 5. Components of a Web Script <ul><li>XML Descriptor </li></ul><ul><ul><li>URI Templates </li></ul></ul><ul><ul><li>Authentication Requirements </li></ul></ul><ul><ul><li>Transactional Requirements </li></ul></ul><ul><li>One or more server-side JavaScript files (Controller) </li></ul><ul><ul><li>One for each HTTP method (GET, PUT, POST, etc.) </li></ul></ul><ul><li>One or more Freemarker templates (View) </li></ul><ul><ul><li>One for each HTTP method and desired output type (HTML, XML, JSON, etc.) </li></ul></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    6. 6. Two types of Web Scripts… <ul><li>Data Web Script </li></ul><ul><ul><li>RESTstyle / RESTful URL </li></ul></ul><ul><ul><li>Returns structured data: </li></ul></ul><ul><ul><ul><li>XML </li></ul></ul></ul><ul><ul><ul><li>JSON </li></ul></ul></ul><ul><ul><ul><li>CSV </li></ul></ul></ul><ul><li>UI Web Script </li></ul><ul><ul><li>Renders self-contained UI. </li></ul></ul><ul><ul><li>Can leverage Data Web Scripts. </li></ul></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    7. 7. Web Scripts as Gadgets <ul><li>Virtually any Web Script can be a gadget by using its URL. </li></ul><ul><li>http:// HOST : PORT /alfresco/wcs/ SCRIPT </li></ul><ul><li>Developers have many choices: </li></ul><ul><ul><li>HTML </li></ul></ul><ul><ul><li>AJAX </li></ul></ul><ul><ul><li>JavaScript </li></ul></ul><ul><ul><li>JSON </li></ul></ul><ul><ul><li>Any combination of the above. </li></ul></ul>JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) iGoogle HTML AJAX JSON See the recorded webinar here: http:// tinyurl .com/ simplewiki
    8. 8. wiki.get.js (part 1) // Extract the Wiki Space DBID from PATH // Eg. http://localhost/alfresco/s/wiki/ 1234 var wikiId = parseInt(url.extension); var nodes = search.luceneSearch(&quot;@sysnode-dbid:&quot; + wikiId) var pageName = args[&quot;p&quot;]; if (pageName == null || pageName == &quot;&quot;) { pageName = &quot;home&quot;; } // end if var pageNode = wikiSpace.childByNamePath(pageName); See the recorded webinar here: http:// tinyurl .com/ simplewiki
    9. 9. wiki.get.js (part 2) // Get the designated page or home page. if (pageNode == null) { pageNode = wikiSpace.createFile(pageName); pageNode.content = &quot;This page has not yet been edited. Please click on the 'Edit' link to modify.&quot; pageNode.save(); } // Translate WikiLinks var WIKI_LINK = /[[([^|]]*)(|([^]]+))?]]/g; var content = (pageNode.content + &quot;&quot;).replace(WIKI_LINK, &quot;<a href=&quot;&quot; + url.service +&quot;?p=$1&quot;>$1</a>&quot;); model.wikiId = wikiId + &quot;&quot;; model.pageNode = pageNode; model.pageName = pageNode.name; model.content = content; See the recorded webinar here: http:// tinyurl .com/ simplewiki
    10. 10. Other Wiki Alternatives <ul><li>MediaWiki Integration </li></ul><ul><li>Available since Alfresco 2.1 </li></ul><ul><li>Alfresco Extension for MediaWiki stores content into Alfresco </li></ul><ul><li>Coming in 3.0: MediaWiki inside Alfresco (Quercus) </li></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    11. 11. Wiki Article – MediaWiki Preview See the recorded webinar here: http:// tinyurl .com/ simplewiki
    12. 12. Wiki Article – MediaWiki Edit See the recorded webinar here: http:// tinyurl .com/ simplewiki
    13. 13. Wiki Content stored in Wiki Spaces See the recorded webinar here: http:// tinyurl .com/ simplewiki
    14. 14. Repository with Wiki content and images See the recorded webinar here: http:// tinyurl .com/ simplewiki
    15. 15. Wiki Article Details Page (with Template) See the recorded webinar here: http:// tinyurl .com/ simplewiki
    16. 16. Versioning and Workflow See the recorded webinar here: http:// tinyurl .com/ simplewiki
    17. 17. Edit Content See the recorded webinar here: http:// tinyurl .com/ simplewiki
    18. 18. <ul><li>DEMO </li></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    19. 19. Q&A and Resources 03.04.08 Q&A and Resources <ul><li>Any Questions? </li></ul><ul><li>Resources: </li></ul><ul><ul><li>wiki .alfresco.com/ wiki /Web_Scripts </li></ul></ul><ul><ul><li>wiki .alfresco.com/ wiki /JavaScript_API </li></ul></ul><ul><li>Join the Content Community </li></ul><ul><ul><li>alfresco.com </li></ul></ul><ul><li>Participate in the Developer Challenge </li></ul><ul><ul><li>alfresco.com/partners/ programme / webscripts / </li></ul></ul><ul><li>Join the Alfresco Facebook Group </li></ul><ul><ul><li>facebook .com/group. php ? gid =6063383762 </li></ul></ul>See the recorded webinar here: http:// tinyurl .com/ simplewiki
    20. 20. View the recorded webinar <ul><li>See the recorded webinar here: </li></ul><ul><li>http:// tinyurl .com/ simplewiki </li></ul>
    21. 21. Shapes & Colors Normal Text <ul><li>Bullet </li></ul><ul><ul><li>Sub-Bullet </li></ul></ul>Normal Text Normal Text
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×