Module demo

thipages's Avatar

thipages

10 Nov, 2009 12:25 PM

Hi,

I have done a minimalist module demo (Flash Builder 4) - in attachement with a triangular communication (Application, ModuleInstance1, ModuleInstance2)

I got the following issues while coding

  • the name convention of the packages (views, events, ...) are they corrects (singular, plural, ...)?

  • the term "module", is appropriate?

  • I did not find a good way for calling application components from the ApplicationMediator (I called getViewComponent() method)

Also, I did not use Commands but for keeping the example simple.

What do you think?

tit

  1. 1 Posted by thipages on 11 Nov, 2009 05:54 AM

    thipages's Avatar

    I have put the demo here : http://grosbeta.com/robotlegs/simplemoduledemo/RL_ModuleTest.html (source on right click)
    Also source in attachment again (forgot to clean the source)

    tit

  2. Support Staff 2 Posted by Shaun Smith on 11 Nov, 2009 12:43 PM

    Shaun Smith's Avatar

    Ooo.. that looks really nice! I haven't had a chance to check out the code properly yet.. one thing I did notice is that there aren't any Interfaces - which would imply that the modules are getting compiled into the shell swf. Could you export your project as an FXP so that I can import it easily? Many thanks :)

  3. 3 Posted by thipages on 11 Nov, 2009 02:23 PM

    thipages's Avatar

    I have added an ISimpleModule interface on the module itself with addMessage(..) and clearMessages(), setTitle(...) and getContext() signature
    The mediation is now on the interface (need to be well explained on module best practices --> it could be the module itself (natural) but abstracting it borders a good usage)

    Something not clean is the applicationMediator and getViewComponent stuff.

    tit

  4. 4 Posted by thipages on 12 Nov, 2009 08:47 PM

    thipages's Avatar

    "which would imply that the modules are getting compiled into the shell swf" --> not so easy :-(

    I have tried to minimalize the dependencies as much as I can (even events..!) but still blocked on the stubbed views. Something should be wrong.
    Here is the changed fxp. Please dont cry!!

    Can you guide me? I will try to do the job.

    tit

  5. Support Staff 5 Posted by Shaun Smith on 13 Nov, 2009 07:12 AM

    Shaun Smith's Avatar

    Sorry for the delay.. I'll take a look at this today.

  6. 6 Posted by thipages on 15 Nov, 2009 02:01 PM

    thipages's Avatar

    Hi,

    I have just seen the SillyStockPriceExample (http://github.com/darscan/SillyStockPriceExample) with the two StockPriceView views in the main application. This sounds as a better example and approach.

    A first comment :
    What if we want to initialize each of the StockPriceView views with two different data sources (eg: data1.js and data2.js)?
    We could build an mutator method in the view (set url(url:String)) and then transfer the variable into the context which can set the model... (not very nice building an API on a view ...)

    A general remark is that I have downloaded the demo package but it is different of the current content when browing in git (unfortunately - or hopefully :-)) I dont know how to manage/fork git)

    Note: connexe discussions have started here: http://groups.google.fr/group/robotlegs/browse_frm/thread/66661dea7...

  7. 7 Posted by thipages on 24 Nov, 2009 08:20 PM

    thipages's Avatar

    Lets close the subject for now
    I will take it again when more experienced.
    Thanks anyway!

  8. Support Staff 8 Posted by Shaun Smith on 25 Nov, 2009 10:27 PM

    Shaun Smith's Avatar

    Ok cool, hopefully I'll have built another demo by then : )

  9. Support Staff 9 Posted by Shaun Smith on 11 Dec, 2009 03:39 PM

    Shaun Smith's Avatar

    Also, if you have a look at the (terrible) AcmeWidgetFactory in my personal repo:

    http://github.com/darscan/robotlegs-demos-Bundle

    You can see another (newer) approach to module mapping that uses the ViewMap instead of the MediatorMap (though I've left all the old code in place).

    I really need to fix that demo up, but it might have some useful info in it related to generic module mapping with the ViewMap.

  10. Shaun Smith closed this discussion on 11 Dec, 2009 03:39 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