MojoMojo - the Elegant wiki, Catalyst-powered

Post on 08-May-2015

8.235 views 0 download

description

MojoMojo is the most complex open source Catalyst application developed to date. It is a Web2.0 wiki with AJAX live preview, hierarchical structure, tags, diffs, pluggable syntax, permissions/ACL, attachments, RSS feeds, a photo gallery, edit conflict resolution via 3-way merge, themes/skinning, localization, built-in full-text search, and a reverse index. Since it's built on top of the Perl Catalyst Web framework, MojoMojo supports any Web server, and includes its own standalone one. It also support any database backend supported by the DBIx::Class ORM, and has been successfully tested with PostgreSQL, SQLite, and MySQL.

Transcript of MojoMojo - the Elegant wiki, Catalyst-powered

MojoMojoThe Elegant wiki, Catalyst-powered

Dan Dascalescu (dandv)

YAPC::NA2009-Jun-23

Twitter: mojomojowiki

Yet Another Perl Wiki?

Not really.

Wikimatrix

…and more

Perl wikis

• TWiki– Foswiki fork

• Socialtext• UseMod

– Oddmuse

• PodWiki• ikiwiki• November• WebGUI

Differentiating wiki features

• Hosted vs. install your own

• Storage: text files vs. database

• Page structure: flat vs. hierarchical

• Editing usability – preview?

• Folksonomy: tags?

• Access control

Storage

• Flat text– Scales “reasonably well”, ~10k pages– CERN: “users of larger webs will

experience slower search and index response times”

– Yahoo!: >300k pages, but slow

• Database– Mediawiki– Pages in the millions

Page structure

Tree hierarchy Flat structure

/geography/europe/france/paris Paris

/geography/usa/texas/paris Paris, Texas

/mythology/greek/paris Paris (mythology)

/botany/paris Paris (genus)

When hierarchy doesn’t cut it

You encounter this dog in a park in Paris, France

SuperFantastic - “Buddha Dog”, http://www.flickr.com/photos/35423169@N00/50088733

Under what path do you wiki about this?

Q: Which hierarchical path?

• travel/france/fun

• travel/fun/france

• fun/animals

• fun/travel

• animals/fun

A: it doesn’t really matter

• Add tags:– travel– France– Paris– animals– dog– fun– Prozac

Editing usability

• Wikipedia editing study

Bolt|peters user experience - http://boltpeters.com/wikipedia/

Study finding

• The vast majority of users pulled up another instance of the Wikipedia page they were editing in order to see what it "really" looked like.

Usability recommendation

• Provide users a live preview of what the page looks like as the user edits it.

WYSIWYG not a panacea yet

• Show me the code

• Crippled - dive demo at Foswiki

Access control

Wiki theory

• “Everyone should be able edit any page”

Theory vs. practice

• In theory, there is no difference between theory and practice.In practice, there is.- Yogi Berra

Wiki practice

• The Movable Type wiki (the old, unofficial one) was closed down due to vandalism they couldn’t stop. - Deane Barker, Gadgetopia, http://gadgetopia.com/post/6595

Other features

• Extensibility

• Markup language

Perl wiki candidates

TWiki

• Evil

• Use Foswiki

Foswiki

• Forked off TWiki

• Storage: text files in RCS

• Page structure: 2-level, web/page

• Tags: no

• Markup language: TWiki only (+HTML)

• Preview: static, sequential; or WYSIWYG

• Tons of plugins

Foswiki:- flat structure+ breadcrumbs

ikiwiki

• Storage: text files in RCS

• Markup language: flexible

• Preview: static - code then output

• Tags: no

• Barebones

• Last release: 2008-Oct

November

• Storage: ?

• Page structure: ?

• Tags: ?

• Markup language: ?

• Preview: ?

PodWiki

• Storage: text files

• Markup language: multiple

• Abandoned since 2007

Socialtext

• Hosted• Target: mostly enterprise• Socialtext Open source code on GitHub• Storage: PostgreSQL via DBI• Markup language: multiple• Socialtext Unplugged works offline via

TiddlyWiki + synching• 3 people on #socialtext

– Topic: #socialtext - your place for git help

UseModWiki

• Derived from the original arcane WikiWikiWeb

• Links are always like “GlueTheWordsTogether”

• Abandoned since 2007

• OddMuse forked off it

Oddmuse

• Storage: text files (no RCS)

• Page structure: abandoned children

• Preview: static - output then code

• Markup language: plugins

• “Oddmuse is one Perl script” (CGI)

• 7 folks on #oddmuse

Who’s the parent of this page?

WebGUI

• Popular as a CMS• A massive case of Not Invented Here Syndrome:

– Auth.pm– Cache.pm– Session.pm– SQL.pm: “Package for interfacing with SQL

databases. This package implements Perl DBI functionality in a less code-intensive manner and adds some extra functionality.”

The problems so far

• Storage in text files

• Preview sucks

• No hierarchical page structure

• No tags

MojoMojo

• A Web2.0 wiki, web-server and database-backend agnostic, with live side-by-side AJAX preview, hierarchical page structure, pluggable syntax (HTML + Markdown/Textile, POD), tags, page permissions, RSS feeds, conflict resolution via 3-way merge, attachments with photo gallery, skinning, built-in search, localized in 9 languages, and plugins for DocBook,

Authors

• Marcus Ramberg

• On GitHub:– http://github.com/marcusramberg/mojomojo

Technology

• Catalyst• DBIx::Class, SQL nested set trees• Template::Toolkit• HTML::FormFu• KinoSearch• Algorithm::Diff• HTML::Defang• …and the rest of CPAN

Live preview, try it @ mojomojo.org

Hierarchical page structureand breadcrumbs

Pluggable syntax

• Formatter chain runs in order:– HTML::Defang– [[Wikilinks]]– POD– Markdown/Textile

Skinnable

RSS feeds

Extending MojoMojo(live demos)

Creating a simple formatter

• A CPAN hyperlink

• {{cpan My::Module}} -> http://search.cpan.org/perldoc?My::Module

MojoMojo’s Future

• Major efforts:– Moosify– KiokuDB?– Migrate MediaWiki databases

• 40+ suggestions at http://mojomojo.ideascale.com

Resources

• http://mojomojo.org

• #mojomojo on irc.perl.org

• Twitter: mojomojowiki

• mojomojo.ideascale.com - suggestions

• Source code on GitHub

<clap/>