WardCunningham/Smallest-Federated-Wiki — pull request #50 by notbenh (2011-10-16 09:09:37+00:00)
Title: Page list as simple example to get my head around SFW

Sorry I couldn't make it this week to the workshop. Sounds like a fun project so I figured that I would tinker. I'm sure that other are like this too but I needed to get my hands dirty to figure out the inner workings, thus I set my self a simple example of building out a route that just lists the known pages. So far so good though I did run in to some issues and confusion. Disclaimer: I think in perl so this whole ruby universe still feels foreign, I'm sure that much of my confusion is just not knowing the expected baselines, sorry in advance.

Ok off to the races: Where did I get confused?

- Where's 'page' built? I kept running in to errors about page['title'] not found before I just gave it a string in pages.haml. The closest example that I could find was put /pages/.../action, I attempted to build a hash in the route but that wasn't it. In reading over [[Concepts]] it sounds like the expectation is that page is some magic that reads the JSON, but what about system gen pages like this one? Is there a clean way to feed the right data to some method to just make it happy, rather then completely side-step things like I did?
- I'm completely lost on why going to /pages ends up at /view, I'm guessing that it has something to do with that page thing that I never found as all the other pages seem to do that. I'm sure that there's a very good reason but I couldn't find it in the docs nor in code. Is this a case of: it was explained in person and never made it to the docs? I'll gladly help starting those docs with some coaching.
- Long term is the expectation that config items will be something... well configurable? Currently it looks like paths to data are hard coded? I followed suit though it seems that doing something like conf.pages.map{} would be prefered over what I've done? I know that this is likely cart before horse as the project is still rather young, so I guess this is more of a feature request rather then a point of confusion.

So those are the big ones, I'm sure that as I play I'll have more questions, is there a preferred channel for them as they come up? Thanks again ward and team for helping make a happy place for content.

Let me know how I can help.

--
benh~