Reposted from reddit.com/r/emberjs:
So, this is mostly “thinking out loud” to help me figure things out on my own, but: I’d love any input you guys could provide.
I’m responsible for building a touchscreen kiosk system at work. I’ve got it implemented fairly well using JSRender at the moment, but I think that it would benefit pretty significantly from being converted to Ember. The difficulty there is that I’m still just learning Ember, so I’m not 100% sure on how the structure would work.
Organizationally, there will be several kiosks, each of which will have:
- an ID value specifying their location (string/number)
- a template value specifying the template to use for the home screen (most will have the same layout/template, really. There may be one other template used, but I’d like the possibility for different templates for future kiosks) (string? I think. Not sure how to do this one)
- a time value, so the displayed time can be maintained/managed by the server (string)
- an alerts value, for pushing system alerts to the kiosks (think ticker-style alerts scrolling across the header) (string)
- a pages value, for populating a navbar/button (array. Not sure how best to handle this, since many pages will have different templates/models)
- an eventCategories value, which will be used for specifying which event categories are displayed on the home screen (array)
- a slides value, which will populate an auto-cycling slideshow on the home screen (array)
Each “page” will have different data, depending on its template. I feel like I should use a “page” model that has every possible property, even for those that don’t use it (so, for example, say I have two pages, one that contains a staff directory, and one that contains sub-pages with different information per sub-page, like building information, maps, etc.)… Actually, now that I type that out, I’m thinking each page should be its own class… maybe?
That’s where I’m getting stuck. Just not sure how best to organize all of this.
eventCategories should be easy. Slides shouldn’t be too tough, though each slide may have a different template, as well…
All of the ember stuff I’ve done has been very straightforward, with a few models backing a few controllers/templates, so this is kind of a leap.
Is all of this making any sense? Do you guys have any input on how the data end of this should be set up?
/edit: Now that I think about it, I could probably figure out what I need to do based almost entirely on how I want the URLs laid out. Since I want, say:
I’d imagine I need to have each nav item as a nested route, right? I can re-use templates as necessary… Hmmm… Shouldn’t be too tough. Guess I was just over-thinking things.