0

I want to start out by saying that I am new to flex. My background is more in the .NET. I am starting a new project in flex that will have many modules. I read in many post that remoteobject accessing data should be placed in the main application and that you should share these remoteobjects in the modules. I have searched all over the net and did not found any example on how to do this.

I would appreciate if someone could share some sample code.

Thanks

gfbaggio
  • 1
  • 2
  • When you talk of modules; are you using the term generically to refer to components or screens of your application? Or do you really mean modules; which are like independently compiled applications loaded at runtime? http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html – JeffryHouser Jun 13 '12 at 19:28
  • 1
    real modules loaded with modulemanager or moduleloader – gfbaggio Jun 13 '12 at 19:32

1 Answers1

0

You should start by using the modules only for the view layer. That is the most simple approach. Ideally, you use interfaces for the contract between module and application and if you want awesome code, you'll do it the MVC way. I bet the controller, service and domain layer are just a small piece of the app, compared to the view layer in terms of byte size, so that's stuff you could compile completely into the application. That way, the modules don't need to know the service layer, only the domain layer, which holds the data.

Florian Salihovic
  • 3,921
  • 2
  • 19
  • 26
  • Would you share some sample code to get me started, I have no idea on how implement this. – gfbaggio Jun 14 '12 at 11:53
  • I really need some help on this. Thanks – gfbaggio Jun 15 '12 at 16:49
  • I'll try get something up over the weekend. – Florian Salihovic Jun 15 '12 at 17:18
  • Thanks, I wiil wait for you sample – gfbaggio Jun 18 '12 at 01:09
  • Any updates please, I am really stuck here and I am getting pressure from by boss. Thanks – gfbaggio Jun 19 '12 at 16:30
  • I was reading about sub-apps loaded with swfloader instead of using modules. Would it be better or should I stick with modules? Either way I need some help and fast (if I want to keep my job) – gfbaggio Jun 20 '12 at 17:27
  • Ok, try this: #1 implement a component, which gets data to display and which dispatches dedicated bubbling events when some actions should occur like loading data. #2 Use and test it in your application. This means: The component should be self contained, contain no business logic but behavior and implement a controller which invokes the service, when the dedicated event was dispatched. #3 Decorate the component by a module and use it via . This should be the first steps. For any case, create a public github project which can be forked. – Florian Salihovic Jun 20 '12 at 20:22