-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, 10 April 2008 22:03
To: [email protected]
Subject: osflash Digest, Vol 36, Issue 12

Send osflash mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://osflash.org/mailman/listinfo/osflash_osflash.org
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of osflash digest..."


Today's Topics:

   1. Re: More on components (Yotam Laufer)
   2. Re: More on components (Glen Pike)
   3. Re: Suggestions on the architecture of modular    applications
      based on MVC (Jo?o Saleiro)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Apr 2008 12:11:14 +0300
From: "Yotam Laufer" <[EMAIL PROTECTED]>
Subject: Re: [osflash] More on components
To: "Open Source Flash Mailing List" <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

If you want to use the Flash CS3 Components you can create a swf, in
Flash, that holds the components you want to use and the use Loader to
load them into your application. Once they have loaded you can do the
following:

//  UIScrollBar

var uiScrollClass:Class = getDefinitionByName
("fl.containers.UIScrollBar") as Class; var uiScrollbar:UIScrollBar =
new uiScrollBarClass () as UIScrollBar;

addChild (uiScrollbar);

Make sure you load the swf holding the components in the same
ApplicationDomain as your application using the LoaderContext class:

var loader:Loader = new Loader ();
var context:LoaderContext  = new LoaderContext (true,
ApplicationDomain.currentDomain);

loader.load (new URLRequest ("urlToYourSwf.swf"), context);



Best regards, Yotam,

On Thu, Apr 10, 2008 at 2:47 AM, Glen Pike <[EMAIL PROTECTED]>
wrote:

>  Hi,
>
>     I don't think you can do a pure AS3 project and use the Flex 
> components - there are a few threads on the FD forum, which will apply

> to any editor as they are mainly about the code...
>
>     It looks like your project has to contain some MXML - even just a 
> tiny bit to initialise the framework, etc.
>
>
> http://www.flashdevelop.org/community/viewtopic.php?t=1556&highlight=p
> ure+as3+flex
>
>
> http://www.flashdevelop.org/community/viewtopic.php?t=1264&start=0&pos
> tdays=0&postorder=asc&highlight=components
>
>     Now I just have to figure how to do the same with Flash components

> as opposed to Flex ones as FD only comes with intrinsic classes for 
> Flex, not Flash, to compile against.
>
>     Glen
>
> Schell wrote:
>
> I've read through that post as well, seems we're following the same 
> steps! Hmmm, tried it with a couple different variations, still no 
> luck. I changed import mx.controls.Button to import fl.controls.Button

> and that got rid of multiple null reference run-time errors, but 
> there's absolutely nothing on the stage. At least there are no errors 
> at this point.
>
> On Wed, Apr 9, 2008 at 4:00 PM, Glen Pike <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> wrote:
>
>
>   You should be able to import the component, create it using new and 
> then add it
>
> http://filt3r.free.fr/index.php/2007/08/11/28-using-flex-3-component-w
> ithout-mxml-only-as3
>
>  You may need the "intrinsic" or other classes to compile against and 
> this is for Flex, so for Flash you may be importing different
components.
>
>  Simple example:
>
>  package
>  {
>      import mx.controls.Button;
>
>
>      public class Main extends Application
>      {
>          private var btn:Button;
>
>          public function Main():void
>          {
>
>              addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
>          }
>
>          private function onAddedToStage(event:Event):void {
>              btn = new Button();
>
>              addChild(btn);
>          }
>      }
>  }
>
>
> Schell wrote:
>  Thank you Glen. I have seen this post before and I've added my swc's 
> to the library path. I'm a little lost on the next step. How can I 
> take advantage of the Button class now? I've had no luck.
>
> On Wed, Apr 9, 2008 at 3:20 PM, Glen Pike <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> wrote:
>
>
> http://noahlittle.wordpress.com/2007/09/09/flex-and-actionscript-3-wit
> h-textmate-and-fcsh/
>
>
>
>
> Glen Pike
>  01736 759321
>  www.glenpike.co.uk
> _______________________________________________
>  osflash mailing list
>  [email protected]
>  http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
>  _______________________________________________
> osflash mailing 
> [EMAIL PROTECTED]://osflash.org/mailman/listinfo/osflash_osf
> lash.org
>
>
>
>
>
> --
>
>
> Glen Pike
>  01736 759321
>  www.glenpike.co.uk
> _______________________________________________
>  osflash mailing list
>  [email protected]
>  http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
> --
>
> Glen Pike
> 01736 759321
> www.glenpike.co.uk
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osflash.org/pipermail/osflash_osflash.org/attachments/20080410/1f
33ecac/attachment-0001.html 

------------------------------

Message: 2
Date: Thu, 10 Apr 2008 10:23:41 +0100
From: Glen Pike <[EMAIL PROTECTED]>
Subject: Re: [osflash] More on components
To: Open Source Flash Mailing List <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

Cool...  That's just opened up a whole load of opportunities for me,
thanks.

Glen

Yotam Laufer wrote:
> If you want to use the Flash CS3 Components you can create a swf, in 
> Flash, that holds the components you want to use and the use Loader to

> load them into your application. Once they have loaded you can do the
> following:
>
> //  UIScrollBar
>
> var uiScrollClass:Class = getDefinitionByName
> ("fl.containers.UIScrollBar") as Class; var uiScrollbar:UIScrollBar = 
> new uiScrollBarClass () as UIScrollBar;
>
> addChild (uiScrollbar);
>
> Make sure you load the swf holding the components in the same 
> ApplicationDomain as your application using the LoaderContext class:
>
> var loader:Loader = new Loader ();
> var context:LoaderContext  = new LoaderContext (true, 
> ApplicationDomain.currentDomain);
>
> loader.load (new URLRequest ("urlToYourSwf.swf"), context);
>
>
>
> Best regards, Yotam,
>
> On Thu, Apr 10, 2008 at 2:47 AM, Glen Pike <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi,
>
>         I don't think you can do a pure AS3 project and use the Flex
>     components - there are a few threads on the FD forum, which will
>     apply to any editor as they are mainly about the code...
>
>         It looks like your project has to contain some MXML - even
>     just a tiny bit to initialise the framework, etc.
>
>        
>
http://www.flashdevelop.org/community/viewtopic.php?t=1556&highlight=pur
e+as3+flex
>     
> <http://www.flashdevelop.org/community/viewtopic.php?t=1556&highlight=
> pure+as3+flex>
>
>        
>
http://www.flashdevelop.org/community/viewtopic.php?t=1264&start=0&postd
ays=0&postorder=asc&highlight=components
>     
> <http://www.flashdevelop.org/community/viewtopic.php?t=1264&start=0&po
> stdays=0&postorder=asc&highlight=components>
>
>         Now I just have to figure how to do the same with Flash
>     components as opposed to Flex ones as FD only comes with intrinsic
>     classes for Flex, not Flash, to compile against.
>
>         Glen
>
>     Schell wrote:
>>     I've read through that post as well, seems we're following the
same
>>     steps! Hmmm, tried it with a couple different variations, still
no
>>     luck. I changed import mx.controls.Button to import
fl.controls.Button
>>     and that got rid of multiple null reference run-time errors, but
>>     there's absolutely nothing on the stage. At least there are no
errors
>>     at this point.
>>
>>     On Wed, Apr 9, 2008 at 4:00 PM, Glen Pike
<[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> wrote:
>>       
>>>      You should be able to import the component, create it using new
and then
>>>     add it
>>>
>>>
>>>     
>>> http://filt3r.free.fr/index.php/2007/08/11/28-using-flex-3-component
>>> -without-mxml-only-as3
>>>
>>>      You may need the "intrinsic" or other classes to compile
against and this
>>>     is for Flex, so for Flash you may be importing different
components.
>>>
>>>      Simple example:
>>>
>>>      package
>>>      {
>>>          import mx.controls.Button;
>>>
>>>
>>>          public class Main extends Application
>>>          {
>>>              private var btn:Button;
>>>
>>>              public function Main():void
>>>              {
>>>
>>>                  addEventListener(Event.ADDED_TO_STAGE,
onAddedToStage);
>>>              }
>>>
>>>              private function onAddedToStage(event:Event):void {
>>>                  btn = new Button();
>>>
>>>                  addChild(btn);
>>>              }
>>>          }
>>>      }
>>>
>>>
>>>     Schell wrote:
>>>      Thank you Glen. I have seen this post before and I've added my
swc's
>>>     to the library path. I'm a little lost on the next step. How can
I
>>>     take advantage of the Button class now? I've had no luck.
>>>
>>>     On Wed, Apr 9, 2008 at 3:20 PM, Glen Pike
<[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>     
>>> http://noahlittle.wordpress.com/2007/09/09/flex-and-actionscript-3-w
>>> ith-textmate-and-fcsh/
>>>
>>>
>>>
>>>
>>>     Glen Pike
>>>      01736 759321
>>>      www.glenpike.co.uk <http://www.glenpike.co.uk>
>>>     _______________________________________________
>>>      osflash mailing list
>>>      [email protected] <mailto:[email protected]>
>>>      http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>>
>>>
>>>      _______________________________________________
>>>     osflash mailing list
>>>     [email protected] <mailto:[email protected]>
>>>     http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>>
>>>
>>>
>>>
>>>     --
>>>
>>>
>>>     Glen Pike
>>>      01736 759321
>>>      www.glenpike.co.uk <http://www.glenpike.co.uk>
>>>     _______________________________________________
>>>      osflash mailing list
>>>      [email protected] <mailto:[email protected]>
>>>      http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>>
>>>         
>>       
>
>     --
>
>     Glen Pike
>     01736 759321
>     www.glenpike.co.uk <http://www.glenpike.co.uk>
>
>
>     _______________________________________________
>     osflash mailing list
>     [email protected] <mailto:[email protected]>
>     http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>   

-- 

Glen Pike
01736 759321
www.glenpike.co.uk <http://www.glenpike.co.uk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osflash.org/pipermail/osflash_osflash.org/attachments/20080410/c7
1d43a6/attachment-0001.html 

------------------------------

Message: 3
Date: Thu, 10 Apr 2008 11:02:12 +0100
From: Jo?o Saleiro <[EMAIL PROTECTED]>
Subject: Re: [osflash] Suggestions on the architecture of modular
        applications based on MVC
To: Open Source Flash Mailing List <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Thank you for your answer. When you said you had several "sub-apps",
those were Modules or Applications? I have seen people using
Applications instead of Modules, because they felt more comfortable
while testing - but this way they end up with bigger SWF's.

Having the services on the Main App won't create a tight coupled
architecture between the module and the app ?

In your architecture, have you used Modular? If yes, when you need to
have a command (which is defined on the module) that calls a
ServiceDelegate (which is defined on the application) how do you solve
the problem that the Module doesn't know the ServiceDelegate?.


Thanks,

Jo?o Saleiro


sLangeberg wrote:
> We had no problems implementing a system similar to your description: 
> One 'portal' app loads multiple mudular 'sub-apps' at runtime. Each is

> standalone cairngorm app. As you said, however, the biggest gotcha is 
> one big shared ServiceLocator at the main app level. In our case, 
> wasn't big deal, as I think there's only about one remote object per 
> module, for us. Not much more, anyhow, as each is a full controller / 
> for the respective service on the back-end. Wouldn't be hard to 
> implement your own ServiceLocators that impl same interface, but 
> allows you to have one per module, and could be their own Singletons.
> It' just an odd setup, as they wanted to implement an MXML definition 
> for services.
>
>
> On Wed, Apr 9, 2008 at 7:05 PM, Jo?o Saleiro <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hey guys,
>
>     I am working on a Flex application based on Cairngorm. The
application
>     will be divided in modules for the purpose of distributing only
the
>     modules clients request. There will be a configuration tool on the
>     application to "install" new modules, and manage existing ones.
The
>     motivation for using modules is to manage properly the complexity
>     of the
>     application while it grows and to help managing the roles on the
team
>     assigning each module to different persons.
>
>     The first question is whether I should have:
>
>     a) One Flex Project that has the application and several modules;
>     b) One Flex Project for each module and another for the
application;
>     c) One Flex Project for all modules, and another for the 
> application;
>
>     I think the best option is to go with b). What do you think?
>
>     Second question: which of the following seems a preferable
practice:
>
>     a) Only the application uses MVC
>     b) The application and each module have it's own MVC architecture
>
>     I would go with option b). The problem is that MVC has some
Singletons
>     and that will create problems, since I would have, for example,
one
>     Controller for the application and another for each Module.
>
>     To solve this problem, I can use Modular -
>     http://lab.arc90.com/2007/10/modular_1.php
>
>     Modular will work as a proxy for the Controller, allowing to
register
>     new commands on runtime on the main application controller. Those
>     commands will be defined on my Module. In terms of use, it seems
>     practical and logic to me, but in terms of architecture, it seems
>     a bit
>     wrong to me - wouldn't it be preferable if each module had it's
own
>     controller? Why should the module depend so much on the
>     application that
>     uses it? What happens if the module is used on an application that
>     doesn't use Cairngorm?... It's a bit questionable if Modular
should be
>     used or not.
>     Anyway, even if I went with this option, Modular doesn't provide a
>     solution for the ServiceLocator. So, this leads me to another
>     question:
>
>     a) Only the application knows the backend and the services
provided by
>     the backend; So, there will be only one ServiceLocator and all the
>     ServiceDelegates will be defined on the main application.
>     b) Each module knows the backend, and each module has it's own
>     ServiceLocator and specific ServiceDelegates for the remote
services
>     needed on that module.
>
>     I think the option b) seems more elegant to me. The problem is
>     that the
>     ServiceLocator implemented on Cairngorm is a Singleton, and the
same
>     happens with the ModelLocator. Since our implementations extend
the
>     classes on Cairngorm, even if I create "different" ServiceLocators
for
>     each module, that won't solve the problem since they are all one
>     instance - they all extend the same ServiceLocator class. And I
>     need one
>     ServiceLocator per module. I could solve that by not extending the
>     same
>     base class... but this doesn't sound correct to me, since I would
have
>     to replicate the ServiceLocator code on each module... Can you
propose
>     another solution?
>
>     I think there is lack of information on best-practices for
developing
>     big modular applications using modules and MVC. I am a bit stuck
right
>     now, since I need to make some important decisions on architecture
>     before starting the development, and I do not want to change all
the
>     architecture later. Your opinion would be extremely helpful to me!
>
>     Thank you!,
>
>     Jo?o Saleiro
>
>
>     _______________________________________________
>     osflash mailing list
>     [email protected] <mailto:[email protected]>
>     http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
>
> --
> : : ) Scott
>
> Helping your grandma on the interweb
> at: http://blog.criticalpile.com
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osflash.org/pipermail/osflash_osflash.org/attachments/20080410/30
3a22d3/attachment.html 

------------------------------

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org


End of osflash Digest, Vol 36, Issue 12
***************************************


This email contains information which may be confidential and subject to 
copyright.  If you are not the intended recipient you must not use, distribute 
or copy this email or attachments.  If you have received this email in error 
please notify us immediately by return email and delete this email and any 
attachments.  
TelstraClear Limited accepts no responsibility for changes made to this email 
or to any attachments after transmission from TelstraClear Limited.  It is your 
responsibility to check this email and any attachments for viruses.   
Emails are not secure.  They can be intercepted, amended, lost or destroyed and 
may contain viruses.  Anyone who communicates with TelstraClear Limited by 
email is taken to accept these risks.

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to