Skip to content

Instantly share code, notes, and snippets.

@alpacaaa
Created December 10, 2012 19:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alpacaaa/4252688 to your computer and use it in GitHub Desktop.
Save alpacaaa/4252688 to your computer and use it in GitHub Desktop.
xpathr plan

xpathr – first iteration

In this first iteration, unauthenticated users should be able to test xslt code, save snippets and eventually come back to edit them without signing up. xpathr will work without javascript enabled, so client side code shouldn't be taken in consideration for now.

UI:

  • XML textarea

  • XSL textarea

  • RESULT read-only textarea

  • TEST button

  • SAVE button

xpathr won't have source code and transformation result separated as before, but will feature all of them on the same screen, like other services do. When javascript interaction will be planned, the RESULT view can be updated at intervals as the user types so that she can see what's going on in realtime. This is out of scope for now.

Pressing TEST will simply update the RESULT textarea, nothing will be stored in Symphony yet.

Pressing SAVE will create a Snippet entry in the cms. The user will be presented with the EDIT page, which will show these additional information:

  • list of Snippet's revisions (much like git commits, a new revision is created everytime the Snippet is saved).

  • an EDIT URL with a secret key which the user can use to update the Snippet in the future. A cookie will be stored in the current session so that editing is allowed as long as the user is on the same browser, but given there's no authentication for now, this is the only mean to edit a Snippet in the future.

The proposed URL schema for this first iteration is:

/new -> Shows a blank canvas

/new/:snippet-id/:revision -> XML and XSL are prepopulated with the provided snippet's code, eventually at a specific revision.

/edit/:id/:revision -> Shows edit page only if user is the owner (cookie or secret URL)

/view/:id/:revision -> straightforward read only page

I feel like /new/ and /view/ could be merged somehow, so that someone can edit a snippet on the fly without clicking some sort of "Fork" button, that's something to discuss.

To me, this is enough to start building all the other features of xpathr. Once we've got this working, it's trivial to build a Codepen like ecosystem as the CMS is pretty much defined. What needs to be defined next is how to integrate getsymphony.com users into the app, but that will come out as soon as Allen releases more information about auth.getsymphony.com to share auth data between network sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment