Giter Site home page Giter Site logo

bbq's People

Contributors

achingbrain avatar alanshaw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

liamwooding

bbq's Issues

bbq.gui.updateables - what is that?

Some documentation for "Updateables" would be really useful. I think these might allow for in place editing, which is what I'm actually looking for, but I'm not sure.

Support for default class options

I've got a situation where it is desirable for a class to have a set of default options, so that the callee doesn't have to specify all options when creating an instance of the class.

I'm currently doing something like:

initialize: function($super, options) {
    $super(options);
    this.options = Object.extend({foo: 'bar'}, this.options);
}

I thought it would be nice if the root of the class hierarchy actually did this merge for me, if I defined a variable called "options" in my class. That way I save a bit of code and it also gives me a chance to explicitly state the class options (so that newcomers can easily see what options the class takes). The implementation would look something like:

var SuperClass = new Class.create({

    initialize: function(options) {
        this.options = Object.extend(this.options || {}, options);
    }
});

var SubClass = new Class.create(SuperClass, {

    options: {
        val1: 'default',
        val2: 'default'
    },

    initialize: function($super, options) {
        $super(options);
    }
});

var instance1 = new SubClass();

console.log('instance1.options.val1=' + instance1.options.val1);
console.log('instance1.options.val2=' + instance1.options.val2);

var instance2 = new SubClass({val2: 'foo'});

console.log('instance2.options.val1=' + instance1.options.val1);
console.log('instance2.options.val2=' + instance1.options.val2);

var instance3 = new SubClass({val1: 'foo', val2: 'foo'});

console.log('instance3.options.val1=' + instance1.options.val1);
console.log('instance3.options.val2=' + instance1.options.val2);

Unexpected side effect bbq.domain.Entity.registerListener

If an entity has not "loaded", calling registerListener has the unexpected side effect of calling loadData if the event type is "onDataLoaded".

Whilst I agree that the callback should be called immediately if the object is loaded, I don't agree with the side effect. My initial reaction was to register the listener and then call loadData explicitly when I wanted to start the load.

Also, just another minor point: This method is documented as private - should it be? If so then it should probably start with an underscore to follow convention and if not we should get rid of the annotation so that it appears in the jsdocs.

Log.dir doesn't log object properties

console.dir lists the properties of the object you pass it. Log.dir does not, because toString is called on the object to log before being passed to console.dir.

[Suggestion] CSS file naming

Would it be possible for CSS files to be named package/path/ClassName.css rather than package/path/ClassName/style.css. It would certainly make it easier to bring up the relevant CSS file for a class when using cmd+shift+n in Intellij.

bbq.domain.Repository._createEntity

I'm having trouble understanding the loop at the end of this method:

if(this._entities[i].equals(data))

If the stored entity at index "i" equals data then...

data = this.get(i);

Set data equal to the entity in the repository

data.processData(data.options.data);

Get the entity to process the data it already has...

So, basically it throws away the new version of the entity - in my case it uses the partially loaded entity over the JSON I pass to Repository.add.

Could you explain, or is this a bug?

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.