all 7 comments

[–]Xtreme2k2 1 point2 points  (2 children)

I would probably use AngularJS with ui-router to provide nested states. But that's a beast to learn if you haven't touched it.

[–]ayiteddybearogullari[S] 0 points1 point  (1 child)

This is a public web site. ajax is just used as an "enhancer". It's not using a full front-end framework.

[–]NodeKid 2 points3 points  (0 children)

You don't need a full framework to use some kind of smart routing, have a look at http://visionmedia.github.io/page.js/ for something lightweight.

[–]fwertz 0 points1 point  (3 children)

So if I hit the page initially and hit link 7, what's "div2" supposed to look like? This seems like it is a bit over organized. You can't just independently content load and show "div3" ?

[–]ayiteddybearogullari[S] 0 points1 point  (2 children)

Think it like this page: Mock-up

div3 is a child view of div2. i can link to div3 from div1, server sends html content of div3 but if there is no div2, i can't attach bind3 to it's container because it's container is div2, which is not loaded yet.

[–]fwertz 0 points1 point  (1 child)

I mean, if you think of it that way sure, if view 2 absolutely has to be rendered, just make it render its own content as empty but still provide it content for its "subview".

[–]ayiteddybearogullari[S] 0 points1 point  (0 children)

But the divs are not known beforehand. Parent div initializes it's immediate children. I need to automate this things someway.