Git Product home page Git Product logo

boilerplatejs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boilerplatejs's Issues

Boilerplatejs for jquery mobile

I want to use Boilerplatejs for jquery mobile development but I got it difficult. Do you think it is appropriate? How can I proceed? Any help will be appreciated!

take a relook at the way theming is done

Theming is currently done via a theme component. For faster loading theme is defined on the index.html too. This is duplication of content, that may be avoided with a better design.

Implement Context.unsubscribe() method

Don't you feel the need for Context.unsubscribe() method?
E.g. I want my component to listen for event only if it is active. So i call Context.listen() in component's .activate() function (imagine I don't use viewmodels). Currently there is no way to unsubscribe when the component is deactivated, meaning the event handler will be called anyway. But i don't want to handle this event when the component is hidden because e.g. it changes look&feel of component based on event data - it's a waste of resources.

How to bind a view model to a created modal window?

Hello,
In a component I create a modal window responding to an event:

var Component = function(moduleContext) {

    var vm = null;

    this.initialize = function (parent) {

        vm = new ViewModel(moduleContext);

        moduleContext.listen("loginClicked", function () {
            var newWindow;

            newWindow = window.open("", "login", "width=400,height=400);
            newWindow.document.write(template);

               // THIS DOESN'T WORK---------------------------------------------------------------
            ko.applyBindings(vm, newWindow.document.getElementById('body'));
               // -----------------------------------------------------------------------------------------------------
        });
    };
}
    return Component;

});

The template (view.html) is the following:

<title>Login</title>

Done

Everything seems to work, but the created window is not binded to the viewmodel.

Thanks for your help,
Marcos

Remove hash tag

Because of boilerplate using its own router class seems to be it not support remove hash tags with the browsers which support html5 push state in the following way

Backbone.history.start({hashChange:false, pushState:true})

File names are incorrect

Hi,

The two test files below: boilerplatejs / tests / other are wrongly named.
js-encapsulation.js contains the protoype tests and 'js-prototypes.js' contains the encapsulation tests.

Grtz,

Maarten Docter

Extend core classes

As with most projects I don't like modifying core files (although this project does present a unique case to do it). My proposal is as follows.

Split core directory into two structures

core/_boiler_.js
core/helpers/_helpers_.js

extend/_boiler_.js
extend/helpers/_helpers_.js

The Helpers extended module would look like this :

define(function(require) {

    var Helpers = require('core/helpers/_helpers_');

    return _.extend(Helpers, {

    });
});

The same would go for _boiler_. I would have these two modules configured in main.js in the require config to always load from extend\*. All new modules can now be created in extend allowing overrides of core files, helper files and new core extensions to be added without touching core itself.

Implement a Backbone style 'extend' static on core classes

So I stole the Backbone extend function and placed it into boilerplate. I have then modified all core classes to use the extend method as a static extend.

This allows

define(function(require) {

    var Boiler = require('boiler');

    return Boiler.ViewTemplate.extend({

        someMethod : function() {}

    });
});

I 'd like to know your thoughts, this structure works very well for me and I'm sure it'd work well for most that have used Boilerplate.js to bootstrap their projects.

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.