Why does enyo use a custom script loader?

As a seasoned developer with a build-stack that I like to adapt and re-use on different projects, I'm curious why enyo went with a custom script loader rather than using or integrating with something like require.js?

I like a lot of what I see with enyo, but need the flexibility to use things like require.js plugins for live development (i.e., coffeescript), and the r.js optimizer for building a production package.

This kind of flexibility seems like it would be a huge hassle in enyo right now, and enyo's loader/build process, while simple to use, feels a bit like a straight-jacket.

Or did I miss something in my initial review of the docs/source?

Comments

  • edited January 2013
    No, it was just a design choice. The original architects didn't want to rely on code from other sources and they wanted a loader that was able to handle a directory-based project and loading of CSS and other assets in addition to JavaScript code.

    They also had the philosophy (more muted now) that they wanted people to be able to use .write() to directly output HTML into your document during load time. I've personally always preferred .renderInto() instead of .write (which breaks on new app environments like Win 8 Store) and I've been converting the samples/docs to favor that as possible.

    We would like to revisit this in the future, but it's not likely until "Enyo 3", whatever that is.
  • Thanks for the reply. This may hamper my efforts to use enyo in my current work, but I do look forward to seeing what happens with later releases.
  • You can minify enyo+libs, then require() that file into another project, but it's not ideal. AFAIK, using require.js won't conflict with Enyo code.
  • The original architects didn't want to rely on code from other sources
    Is there somewhere we can have a discussion about this?
  • The enyo-development mailing list is a good place. We're looking at other, more standard methods for loading modules an eventual Enyo 3, but I wouldn't expect that for 2.3.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter