XWiki Presentation - PowerPoint PPT Presentation

About This Presentation
Title:

XWiki Presentation

Description:

http://localhost:8080/xwiki/bin/view/MySpace/MyPage ... Find more (and define your own) under /xwiki/skins/albatross/macros.vm. XWiki Distributions ... – PowerPoint PPT presentation

Number of Views:1544
Avg rating:3.0/5.0
Slides: 42
Provided by: ltn
Category:

less

Transcript and Presenter's Notes

Title: XWiki Presentation


1
XWiki Presentation
2
Web/Wiki History
(1) Representative event 1991 Web first used in a small, academic community Technologies becoming popular HTTP, HTML, GIF, JPEG Content viewedit Tim Berners Lee BrowserEditor HTML preprocessors
(2) 1997 E-commerce application Amazon.com IPO Presentation-oriented HTML, JavaScript, Java Applets, PHP WYSIWYG editors (FrontPage), Navigator and MS Explorer
(3) 2001 Collaborative content creation in Wikipedia.org starts CSS XHTML and XML-related markup J2EE Web Apps (servletsJSP) Web-based Content management systems (CMS), wiki-formats
(4) Since 2005 - AJAX, Web 2.0, www.37signals.com, Google Docs, Mashups, 2nd generation wikis. RubyRails, Semantic Web (RDF/OWL), SOA Content syndication (RSSRDF), portlets, wiki extensible by macros, plugins and scripting
3
"Long Tail" 2nd Generation Wikis
  • Pareto principle (80-20 rule) and "Long Tail".
    Various software solutions - spellcheckers,
    Amazon.com, Google.com show that it is essential
    to handle "long tails" well.

- Applications like Atlassian Confluence and
XWiki claim to be the MS Access and MS Excel of
the Web age. - It should be easy to configure
simple Web forms and sort all kinds of simple
data and documents - to bring the advantages of
packaged development to the everyday user.
4
Remarks on XWiki Installation
  • Windows installer - Jetty Web Server HSQLDB
    (usually a private XWiki)
  • Multiple user XWiki - e.g. Apache2Tomcat5.5
    MySQL.

XWiki pre-defined objects/templates
Custom objects/templates
XWiki J2EE Web Application (Struts, Hibernate,
Maven2 modules...)
  • Java Application Server
  • Jetty
  • Apache Tomcat
  • Apache Geronimo
  • Resin
  • JBoss
  • Oracle OC4J
  • BEA WebLogic
  • IBM WebSphere
  • ... Anything that can run J2EE Servlet 2.4 spec.
  • Database Server
  • Hypersonic (HSQLDB)
  • MySQL
  • Postgre
  • Oracle XE
  • ... Anything one can connect via JDBC or ODBC.

5
Spaces
  • Space - a logical grouping of pages
  • Every page belongs to a space
  • Easier to manage user permissions
  • Wiki-Notation MySpace.MyPage external link
  • http//localhost8080/xwiki/bin/view/MySpace/MyPag
    e
  • Each space has default starting-page
    MySpace.WebHome external link
    http//localhost8080/xwiki/bin/view/MySpace/
    Note the ending slash (/)!
  • Space "Main" is pre-defined Main.WebHome is
    the default homepage document

6
Creating a new page or space
  • Create a link to an empty page Click on it!
  • Links to nonexisting pages display with "?".
    Clicking that link also creates page.

7
Administer a Page or Space
  • Pick a space, press Add Access Right Entry
  • Select a group or a user pick level and
    allow/deny
  • Levels admin/view/edit/comment/delete/register/pr
    ogramming

8
Headings 
  • Prefix line with number for heading
  • 1 for heading
  • 1.1 for sub-heading
  • 1.1.1 for sub-sub-heading
  • Etc
  • Always use "1" and "1.1" (not "2", "2.3", etc.)
  • Needs to be at the start of line
  • Can also use html tags (like lth1gt...lt/h1gt etc.)

9
Table of Content - macro
  • Note! Long Web documents are not good.
  • Use velocity macro toc(init max number)
  • Init Heading level to display
  • Max Maximum number of nested levels
  • Number Boolean, whether to number results
  • Automatically creates links to headings
  • Examples
  • toc("" "" "") or, say,
  • toc(1 5 true)

10
Text Effects 
  • Bold
  • Surround text with asterisks i.e. Bold
  • Equivalent to strong tag - ltstronggtBoldlt/stronggt
  • Italics
  • Surround text with tildes i.e.  Italics
  • Equivalent to emphasized tag i.e.
    ltemgtItalicslt/emgt
  • Strike
  • Surround text with dashes i.e. Stricken
  • Use deleted tag i.e. ltdelgtStrickenlt/delgt

11
Lists and Bullet Points 
  • Prefix text with (or 1. 1.1. 1.a )
  • The number of s controls indent. Consider also
    using headings / toc
  • Examples
  • 1. First 
  • 1. Second 
  • 1. Second sub-bullet 
  • 1. Second sub-bullet
  • Third. Should not introduce\\ line-breaks,
    except forced ones.
  • 1a. Third A
  • 1a. Third B
  • 1. Fourth

Shopping List Cake  Flour  Eggs 
Sugar  Bananas  Tomatoes 
12
Creating a Hyperlink 
  • Syntax  
  • Link to external website - Text label gt
    http//www.accenture.lv or just
    http//www.accenture.lv
  • Link with different display text label gt
    Space.Name or labelSpace.Name (pipe allows
    refactoring of links, when pages are renamed).
  • Link to given space and page Space.SomeName
    (the link is displayed with space "Some Name").  
  • Link to page in same space SomeName

13
Quiz
  • Question What is the difference between two
    links MyProject., MyProject.WebHome and
    MyProject if used in the document
    OtherSpace.Aa
  • Answer The first two refer to the default page
    (WebHome) of the space "MyProject". The last one
    refers to a page "MyProject" in the current
    document space. Their links are respectively
  • http//localhost8080/xwiki/bin/view/MyProject/
    and
  • http//localhost8080/xwiki/bin/view/OtherSpace/My
    Project

14
Tables 
  • Creates an IBM formatted table
  • Each row must be on its own line
  • Example
  • table
  • Head1 Head2 Head3
  • Row1.1 Row1.2 Row1.3
  • Row2.1 Row2.2 Row 2.3
  • table

15
Attachments and Pictures 
  • You can attach large files to a page
  • To display a link to an attachment
  • attachfilename.doc
  • To display an image in the page
  • imagepicture.jpg
  • To display a remote image
  • ltimg src/xwiki/bin/download/Space/Page/pictu
    re.jpg /gt

16
Escaping
  • Use \ to escape individual characters
  • Example
  • \table , \Button\
  • \\ to display \
  • May need to use html to display certain
    characters
  • lt instead of lt
  • gt instead of gt
  • x5C or 92 instead of \

17
Displaying Code
  • Use codexml or code (i.e. codejava) tags
    to indicate that a block of text is code.
  • Example
  • codejava
  • try
  •         // Load the JDBC driver
  •         String driverName "org.gjt.mm.mysql.Driv
    er"
  •         Class.forName(driverName)
  •     catch (ClassNotFoundException e)
  •         // Could not find the driver
  •    
  • code

18
Blocks of Plaintext
  • Use PRE text /PRE to stop the wiki processing
    text.
  • Use ltPREgt text lt/PREgt to stop HTML processing
    text.

19
Using Velocity macros
  • toc('' '' '')
  • Highlighted blocks
  • info('Info message')
  • warning('Warning message')
  • error('Error message')
  • floatingbox('Surrounded box with text')
  • includeInContext("MySpace.MyPage")
  • Find more (and define your own) under
    /xwiki/skins/albatross/macros.vm

20
XWiki Distributions
  • XWiki Enterprise , an extensible Enterprise wiki,
  • XWiki Enterprise Manager , an application for
    managing farms of wikis,
  • XWiki Watch , a collaborative RSS reader with a
    UI built using GWT,
  • Chronopolys, a project management application for
    managing portfolio of projects
  • Nearbee, a wiki focused on work spaces with the
    ability to invite users to share them .

21
Editing Objects
1
2
3
22
Some Predefined Objects
  • Open
  • any article,
  • a blog entry,
  • a user page
  • with "Edit"-gt "Objects".
  • You should see something like this

23
Editing Objects
  • From the Objects editor you can add new
    (predefined) objects to your document.
  • Each document in some space is a list of zero or
    more objects (plus the template/text of the
    document itself).
  • Typically each document contains one object - an
    instance of "XWiki.TagClass"

24
Various Modes of Looking at the Document
  • "Edit" -gt "Objects" opens a predefined form with
    text-boxes.
  • There are two more modes (simply) "view" and
    "inline" (or "inline form").

25
Defining Your own Object Classes
  • http//localhost8080/xwiki/bin/view/XWiki/XWikiCl
    asses

26
Class "Todo" - Step 1
  • Open some existing classes
  • Create a new class - Todo

This is the default content for the TODO Class
wizard
27
Class "Todo" - Step 2
  • First click "Edit the Class" and add the class
    attributes (i.e. the properties for all future
    "Todo" objects).
  • It is not easy to remove properties once added -
    one can only Rollback the class definition or
    re-create it.

28
Script for Displaying Todo's
  • 1 Todos
  • set (hql ", BaseObject as obj where
    obj.namedoc.fullName
  • and obj.className'XWiki.TodoClass' and
    obj.nameltgt'XWiki.TodoClassTemplate'")
  • set (todos xwiki.searchDocuments(hql))
  • table
  • DescriptionAssigneeDateStatus
  • foreach (todo in todos)
  • set (todoDoc xwiki.getDocument(todo))
  • set (todoObj todoDoc.getObject("XWiki.TodoC
    lass"))
  • todoObj.Descriptiongttodo todoObj.Assignee
    todoObj.TargetDate todoObj.Status
  • end
  • table

29
Result to display Todo's
  • For this to work robustly, use

30
Making Todo list sortable/filterable
  • lttable id"todoTable" class"grid sortable
    filterable doOddEven" cellpadding"0"
    cellspacing"0" border"0"gt
  • lttr class"sortHeader"gt
  • ltthgtDescriptionlt/thgt
  • ltthgtAssigneelt/thgt
  • ltthgtDatelt/thgt
  • ltth class"unsortable selectFilter"gtStatuslt/th
    gt
  • lt/trgt
  • foreach (todo in todos)
  • lttrgt
  • set (todoDoc xwiki.getDocument(todo))
  • set (todoObj todoDoc.getObject("XWiki.Tod
    oClass"))
  • lttdgttodoObj.Descriptiongttodolt/tdgt
  • lttdgttodoObj.Assigneelt/tdgt
  • lttdgttodoObj.TargetDatelt/tdgt
  • lttdgttodoObj.Statuslt/tdgt
  • lt/trgt
  • end
  • lt/tablegt

31
Resulting List of Todo's
  • Also click to link "tags" (after you have tagged
    some documents).

32
Adding Pagination
  • 1 Todos
  • ltform...
  • lt/formgt
  • set(itemsPerPage 5)
  • if(request.ipp)
  • set(itemsPerPage xwiki.parseInt(request.ip
    p))
  • end
  • set(pageNumber 0)
  • if(request.page)
  • set(pageNumber xwiki.parseInt(request.page
    ))
  • end
  • set(startAt itemsPerPage pageNumber)
  • if(startAt lt 0)
  • set(startAt 0)
  • end
  • set (hql ", BaseObject as obj where
    obj.namedoc.fullName and obj.className'XWiki.Tod
    oClass' and obj.nameltgt'XWiki.TodoClassTemplate'")
  • set (count xwiki.getXWiki().search("select
    count(doc) from XWikiDocument doc hql",
    context.context).get(0))
  • set(endAt itemsPerPage (pageNumber 1))
  • if(endAt gt count)

33
Resulting List of Todo's
  • View your objects as paginated list ( have a
    simple form for creating new objects).

34
Add Todo's to the Panel
  • http//localhost8080/xwiki/bin/view/Panels/
  • Add a script between "panelheader" and
    "panelfooter"
  • Should use Hibernate Query language (HQL)
  • set (hql ... )
  • foreach (todo in xwiki.searchDocuments(hql,
    5, 0))
  • todo
  • end

35
Extending XWiki Markup Language
  • Can use Plugins as JARs or Groovy scripting.
  • An example of adding LaTeX plugin to XWiki is
    seen http//www.ante.lv/xwiki/bin/view/MetaAnte/Re
    nderingLatex .

36
XWiki Admin Concerns
  • Manage Users
  • Manage Space and Page Access
  • Configure private blogging spaces and similar
    spaces for users' private use
  • Ensure that can migrate to newer versions
  • Create backups for the whole wiki or some spaces
    only
  • Ensure that XWiki content is available offline

37
AdministrationManaging Users
  • Registered user typically has more rights than
    someone not logged in ("XWikiGuest" vs. a member
    of "XWiki All Group")
  • User registration can be done with confirmation
    e-mail or just by declaring users data
    (first/last name, blog address, etc.)
  • Reset password is
  • Deleting user delete his/her object
  • Log in as one of adminstrators
  • Click top-right link "Administration"
  • Open tab "Users Groups"
  • In the "Users

38
Backups
  • Export XAR files - essentially ZIP archives,
    which contain XWiki-markup pages (with
    meta-information).
  • Readable and nice XAR files can be easily edited
    to select only those spaces you want to import
    back, etc.
  • Downside - XAR mechanism does not work for
    sufficiently large XWiki sites (around 10M).
  • Use "mysqldump" or similar database backup.

39
XWiki Offline
  • http//code.xwiki.org/xwiki/bin/view/Extensions/XE
    clipseExtension
  • Export XWiki and import to your local machine.
  • Create the browsable off-line HTML (standard
    Web-Crawler)

40
Examples
  • http//wiki.bonita.objectweb.org/xwiki/bin/view/Ma
    in/WebHome - Workflow system Bonita
  • http//club.mandriva.com/xwiki/bin/view/Main/2008_
    released - Mandriva user forum

41
References
  • http//www.xwiki.org/xwiki/bin/view/Main/
Write a Comment
User Comments (0)
About PowerShow.com