fedwiki/wiki-client

Steps toward MVC style client architecture.

Opened this issue · 3 comments

The wiki client keeps a few bookkeeping details stashed in the DOM. This has turned out to be an increasing limitation as more kinds of activity surround wiki pages. Last fall we introduced a page model which during refactoring we're calling pageObject. We'll slowly transfer more responsibility to this and related models. Eventually all pages will be accessed through the pageObject which will then be renamed page.

We are inspired by, but not following, an outline worked up over a year ago as Models for SFW with Pete Hodgson.

Here is a sketch showing how activity turns into DOM objects in our current codebase.

screen shot 2014-02-15 at 4 36 34 pm

This renders existing pages by a three step process.

  • A div for each page is found in or added to the dom with createPage.
  • A page name is extracted for each div and fetched by the pageHandler.get.
  • A story and journal is emitted into the divs by buildPage.

New pages are created by a two step process.

  • A missing page is rendered as a ghostly "future" page above.
  • A click on the create button puts the new page and repeats the buildPage.

Wow. How can it be I've never seen this? Would you allow me to tag issues?
That would also help with transferring/identifying important discussions to/for a community initiative , so some long-term issues could be closed for clarity.

There are many aspects of GitHub that I don't understand. I'm not likely to use them well since I'd rather put my energy into wiki itself. We've certainly cut the audience when we made the new repos. There must be something you can subscribe to that will alert you to activity.

We've certainly cut the audience when we made the new repos. There must be something you can subscribe to that will alert you to activity.

Have created an issue, link above, to raise the visibility of that question.