Code review comment for lp:~sidnei/lazr-js/combo-service

Revision history for this message
Māris Fogels (mars) wrote :

On Thu, Nov 19, 2009 at 12:34 PM, Sidnei da Silva
<email address hidden> wrote:
> FWIW, I don't think it's a good idea to define a global LAZR, since the plan to include lazr-meta.js other projects, each of which will have to define it's own YUI() instance.

So, I was suggesting the global LAZR() YUI wrapper because there is
code in each example that constructs a LAZR_YUI_CONFIG, and then
passes that into a YUI() constructor. Instead of doing so, why not
combine the two steps into a project-specific LZR() convenience
function? The function would *not* be for use outside of lazr-js,
just for convenience inside. I can see every individual YUI project
going this route, wrapping the YUI constructor as their needs dictate.

Regarding including lazr-meta.js: we will have to see how it works in
practice. I assumed that lazr-meta was for the purpose of running the
lazr project for development and demonstration purposes. I did not
think other projects would ever import lazr-meta.

I am wary of the idea of combining meta-dependencies like this: at
most, you could pull in the YUI config object's "modules" section.
All of the other configuation settings should be left to the
individual project.

« Back to merge proposal