install in MainConfig.as

vishwas.gagrani's Avatar

vishwas.gagrani

22 Feb, 2013 03:26 PM

Going through the clock example at :
https://github.com/brean/robotlegs2-clock-example/blob/master/src/e...
I found the following line, new in 2.0

       context.install(MVCSBundle);  //doc : Installs custom extensions or bundles into the context

What sort of extension is MVCSBundle ?

Vishwas

  1. Support Staff 1 Posted by Ondina D.F. on 22 Feb, 2013 03:47 PM

    Ondina D.F.'s Avatar
  2. 2 Posted by vishwas.gagrani on 22 Feb, 2013 07:25 PM

    vishwas.gagrani's Avatar

    ok. I didnot use extensions even in RL1.0 so it seems, it's not mandatory to use it ( install any extension) in my little project. I think i can ignore it for now. I hope, ignoring it is not going to do any side effect.

    Thnx!
    V

  3. vishwas.gagrani closed this discussion on 22 Feb, 2013 08:26 PM.

  4. Ondina D.F. re-opened this discussion on 23 Feb, 2013 11:13 AM

  5. Support Staff 3 Posted by Ondina D.F. on 23 Feb, 2013 11:13 AM

    Ondina D.F.'s Avatar

    Hi Vishwas,

    ok. I didnot use extensions even in RL1.0 so it seems, it's not mandatory to use it ( install any extension) in my little project. I think i can ignore it for now. I hope, ignoring it is not going to do any side effect.

    Hehe, ignoring it would cause a lot of ‘side effects’. Just try to configure a context without any extensions and see what happens, or rather what doesn’t happen :)

    RL2’s architecture is based on extensions, allowing the adding of framework features by composition, which makes rl2 much more flexible and powerful than rl1.

    As said in the description of the MVCSBundle:
    „This bundle installs a number of extensions commonly used in typical Robotlegs applications and modules.“

    If you read again the description of each included extension, you’ll see that they are „mandatory“ in order to create Mediators, Commands, a shared event dispatcher, etc

    As I said in the other discussion, you can build your own bundle, where you can exclude extensions which you consider not to be needed.

    For a typical MVCS setup without Modules and Logging you’d need at least these extensions:

    VigilanceExtension,
    ContextViewExtension,
    EventDispatcherExtension,
    LocalEventMapExtension,
    EventCommandMapExtension,
    CommandCenterExtension,
    MediatorMapExtension,
    ViewManagerExtension,
    StageObserverExtension,
    ManualStageObserverExtension,
    StageCrawlerExtension,
    StageSyncExtension

    Until you get more comfortable with rl2 I’d recommend using the MVCSBundle as provided.

    Ondina

  6. 4 Posted by vishwas.gagrani on 27 Feb, 2013 07:49 PM

    vishwas.gagrani's Avatar

    k. thnx.Seems bit complex for now. Will try to study in details later. :)

  7. Support Staff 5 Posted by Shaun Smith on 27 Feb, 2013 10:10 PM

    Shaun Smith's Avatar

    RL1 included the "extensions" by default. It came with the MediatorMap, CommandMap etc, compiled into it. RL2 allows you to choose what extensions you want:

    _context = new Context().install(Extension1, Extension2, Extension3) // etc
    

    But it is not very convenient to have to supply all your Extensions every time. Instead you can create a Bundle that will install the extensions for you. Then all you need to do is install the Bundle:

    _context = new Context().install(MyBundle);
    

    The MVCSBundle is supplied with the framework for people who want a standard set of extensions - one that is very similar to RL1 (MediatorMap, CommandMap etc).

    When getting started it is highly recommended that you use the MVCSBundle.

  8. Support Staff 6 Posted by Ondina D.F. on 11 Mar, 2013 01:46 PM

    Ondina D.F.'s Avatar

    Hey Vishwas,

    Is this issue resolved or do you require further assistance?

  9. 7 Posted by vishwas.gagrani on 11 Mar, 2013 02:07 PM

    vishwas.gagrani's Avatar

    Yep, got resolved for now. Thnx

  10. vishwas.gagrani closed this discussion on 11 Mar, 2013 02:07 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac