Coder Social home page Coder Social logo

core-js's People

Contributors

dklon avatar jbrunton avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dklon

core-js's Issues

provide test coverage

Consider using Jasmine.

Test coverage should be implemented across:

  • module definitions
  • event subscription
  • extenders
  • resources (incl. nested/extended objects)
  • routing

Need to figure out how to incorporate with infrastructure project. Maybe tests should be written in core-js, but run together with js-infrastructure.

refactor app.core into an object constructor

assuming a single entity makes unit testing awkward. it would be better to take a more OOP approach.

consider providing a constructor core.App, which may be instantiated as a single-instance variable (app.core) by the client application.

refactor core/app.js

Continue breaking up into components - not convinced this is going to provide the perfect design, but it'll be more decoupled than now.

More expressive syntax for loading complex nested resources

Ideally, you should be able to express precisely the associations you want to load, and the extensions to inject when assembling view models - eg,

new User().load(user_id, {
    extenders: { auditDates: { created: true, modified: true },
    includes: {
        recent_posts: {
            extenders: { auditDates: {} },
            includes: { tags: {} }
        },
        blogs: { extenders: { auditDates: {} } }
    }
});

OOP-ify the mediator

Global state is bad, and complicates testing. The mediator.js file should return a Mediator object constructor (instead of an object instance as it does now).

This will require changes (all in core-js) to:

  • mediator.js, to return an object constructor.
  • app.js (which, for now, just needs a new local variable to hold an instance of a Mediator).
  • spec/MedatorSpec.js, to test the new object constructor.

To run the tests, open SpecRunner.html (in the core-js-blog-demo project) in a browser, and ensure they all pass (I think I commented out the ones which were failing..)

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.