soma.Application - init and start

40 views
Skip to first unread message

Alex Danilov

unread,
Nov 2, 2013, 7:00:26 PM11/2/13
to som...@googlegroups.com
What is a difference between init and start methods in soma.Application object?

I was very surprised to see that they both executed at the same time...
Is it possible to configure the application to start on document ready or other some other event?

In somajs site:
The application instance will execute two functions so you can setup the architecture needed: the init and the start functions.

What is the difference if I will create my own method (setup) and will call it from "start"?

Thanks

Romuald Quantin

unread,
Nov 3, 2013, 6:10:26 AM11/3/13
to som...@googlegroups.com
No difference beside that they are called one after the other once the framework is setup. It is just a convenience.

soma.js has in theory nothing to do with DOM, usable in browsers, node.js and so on.

If you need a document ready, you can use the one from soma-template:
soma.template.ready(function(){});

Or use jquery, or similar.

Romu

Reply all
Reply to author
Forward
0 new messages