Getting started with enyo.Application?

I'm trying out the Enyo framework for an app I'm building. Given the various advances, I'm thinking 2.4 is the place to start, so I've checked out 2.4 pre 2, and am trying to get something going with Bootplate.

My problem is that all the docs and sample code I've found don't use the enyo.Application object, and I can't figure out how to put components in the Application view. I've tried a variety of things, but haven't found the right incantation. I'm sure this will eventually get covered as the docs get updated, but for now I'm stuck at the beginning. Could someone point me to a working example, or give a few lines of sample code?



  • edited March 2014
    Look at the bootplate-mvc and bootplate-moonstone repos; they are both using enyo.Application. So are all the moonstone samples.

    One big hint: the application instance only directly owns a single view object, so you'll need to make a view kind definition, then refer to that in your Application instance.
  • edited April 2014
    Thanks! That was helpful. For those who are similarly struggling, here's a simpler hello world:
    <!DOCTYPE html>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <script src="enyo/enyo.js"></script>
                // include support libraries
            enyo.ready(function () {
                new Ahoy.Application({name: "app"});
                name: "Ahoy.MainView",
                kind: "FittableRows",
                fit: true,
                components: [{
                    name: "toolbar",
                    kind: "onyx.Toolbar",
                    components: [{content: "Ahoy"}]
                }, {
                    kind: "enyo.Scroller",
                    fit: true,
                    components: [{content: "Hello, World!"}]
                }, {
                    kind: "onyx.Toolbar",
                    components: []
                name: "Ahoy.Application",
                kind: "enyo.Application",
                components: [],
                view: "Ahoy.MainView",
                handlers: {
    That makes use of the enyo libraries, but none of the template or build stuff in bootplate.
Sign In or Register to comment.