Giter Site home page Giter Site logo

Comments (1)

AdrianRossouw avatar AdrianRossouw commented on August 16, 2024

I've run into this head first today.

I'm trying to build an application where the router instantiates a 'State' model, which represents which page is active and so forth. There is a central interface view, which listens to events on the state model, and handles re-rendering component views. The router would only be responsible for changing the context object. (ie: set the current page).

There's a leak in the abstraction due to this. The environment that renders the initial page, versus renders subsequent page loads, is different. This means that on the server side, there is no way to set up a state/context object for the request.

I actually think the correct solution for this is to standardize on TJ's new pages.js client side router (heavily inspired) by express, that solves this kind of thing already. http://visionmedia.github.com/page.js/

will keep you updated if i figure something out.

from bones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.