XWiki

Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Slides

Failed to execute the [groovy] macro. Cause: [The execution of the [groovy] script macro is not allowed in [incubator:Presentation.PresentationSheet]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

XWiki

A collaborative development platform runtime based on the wiki paradigm

Vincent Massol
October 2011

Agenda

  • What is XWiki?
  • Development Capabilities
  • Why use XWiki?
  • QA

What is XWiki?

Is it a first gen Wiki?

wikipedia.png

Yes, but not only!

Is it an Advanced Wiki?

advancedwiki.png

Yes, but not only!

It’s a dev platform!

XWiki Platform

platform.png

... for developing (collaborative) web applications

Multiple Usages

usages.png

Development Capabilities

Scripting in Pages (1/2)

{{groovy}}
@Grab(group="org.codehaus.groovy.modules.http-builder",
  module="http-builder", version="0.5.1")
import groovyx.net.http.*

def http = new HTTPBuilder( "http://nexus.xwiki.org/nexus/" )
def resp = http.get( path: "service/local/repositories")

println "|=Name|=Type|=Location"
resp.data."repositories-item".each() {
  println "|${it.name}|${it.repoType}|${it. contentResourceURI}"
}
{{/groovy}}

demo.png

Scripting in Pages (2/2)

{{velocity}}
#set ($xwql = "where doc.content like '%welcome%'")
#foreach ($item in $services.query.xwql($xwql).execute())
 #if ($request.confirm == "1")
   #set ($itemDoc = $xwiki.getDocument($item))
    $itemDoc.setContent($itemDoc.getContent().replaceAll(
     "welcome", "bienvenue"))
    $itemDoc.save("Replaced bienvenue")
    * [[$item>>$item]] replaced!
 #else
    * [[$item>>$item]]
 #end
#end

[[Replace "welcome" by "bienvenue">>?confirm=1]]
{{/velocity}}

demo.png

Adding MetaData

  • Ability to associate arbitrary 
data to any wiki page
    • Enable structure in the wiki
    • Enable Application development
  • Future: Application Within Minutes

graal.png

demo.png

Wiki Macros

wikimacros.png

demo.png

Skinning & Theming

skinning.png

demo.png

Components

@ComponentRole
public interface Macro
{
    List<Block> execute();
}
@Component
@Named("message")
@Singleton
public class MessageMacro implements Macro
{
   @Inject
   private Execution execution;

   @Inject
   @Named("box")
   private Macro boxMacro;

   public List<Block> execute()
   {
       ...
   }
}

META-INF/components.txt

org.xwiki.rendering.internal.macro.message.MessageMacro

extensions.xwiki.org

extensions.png

Why use XWiki?

Long tail of Apps

longtail.png

XWiki is the Excel of the Web!

Pros (1/2)

  • Iterative, Need-based development
  • Continuous Delivery
    • Online immediately (no deployment needed)
  • Works from day one, immediate feedbacks

Pros (2/2)

  • Work collaboratively on creating applications
    • Designers can style while devs create logic
  • Open source 
  • Strong and meritocratic community

Cons

  • Save code in SCM
  • Low integration with existing dev tools
  • Not an official standard
  • Higher “risk”, less trained devs, etc

Q&A

qa.png

Contact

Vincent Massol

vincent@xwiki.com
skype: vmassol
http://about.me/vmassol

http://xwiki.org
http://xwiki.com

vincent.png