prana-user Mailing List for Spring ActionScript
Brought to you by:
cherreman
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(4) |
Jul
(3) |
Aug
|
Sep
|
Oct
(2) |
Nov
(12) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(9) |
Feb
|
Mar
(87) |
Apr
(72) |
May
(23) |
Jun
(7) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
From: Christophe H. <chr...@gm...> - 2008-12-03 20:55:42
|
Dear community, I'm pleased to announce that Prana has become Spring ActionScript and is now incubated as an extension for the Spring portfolio. Needless to say that this is some pretty exciting news. Please see http://www.herrodius.com/blog/157 for more info and the offical announcement. Since we now have a new forum at http://forum.springframework.org/forumdisplay.php?f=60, I would like to ask everyone to register at the new forum and continue all disussions over there. This mailing list will be shut down in the coming weeks. Enjoy the framework and thanks for your support! regards, Christophe -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org |
From: Ricky B. <bl...@ry...> - 2008-12-03 18:16:19
|
Christophe Herreman wrote: > Hi, > > it seems that there is a problem with XML.appendChild() in the > playerglobal.swc of Flash Player 10. I'm thinking this is a bug, and > will try to report this to Adobe. > > In the meantime, you can fix the problem by changing > XMLUtils.convertAttributeToNode. Here's the new code: Thanks Christophe. That works now. -Ricky |
From: Christophe H. <chr...@gm...> - 2008-12-03 15:22:48
|
Hi, it seems that there is a problem with XML.appendChild() in the playerglobal.swc of Flash Player 10. I'm thinking this is a bug, and will try to report this to Adobe. In the meantime, you can fix the problem by changing XMLUtils.convertAttributeToNode. Here's the new code: public static function convertAttributeToNode(xml:XML, attribute:String):XML { var attributes:XMLList = xml.attribute(attribute); if (attributes) { if (attributes[0] != undefined) { var node:XMLNode = new XMLNode(XMLNodeType.ELEMENT_NODE, attribute); var value:XMLNode = new XMLNode(XMLNodeType.TEXT_NODE, attributes[0].toString()); node.appendChild(value); var newNode:XML = new XML(node.toString()); xml.appendChild(newNode); delete attributes[0]; } } return xml; } I have fixed this in svn. regards, Christophe 2008/12/3 Ricky Bacon <bl...@ry...> > Hey all, > > I attempted to use Prana with the newest Flex SDK targeting Flash player > 10. This makes Flash unhappy: > > TypeError: Error #1009: Cannot access a property or method of a null > object reference. > at > > org.pranaframework.ioc.factory.xml.parser.support.nodeparsers::AbstractNodeParser/canParse() > > Looking into the problem: > > public function canParse(node:XML):Boolean { > return (nodeNames.indexOf(node.name().localName.toLowerCase()) != > -1); > } > > node.name() is null, but node.toString() works fine. Recasting node to > XML fixed that error, but I think it messed with the reference and > caused errors elsewhere (parsing a <contructor-arg> caused problems). > > Has anyone successfully used Prana with FP10 yet? > > thanks > > -Ricky > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org |
From: Ricky B. <bl...@ry...> - 2008-12-03 08:05:46
|
Hey all, I attempted to use Prana with the newest Flex SDK targeting Flash player 10. This makes Flash unhappy: TypeError: Error #1009: Cannot access a property or method of a null object reference. at org.pranaframework.ioc.factory.xml.parser.support.nodeparsers::AbstractNodeParser/canParse() Looking into the problem: public function canParse(node:XML):Boolean { return (nodeNames.indexOf(node.name().localName.toLowerCase()) != -1); } node.name() is null, but node.toString() works fine. Recasting node to XML fixed that error, but I think it messed with the reference and caused errors elsewhere (parsing a <contructor-arg> caused problems). Has anyone successfully used Prana with FP10 yet? thanks -Ricky |
From: hud14 <woo...@ya...> - 2008-08-19 20:31:10
|
I am trying to use the prana framework for the following scenario a) my Application.mxml (the main app file) needs to get an instance of my "RuntimeEnv" class via a singleton method call as follows. (Note this line could also be called by a Flash var x:RuntimeEnv = RuntimeEnv.getInstance(this); b) I would like to use the pram framework but am not sure how I can accomplish this. The point being that I need to declare a bean that is fetched via a factory method, who's sole parameter is a reference to: 1) the main Flex application (i.e. object instantiated by <mx:Application>) 2) the main Flash object (when running in Flash) (I intend to use this SWC lib I am creating in both Flash and Flex apps) I see that prana supports a singleton object declaration with the factory-method attribute, however if my app boots by declaring the "new XMLApplicationContext(pathToXMLFile)", how can I add "this" as a bean in the factory so that it could be referenced as a factory method param in the above example? |
From: Ronen N. <ro...@ne...> - 2008-07-20 20:05:57
|
Hi, I noticed that in http://www.herrodius.com/blog/149 you show the new feature of command factory but you actually use the delegate factory as the parameter to addCommandFactory, I guess by mistake. I find the command factory very useful. I came across a use case that I wanted to use ResponderCommandFactory class but my commands couldn't extend AbstractResponderCommand. If the ResponderCommandFactory could create commands as the IBusinessDelagateAware interface and not the abstract class, it would be more correct in my opinion. Another feature request is when creating the commands, also attach a logger with right category in addition to the delegate. Thanks, Ronen. From: pra...@li... [mailto:pra...@li...] On Behalf Of Christophe Herreman Sent: Friday, July 04, 2008 12:01 PM To: pra...@li... Subject: [Prana-user] [ANN] Prana Framework 0.6 Released Dear Community, I'm pleased to announce that the 0.6 version of Prana is now available. For more info, please see http://www.herrodius.com/blog/149 Enjoy this release and have fun coding ! regards, Christophe -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org (null) ************************************************************************ ************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************ ************ The information contained in this message is proprietary to the sender, protected from disclosure, and may be privileged. The information is intended to be conveyed only to the designated recipient(s) of the message. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. ************************************************************************************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************************ |
From: Christophe H. <chr...@gm...> - 2008-07-04 09:00:35
|
Dear Community, I'm pleased to announce that the 0.6 version of Prana is now available. For more info, please see http://www.herrodius.com/blog/149 Enjoy this release and have fun coding ! regards, Christophe -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org |
From: EECOLOR <ee...@gm...> - 2008-06-30 09:44:29
|
I have also posted your question on the forums: http://prana.herrodius.com/viewtopic.php?f=3&t=28 The forum is a bit more active than the mailing list. Greetz Erik On 6/30/08, Todd Cullen <cu...@gm...> wrote: > > Hey all, > > I've been using Prana for the past 2 months on a new product I'm > developing. Its worked out surprisingly well but the XML configuration file > is starting to get pretty large and little redundant at points. For example, > I'll specify an object with an id of lets say "abc", then inject it into > another object with a property of "abc". Seems unnecessary. Has there been > any thought around using annotations and allowing some of the DI to be > autowired? > > Ideally, I'd like to see something like this: > > <object id="injectionProperty" class="com.example.AutoInjectionClass" /> > > <object id="someObj" auto-wire="true" class="com.example.ExampleClass" /> > > ------ inside ExampleClass ---- > > [Injectable]//Custom meta tag > public var injectionProperty:IAutoInjection;//property is the same name as > the object specified in the xml configuration > > A little background on the custom metadata issue: > > http://coenraets.org/blog/2007/10/annotating-actionscript-classes-with-custom-metadata-simple-orm-framework-for-air/ > > I'd love to know what you guys think. > > -- > Cheers, > Todd Cullen > > Senior Flash Developer > SVA-BizSphere > > e: tc...@re... > w: www.reigndesign.com > |
From: Todd C. <cu...@gm...> - 2008-06-30 07:36:52
|
Hey all, I've been using Prana for the past 2 months on a new product I'm developing. Its worked out surprisingly well but the XML configuration file is starting to get pretty large and little redundant at points. For example, I'll specify an object with an id of lets say "abc", then inject it into another object with a property of "abc". Seems unnecessary. Has there been any thought around using annotations and allowing some of the DI to be autowired? Ideally, I'd like to see something like this: <object id="injectionProperty" class="com.example.AutoInjectionClass" /> <object id="someObj" auto-wire="true" class="com.example.ExampleClass" /> ------ inside ExampleClass ---- [Injectable]//Custom meta tag public var injectionProperty:IAutoInjection;//property is the same name as the object specified in the xml configuration A little background on the custom metadata issue: http://coenraets.org/blog/2007/10/annotating-actionscript-classes-with-custom-metadata-simple-orm-framework-for-air/ I'd love to know what you guys think. -- Cheers, Todd Cullen Senior Flash Developer SVA-BizSphere e: tc...@re... w: www.reigndesign.com |
From: Per O. <per...@gm...> - 2008-06-10 20:45:56
|
Hi Ryan, As I also stated on the prana forum (way down in this thread http://prana.herrodius.com/viewtopic.php?f=3&t=17&start=10&st=0&sk=t&sd=a), I would recommend taking a look at the work of the state machine working group in puremvc: http://forums.puremvc.org/index.php?board=25.0 I am more skeptical though, on how the webflow concept applies to RIA applications. But again, I'm by all means not advanced in this area. /Per 2008/6/9 Ryan Gardner <rya...@y-...>: > The basic idea behind spring webflow is that you can define the flow > of an application in an XML file - and that there is a controller > that will actively handle the states... etc. > > http://static.springframework.org/spring-webflow/docs/2.0.x/reference/ > html/ch02s06.html > > In the latest application I'm working on using Prana and PureMVC, > I've been abstracting out the changing of states to a controller than > handles them based on notifications - so that the individual views > have no concerns with flow of the application - they simply do their > piece of rendering the model and accepting input, and when they are > done they send a notification that I have a controller set up to > listen for and then send some appropriate notifications to cause the > next view to appear. > > In taking this approach, I've wondered how easy it would be to mimic > the Spring Webflow configuration setup in such an environment. My > first thoughts on doing such a thing would be to build it using > PureMVC idioms and make a simple PureMVC controller that would > perform similar functions. > > Perhaps we could build a utility that could abstract it out and have > some kind of implementation that would work for both Cairngorm and > PureMVC? > > Anyone have any thoughts on how useful such a utility would be? > > I've not thought too much about it - but it seems like a pretty good > idea on the surface at least. > > Ryan > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: EECOLOR <ee...@gm...> - 2008-06-10 20:19:40
|
I agree that it seems a good idea on the surface. I am wondering if we could make working with states in Flex easier using this shizzle. The biggest problem I have had in the past with any type of flow control, is the tweening which is done between different states. Greetz Erik On 6/9/08, Ryan Gardner <rya...@y-...> wrote: > > The basic idea behind spring webflow is that you can define the flow > of an application in an XML file - and that there is a controller > that will actively handle the states... etc. > > http://static.springframework.org/spring-webflow/docs/2.0.x/reference/ > html/ch02s06.html > > In the latest application I'm working on using Prana and PureMVC, > I've been abstracting out the changing of states to a controller than > handles them based on notifications - so that the individual views > have no concerns with flow of the application - they simply do their > piece of rendering the model and accepting input, and when they are > done they send a notification that I have a controller set up to > listen for and then send some appropriate notifications to cause the > next view to appear. > > In taking this approach, I've wondered how easy it would be to mimic > the Spring Webflow configuration setup in such an environment. My > first thoughts on doing such a thing would be to build it using > PureMVC idioms and make a simple PureMVC controller that would > perform similar functions. > > Perhaps we could build a utility that could abstract it out and have > some kind of implementation that would work for both Cairngorm and > PureMVC? > > Anyone have any thoughts on how useful such a utility would be? > > I've not thought too much about it - but it seems like a pretty good > idea on the surface at least. > > Ryan > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: Ryan G. <rya...@y-...> - 2008-06-09 15:47:46
|
The basic idea behind spring webflow is that you can define the flow of an application in an XML file - and that there is a controller that will actively handle the states... etc. http://static.springframework.org/spring-webflow/docs/2.0.x/reference/ html/ch02s06.html In the latest application I'm working on using Prana and PureMVC, I've been abstracting out the changing of states to a controller than handles them based on notifications - so that the individual views have no concerns with flow of the application - they simply do their piece of rendering the model and accepting input, and when they are done they send a notification that I have a controller set up to listen for and then send some appropriate notifications to cause the next view to appear. In taking this approach, I've wondered how easy it would be to mimic the Spring Webflow configuration setup in such an environment. My first thoughts on doing such a thing would be to build it using PureMVC idioms and make a simple PureMVC controller that would perform similar functions. Perhaps we could build a utility that could abstract it out and have some kind of implementation that would work for both Cairngorm and PureMVC? Anyone have any thoughts on how useful such a utility would be? I've not thought too much about it - but it seems like a pretty good idea on the surface at least. Ryan |
From: Iman K. <im...@gm...> - 2008-06-03 08:47:08
|
At one time that was true but no longer. Here is an example: http://imanit.com/blog/?p=52 On Tue, Jun 3, 2008 at 12:14 AM, Justin Judd <jus...@gm...> wrote: > We're trying to implement Prana for our PureMVC application on Flash CS3 > and it looks like Prana requires Flex? Is this true, or am I missing > something? > > Thanks in advance. > > - Justin > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > |
From: Justin J. <jus...@gm...> - 2008-06-03 07:14:11
|
We're trying to implement Prana for our PureMVC application on Flash CS3 and it looks like Prana requires Flex? Is this true, or am I missing something? Thanks in advance. - Justin |
From: Radu C. <rad...@gm...> - 2008-05-26 16:54:51
|
Hi, thanks for the suggestion The only problem I see in this approach is that one would have to define the same objects twice in the context XML file once for an IApplicationContextAware object .. and once for the object itself. <object id="myObject" class="some(IObjectFactoryAware,IFactory)Object" /> <object id="myObject-impl" class="domain.namespace.MyObject" /> I don't see why not to add this configuration element since this is a specific particularity of the Flash Platform. A solution without introducing a new configuration would be to have an "exception processor" that will deal with the ClassNotFound exception, will try to resolve the object name to a class and if that fails throw the error. This "exception processor" can be specified/configured using a "magic" object name. If the magic is present and implements an IClassResolver interface it will be handled the control to solve the problem or throw the exception. Some thoughts .. other suggestions are welcomed. Regards Radu Cocieru On Mon, May 26, 2008 at 5:40 PM, Damir Murat <dmu...@gm...> wrote: > It seams to me that such kind of functionality can be implemented as > IFactoryObject in combination with IObjectFactoryAware or > IApplicationContextAware. Then, there will be no need for framework > extension by introducing new attribute in configuration. > > So, factory object which implements IApplicationContextAware will have > application context instance on which it can call getObject. Then, if > class can't be found it can return AsyncInstantiation (or something like > it) and starts loading swf. > > In factory's configuration one can further specify various params, for > instance regexp syntax for class names which are supported by this > factory and its proxied swf etc... > > These are just random thoughts... I didn't try to implement it, but it > seams to me as a sound approach which probably should be explored more > deeply before introducing new configuration elements or extending > framework itself. > > Best regards, > Damir Murat > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: Damir M. <dmu...@gm...> - 2008-05-26 14:41:22
|
It seams to me that such kind of functionality can be implemented as IFactoryObject in combination with IObjectFactoryAware or IApplicationContextAware. Then, there will be no need for framework extension by introducing new attribute in configuration. So, factory object which implements IApplicationContextAware will have application context instance on which it can call getObject. Then, if class can't be found it can return AsyncInstantiation (or something like it) and starts loading swf. In factory's configuration one can further specify various params, for instance regexp syntax for class names which are supported by this factory and its proxied swf etc... These are just random thoughts... I didn't try to implement it, but it seams to me as a sound approach which probably should be explored more deeply before introducing new configuration elements or extending framework itself. Best regards, Damir Murat |
From: EECOLOR <ee...@gm...> - 2008-05-26 10:07:02
|
The development team is quite busy (working on other projects). It will be discussed once there is some extra spare time available. Greetz Erik On 5/26/08, Bouiaw <bo...@gm...> wrote: > > Hi, > > We are very interested by this functionnality too. Could we have a > status on what proposed Radu ? > > Regards > > > On Tue, May 13, 2008 at 12:51 AM, Radu Cocieru <rad...@gm...> > wrote: > > The fact that an swf file contains more than just 1 class is not a bad > > think more like a feature that you can load a class with all it's > > dependencies. > > > > Imagine a big project where you would normally use Flex Modules which > > is a nice solution except for the fact that they bring quite some > > overhead and bind you to doing things in a certain way. > > > > Fore example I have a big application modular based, which is deployed > > to 2 clients .. every client uses a subset of the modules we developed > > Client A uses AMF protocol to access the services and Cient B uses > > hessian, so far so good Prana solves this issues like charm we just > > specify 2 different IService Classes (AmfServicesImpl and > > HessianServicesImpl) with proper configuration we even have a loading > > mechanism that will load the right lib(SWF) for the right client > > before the application startup. > > > > The problem comes when we don't want to load all the modules upfront > > because user might not even need them so we will just waste bandwidth, > > have a slower startup and use up more memory than the app actually > > needs. But we also have modules that depend on each other .. for > > example a Weather Widget cannot run without a Weather Service which > > also can be used in some other "Module" and who's implementation can > > vary depending on client's specifics like region and best provider for > > that region. So there is no way the weather widget would know what to > > load or where to load it from it just knows it needs a service that > > implements a certain interface. The widget may or may not be used by > > certain users at a given time, so loading it upfront is not justified. > > > > So the solution I propose solves this problem ... user clicks a button > > to open the widget, system uses Prana to resolve it to a class name, > > loads the SWF with the Weather Widget, the weather widget than asks > > for a service ... if it was loaded before it gets it right away if not > > it will wait a bit ... > > > > If you put this in an MVC pattern for example you can send > > notification about loading start, end, progress .. and the system may > > or may not react on them like giving the user some visual feedback > > that smth is happening. It keeps it clean loosely coupled and reusable > > ... with a good design there are man things you can do with it out of > > the box. > > > > Yes it adds another step to getting objects from the container, but > > the programmer should know what is always immediately available and > > what can be loaded on request, it's up to his design. Certain API > > function can be introduced to check if some definition is lazy-loaded > > or not. Also in future usage some bytecode is possible to generate > > from within the flash so a class loader could actually generate the > > needed class code. > > > > Hope this makes sense. > > The implementation idea I suggested is one way it can be done, other > > have their pros and cons as wel. > > - use a Proxy class that can forward the calls to the real instance of > > the needed class once it is loaded ( a major drawback among others is > > that casting it to the needed class will fail) > > - throw an error with a reference to the classloader .. and let the > > developer decide whatever to load it or not (pretty much same as > > events, but if not cought it pops up a big ugly Exception that the > > developer should notice right away, if he chooses to catch it than he > > probably knows what he's doing) > > > > Any thought are welcomed ... > > In the situation described above with our client we used a sort of a > > LibManager that was loading the classes according to a map it has so I > > can contribute and implement this part. > > > > Regards. > > - Radu > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Prana-user mailing list > > Pra...@li... > > https://lists.sourceforge.net/lists/listinfo/prana-user > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: Bouiaw <bo...@gm...> - 2008-05-25 23:37:58
|
Hi, We are very interested by this functionnality too. Could we have a status on what proposed Radu ? Regards On Tue, May 13, 2008 at 12:51 AM, Radu Cocieru <rad...@gm...> wrote: > The fact that an swf file contains more than just 1 class is not a bad > think more like a feature that you can load a class with all it's > dependencies. > > Imagine a big project where you would normally use Flex Modules which > is a nice solution except for the fact that they bring quite some > overhead and bind you to doing things in a certain way. > > Fore example I have a big application modular based, which is deployed > to 2 clients .. every client uses a subset of the modules we developed > Client A uses AMF protocol to access the services and Cient B uses > hessian, so far so good Prana solves this issues like charm we just > specify 2 different IService Classes (AmfServicesImpl and > HessianServicesImpl) with proper configuration we even have a loading > mechanism that will load the right lib(SWF) for the right client > before the application startup. > > The problem comes when we don't want to load all the modules upfront > because user might not even need them so we will just waste bandwidth, > have a slower startup and use up more memory than the app actually > needs. But we also have modules that depend on each other .. for > example a Weather Widget cannot run without a Weather Service which > also can be used in some other "Module" and who's implementation can > vary depending on client's specifics like region and best provider for > that region. So there is no way the weather widget would know what to > load or where to load it from it just knows it needs a service that > implements a certain interface. The widget may or may not be used by > certain users at a given time, so loading it upfront is not justified. > > So the solution I propose solves this problem ... user clicks a button > to open the widget, system uses Prana to resolve it to a class name, > loads the SWF with the Weather Widget, the weather widget than asks > for a service ... if it was loaded before it gets it right away if not > it will wait a bit ... > > If you put this in an MVC pattern for example you can send > notification about loading start, end, progress .. and the system may > or may not react on them like giving the user some visual feedback > that smth is happening. It keeps it clean loosely coupled and reusable > ... with a good design there are man things you can do with it out of > the box. > > Yes it adds another step to getting objects from the container, but > the programmer should know what is always immediately available and > what can be loaded on request, it's up to his design. Certain API > function can be introduced to check if some definition is lazy-loaded > or not. Also in future usage some bytecode is possible to generate > from within the flash so a class loader could actually generate the > needed class code. > > Hope this makes sense. > The implementation idea I suggested is one way it can be done, other > have their pros and cons as wel. > - use a Proxy class that can forward the calls to the real instance of > the needed class once it is loaded ( a major drawback among others is > that casting it to the needed class will fail) > - throw an error with a reference to the classloader .. and let the > developer decide whatever to load it or not (pretty much same as > events, but if not cought it pops up a big ugly Exception that the > developer should notice right away, if he chooses to catch it than he > probably knows what he's doing) > > Any thought are welcomed ... > In the situation described above with our client we used a sort of a > LibManager that was loading the classes according to a map it has so I > can contribute and implement this part. > > Regards. > - Radu > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: Radu C. <rad...@gm...> - 2008-05-12 22:57:21
|
The fact that an swf file contains more than just 1 class is not a bad think more like a feature that you can load a class with all it's dependencies. Imagine a big project where you would normally use Flex Modules which is a nice solution except for the fact that they bring quite some overhead and bind you to doing things in a certain way. Fore example I have a big application modular based, which is deployed to 2 clients .. every client uses a subset of the modules we developed Client A uses AMF protocol to access the services and Cient B uses hessian, so far so good Prana solves this issues like charm we just specify 2 different IService Classes (AmfServicesImpl and HessianServicesImpl) with proper configuration we even have a loading mechanism that will load the right lib(SWF) for the right client before the application startup. The problem comes when we don't want to load all the modules upfront because user might not even need them so we will just waste bandwidth, have a slower startup and use up more memory than the app actually needs. But we also have modules that depend on each other .. for example a Weather Widget cannot run without a Weather Service which also can be used in some other "Module" and who's implementation can vary depending on client's specifics like region and best provider for that region. So there is no way the weather widget would know what to load or where to load it from it just knows it needs a service that implements a certain interface. The widget may or may not be used by certain users at a given time, so loading it upfront is not justified. So the solution I propose solves this problem ... user clicks a button to open the widget, system uses Prana to resolve it to a class name, loads the SWF with the Weather Widget, the weather widget than asks for a service ... if it was loaded before it gets it right away if not it will wait a bit ... If you put this in an MVC pattern for example you can send notification about loading start, end, progress .. and the system may or may not react on them like giving the user some visual feedback that smth is happening. It keeps it clean loosely coupled and reusable ... with a good design there are man things you can do with it out of the box. Yes it adds another step to getting objects from the container, but the programmer should know what is always immediately available and what can be loaded on request, it's up to his design. Certain API function can be introduced to check if some definition is lazy-loaded or not. Also in future usage some bytecode is possible to generate from within the flash so a class loader could actually generate the needed class code. Hope this makes sense. The implementation idea I suggested is one way it can be done, other have their pros and cons as wel. - use a Proxy class that can forward the calls to the real instance of the needed class once it is loaded ( a major drawback among others is that casting it to the needed class will fail) - throw an error with a reference to the classloader .. and let the developer decide whatever to load it or not (pretty much same as events, but if not cought it pops up a big ugly Exception that the developer should notice right away, if he chooses to catch it than he probably knows what he's doing) Any thought are welcomed ... In the situation described above with our client we used a sort of a LibManager that was loading the classes according to a map it has so I can contribute and implement this part. Regards. - Radu |
From: Erickson, L. <Loren.Erickson@FMR.COM> - 2008-05-12 15:34:33
|
<quote> Flash and Flex, beign more UI related, could be very valuable a way of interface creation from a prana configuration file. In this way, a server could create configurations on the fly, then loaded in our client app, and, finaly, we could get screens in flash or flex created on the fly. This could be very powerful and make prana gets a "specific-weight" to be used in all kind of applications. Imagine that you could change layouts in runtime changing your config file and prana build all components. What do you think about UI creation in the fly?. </quote> This is very similar to some requirements I have for being able to configure view modules at runtime. Through configuration, I need to be able to plugin UI modules from arbitrary sources and hook them in to the application. In one case, a given action may result in the standard UI being presented to the user, but in a slightly different context, the same action may result in a third-party UI being displayed. Guess I'm going to have to lookup Ryan's post about this topic. Sounds interesting. |
From: EECOLOR <ee...@gm...> - 2008-05-12 09:50:33
|
Could you give an example where this could be usefull? Another difference with Java is that ActionScript classes are compiled into an swf where Java classes are compiled to class files. This makes the loading of separate Java classes alot easier. What is your vision on how this would work with ActionScript classes. As for the piece of code you posted. If it was implemented like you propose, I would suggest to use the event mechanism of ActionScript. People are used to work with events. This would however bring an extra step in developer usage: *var instance:* = ioc.getObject("someID"); if (instance is AsyncInstantiation) { AsyncInstantiation(instance).addEventListener(InstantiationEvent.INSTANTIATE, _instantiationHandler); } else { _processInstance(instance); }; private function _instantiationHandler(e:InstantiationEvent):void { _processInstance(e.instance); }; private function _processInstance(instance:SomeClass):void {...};* Greetz Erik On 5/10/08, Radu Cocieru <rad...@gm...> wrote: > > The beauty of using Spring on Java is that you don't have to worry about > class loading (most of the times). > > How about implementing the same thing for PranaFramework ? :) > > I understand the asynchronous implications of this, but it would be nice > to > have a feature like this: > > <object id="someID" class="Someclass" lazy-loading="true" /> > > so when/if the framework gets a ClassNotFound exception it should go > through a class resolver object which would try to resolve it to an SWF > file ... return an AsyncInstantiation object and start loading the SWF > file. Once the file is loaded the instance is created. > > The programmer would have to deal with this synchronous way of creating > objects smth like this: > > var inst:* = ioc.getOject("someID"); > if(inst is AsyncInstantiation){ > inst.addResponder(result,success); > }else { > //call the result as we have the instance loaded > result(inst); > } > > function result(inst:SomeClass){ ... } > > This class Loader should be configurable so that it can be replaced or > enhanced depending on the project eg: enhance it so will issue progress > events/notfications in an Cairgorm/PureMVC set-up. > > Any thoughts ? > > -- > Radu Cocieru > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > |
From: Ryan G. <rya...@y-...> - 2008-05-11 20:21:59
|
On May 11, 2008, at 4:59 AM, Carlos Rovira wrote: > Hi Christophe, > > I think a great use of prana not only should be about services and > command configuration. Cairngorm is a only a piece in an > Application. Spring in Java is used to configure beans and services > to wire an application. Maybe in Flash and Flex, beign more UI > related, could be very valuable a way of interface creation from a > prana configuration file. In this way, a server could create > configurations on the fly, then loaded in our client app, and, > finaly, we could get screens in flash or flex created on the fly. > This could be very powerful and make prana gets a "specific-weight" > to be used in all kind of applications. Imagine that you could > change layouts in runtime changing your config file and prana build > all components. What do you think about UI creation in the fly?. Prana already can be used to create UI components. See the post I had on here a few days ago talking about how I am injecting view components in using Prana. It's in a PureMVC approach, but the specifics aren't tied to PureMVC - you could use it for any view component injection you wanted. The way I see it, there is no need to change prana to support UI components - but there may be a need to document how to do it and provide some examples. Ryan > 2008/5/10 Christophe Herreman <li...@he...>: > Hi Loren, > > I'm currently working on better support for Cairngorm and in > particular on the behavior of the front controller as you > mentioned. My goal is to provide a front controller that can be > configured with runtime command and delegate creation. I hope to > have something usefull by the end of next week. > At this moment I haven't really used Prana myself in the UI. Since > in Cairngorm all you really need to do in the UI is dispatch > Cairngorm events and then the controller/command/delegate/model > handles all the rest, I've been focusing more on the that part. I > can't think of any useful uses of Prana in the UI at this moment, > but perhaps you or other readers could share some thoughts. > > regards, > Christophe > 2008/5/9 Erickson, Loren <Lor...@fm...>: > Hi all, > Are there any good examples of Prana being used end-to-end in > Cairngorm? > I can easily see how you could override the behavior of the > FrontController to cause Commands to be intialized on demand from the > application context, which would also include the delegate, service > and > model locator objects. However, I'm having a little trouble > understanding how Prana can be leverage further forward in the user > interface. What's the best example you've seen of Prana being used > most > widely across a Cairngorm application? Thanks. > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http:// > java.sun.com/javaone > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > > > > -- > Christophe Herreman > http://www.herrodius.com > http://www.pranaframework.org > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http:// > java.sun.com/javaone > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > > > > -- > ::| Carlos Rovira > ::| http://www.carlosrovira.com > ::| http://formacion.carlosrovira.com/ > ::| http://www.madeinflex.com > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http:// > java.sun.com/javaone_______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user |
From: Carlos R. <car...@gm...> - 2008-05-11 10:59:44
|
Hi Christophe, I think a great use of prana not only should be about services and command configuration. Cairngorm is a only a piece in an Application. Spring in Java is used to configure beans and services to wire an application. Maybe in Flash and Flex, beign more UI related, could be very valuable a way of interface creation from a prana configuration file. In this way, a server could create configurations on the fly, then loaded in our client app, and, finaly, we could get screens in flash or flex created on the fly. This could be very powerful and make prana gets a "specific-weight" to be used in all kind of applications. Imagine that you could change layouts in runtime changing your config file and prana build all components. What do you think about UI creation in the fly?. 2008/5/10 Christophe Herreman <li...@he...>: > Hi Loren, > > I'm currently working on better support for Cairngorm and in particular on > the behavior of the front controller as you mentioned. My goal is to provide > a front controller that can be configured with runtime command and delegate > creation. I hope to have something usefull by the end of next week. > At this moment I haven't really used Prana myself in the UI. Since in > Cairngorm all you really need to do in the UI is dispatch Cairngorm events > and then the controller/command/delegate/model handles all the rest, I've > been focusing more on the that part. I can't think of any useful uses of > Prana in the UI at this moment, but perhaps you or other readers could share > some thoughts. > > regards, > Christophe > 2008/5/9 Erickson, Loren <Lor...@fm...>: > >> Hi all, >> Are there any good examples of Prana being used end-to-end in Cairngorm? >> I can easily see how you could override the behavior of the >> FrontController to cause Commands to be intialized on demand from the >> application context, which would also include the delegate, service and >> model locator objects. However, I'm having a little trouble >> understanding how Prana can be leverage further forward in the user >> interface. What's the best example you've seen of Prana being used most >> widely across a Cairngorm application? Thanks. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save $100. >> Use priority code J8TL2D2. >> >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Prana-user mailing list >> Pra...@li... >> https://lists.sourceforge.net/lists/listinfo/prana-user >> >> > > > -- > Christophe Herreman > http://www.herrodius.com > http://www.pranaframework.org > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://formacion.carlosrovira.com/ ::| http://www.madeinflex.com |
From: Radu C. <rad...@gm...> - 2008-05-10 11:50:13
|
The beauty of using Spring on Java is that you don't have to worry about class loading (most of the times). How about implementing the same thing for PranaFramework ? :) I understand the asynchronous implications of this, but it would be nice to have a feature like this: <object id="someID" class="Someclass" lazy-loading="true" /> so when/if the framework gets a ClassNotFound exception it should go through a class resolver object which would try to resolve it to an SWF file ... return an AsyncInstantiation object and start loading the SWF file. Once the file is loaded the instance is created. The programmer would have to deal with this synchronous way of creating objects smth like this: var inst:* = ioc.getOject("someID"); if(inst is AsyncInstantiation){ inst.addResponder(result,success); }else { //call the result as we have the instance loaded result(inst); } function result(inst:SomeClass){ ... } This class Loader should be configurable so that it can be replaced or enhanced depending on the project eg: enhance it so will issue progress events/notfications in an Cairgorm/PureMVC set-up. Any thoughts ? -- Radu Cocieru |
From: Christophe H. <li...@he...> - 2008-05-10 06:49:49
|
Hi Loren, I'm currently working on better support for Cairngorm and in particular on the behavior of the front controller as you mentioned. My goal is to provide a front controller that can be configured with runtime command and delegate creation. I hope to have something usefull by the end of next week. At this moment I haven't really used Prana myself in the UI. Since in Cairngorm all you really need to do in the UI is dispatch Cairngorm events and then the controller/command/delegate/model handles all the rest, I've been focusing more on the that part. I can't think of any useful uses of Prana in the UI at this moment, but perhaps you or other readers could share some thoughts. regards, Christophe 2008/5/9 Erickson, Loren <Lor...@fm...>: > Hi all, > Are there any good examples of Prana being used end-to-end in Cairngorm? > I can easily see how you could override the behavior of the > FrontController to cause Commands to be intialized on demand from the > application context, which would also include the delegate, service and > model locator objects. However, I'm having a little trouble > understanding how Prana can be leverage further forward in the user > interface. What's the best example you've seen of Prana being used most > widely across a Cairngorm application? Thanks. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Prana-user mailing list > Pra...@li... > https://lists.sourceforge.net/lists/listinfo/prana-user > > -- Christophe Herreman http://www.herrodius.com http://www.pranaframework.org |