Impressive, now I know what Webslinger is and what it is capable of!

Thanks

Jacques

From: "Adam Heath" <doo...@brainfood.com>
On 10/11/2010 12:41 PM, Adam Heath wrote:
So, about a month ago, people on this list wanted to see an example
website implemented in webslinger. At the time, I had a preliminary
version of specialpurpose/ofbizwebsite converted. I mentioned that I
would finish that up, and make it available.

However, that component in svn only has 2 real pages; not enough for a
demonstration. So I went looking for more content; I found it on
cwiki.apache.org.

The next question became how to get that data into something more
useable. Well, here is where the fun begins. :)

I have an importer that uses confluence's rpc, to fetch the following
items:

* pages, and all their versions
* labels(no versions)
* parent/child relationships(no versions)
* attachments, and all their versions
* comments(no versions stored)
* blogs, with versions
* comments(no versions stored)
* users
* followers/following
* profilepics

All this information in then used to create 2 brand new git
repositories; one to store user data(which is supposed to be shared
across all spaces), and another to store the OFBIZ space data.

The importer is smart enough to run multiple times, and only add what
has changed.

For items that don't have versions already, there are bulk commits that
occur. Over time, as the importer is continually run, history will build
up. When the switch occurs, the new system will store history for every
change.

Pages are no longer stored by ID. They are stored by name. Renames are
handled during import as well(requires updating all parent/child
relationships, all referenced labels, etc).

Now, on to the read-only side of all this.

* home page link(/) is updated automatically.
* attachment icon for pages with attachments is shown
* Links to added by, last edited by are shown per page.
* Raw wiki markup is imported, and I use mylyn to convert it to html.
This is not perfect.
* Page tree heiarchy; the selected node is auto-opened, but javascript
is not used to expand/collapse.
* attachments on pages(tools menu)
* Viewing the history for a page(parses git data using jgit).
* page tree list
* alphabetical page list(a-z bins), with pagination
* recently updated pages
* blog summary
* all labels
* popular labels
* all attachments, with pagination
* User profile(individual history, and metadata)
* User network

Things not implemented:

* viewing an actual change/diff
* comparing versions
* page summary
* permissions(can't fetch the data, don't have enough permissions on the
doogie user in confluence)
* blog detail, no comments either
* label detail(showing which pages have a label attached)
* attachment version display
* global user directory
* personal profile(no user login capability yet)
* no user profile actions(on the left side)
* default profilepic set not imported(license issues, so they are all 404)
* user status(no rpc, hardly anyone in ofbiz actually filed out status
updates).
* dashboard
* confluence macros in text blobs are not handled(mylyn doesn't support
them)

The timeframe it took me to write this: one week of initial importer
development, 3.5 weeks of continuing importer development, and frontend
development. All of this is completely from scratch, no previous
application code existed. I've been working completely in my spare
time(weekends too). A single person.

Now, here it comes. The url to the site. http://ofbizdemo.brainfood.com/.

Some interesting urls to hit:

1: http://ofbizdemo.brainfood.com/person/jacques.le.roux/network
2: http://ofbizdemo.brainfood.com/person/bjfreeman/network
3: http://ofbizdemo.brainfood.com/page/Apache%20OFBiz%20Service%20Providers/history
4: http://ofbizdemo.brainfood.com/pages/recent

Keep in mind that the software hasn't been heavily optimized. Some things could definately be cached more. And, due to various circumstances, the loaded site data gets garbage collected at times(I've made certain that there are no static globals to keep things around), so sometimes it has to re-load the site configuration, and compile a bunch of stuff on the fly. That's solvable by giving more memory to the instance.


Things to note. There are *no* database calls *at all*. It's all done
with files on disk. History browsing is backed by git, using jgit to
read it directly in java. CSS styling is rather poor. Most unimplemented
pages should do something nice(instead of a big read 'Not Yet
Implemented'); at least there shouldn't be an exceptions on those pages.


Reply via email to