Code Monkey home page Code Monkey logo

geobricks-js's People

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

hydrologic

geobricks-js's Issues

Branching model to support evolution and sticking to previous versions.

If we use extensively geobricks-js we will have several projects coupled with the components on it. These components are going to evolve over time. Mainly at the beginning when design patterns are not mature, but also during time as technologies evolve. And this evolutions are going to make the projects that use geobricks-js out of date. Either we upgrade them, either we stick to the geobricks-js version we worked with.

Therefore I think that a branching strategy is necessary. A branching strategy that, for example, allows to use a 2 year old geobricks-js version on a huge project where upgrading to the last one is not possible. A strategy that allows too to include improvements on that version as critical bugs appear.

I have put in practice a little the one described here [1] and it did the trick. Any other experiences?

[1] http://nvie.com/posts/a-successful-git-branching-model/

Find a way to document modules

I think we have to document these things:

  • What's expected to be in module.config().
  • Events that the module listens/sends.
  • The object returned by the module.
  • Used/implemented patterns.
  • Any other module-specific thing.

We have to determine if we want to generate html (or other format) from the module documentation. I don't think that's necessary, so I suggest this solution:

  • A comment at the beginning of the file explaining events(listen/send) and module.config()
  • Inline comments in the object returned by the module.

Improve message-bus

  • Add custom context parameter for listener (the this problem in instance callbacks, see #2).
  • Get rid of "event" parameter in callback function (not used, pollutes code).
  • Rename methods to use the common pubsub pattern naming convention (better understandability).
  • Add an "unsubscribe" method (for completion).
  • Get rid of jQuery dependency (loose weight, gain control).

Find a pattern for having several instances of a module

I don't know if I can define properly the problem since I haven't run into it myself, but I think the scenario is an application that has to add dynamically several instances of the same module. How are events managed by a single instance and not by all? How are these instances built? Are the instances modules themselves?

I think Oscar proposal is to create a factory module that returns objects. Problems with the context of "this" appear and changes to the message-bus are necessary.

I may have time in the following weeks to give it a try and see how we can keep oop away from geobricks-js. I have no alternative yet, though.

Create folders for UI modules depending on the technology used

bootstrap, jquery ui, nothing.

¿Maybe also OL, leaftlet? As long as we only have components based on OpenLayers there is no need to differentiate with folders.

This will make easier the search of the module that matches your application, and also may help you to select the technology in the future based on the available modules for each one.

[super-task] JavaScript Tooling

Incorporate javascript developing tools.

As @fergonco says, each item will require a its own issue and discussion when addressed.

The following list is only an outline:

  • Testing: mocha+chai or jasmine are both good candidates
  • Coverage reports: istanbul? see what was used in Tunduras
  • Documentation: see #3
  • Code sanity: JsHint
  • Compression/packing: Uglify2, cssmin
  • HTML templating: handlebars
  • Task automation: grunt*

(*)grunt has plugins to manage all the suggested tools: contrib-requirejs, mocha, contrib-jasmine, istanbul, jsdoc, contrib-jshint, contrib-uglify, contrib-cssmin, contrib-handlebars.

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.