Re: [flexcoders] Cairngorm is bad?
No Unittests. It is very strange but after releasing FlexUnit nothing is done to improve it to support async tests. Nothing is done to implement Mock Objects in AS (however as2lib has some implementation). That is why Flex community still cannot write neither functional tests nor unittests, and they don't write them. That is why XP or Agile is impossible. That is why continious integration is impossible.Asynchronous testing is possible with Flex Unit - For instance when testing Delegates we:1) Register the test case as the service the delegate is going to call and implement the fake remote method so that it stores it's arguments in an instance variable;2) Get the testCase to implement Responder and pass it to the Delegate constructor. the onResult and onFault, like the remote method, store their arguments in instance variables3) Now all the arguments passed to services and responders by the delegate under test are accessible by our assert statements - not hard to set up.There are quite a few Cairngorm development teams around Australia (RocketBoot's clients included) who would be surprised to find out they can't do Agile development with Cairngorm, since they've been doing it for a little while :-) Sure some tweaks are necessary and there are some things I'd like to modify in the framework - but that's why I have an ongoing email thread with Stephen about these issues and possible solutions. Cairngorm is not fixed in stone, and Stephen has always been keen to get contributions from the community.BTW there is already another framework some people use for Flex development, check out ARP. I'd prefer to see people contribute to existing frameworks first, and if you have to create a new one, have a clear point of difference in mind (not just the name, hell it's taken me months to learn to type Cairngorm quickly)Cheers,RobinPS: See some of you in Hong Kong :-)__Robin HilliardDirector - RocketBoots Pty LtdProfessional Services for Macromedia Technologieshttp://www.rocketboots.com.auFor schedule/availability call Pamela Higgins:w +61 7 5451 0362m +61 419 677 151e [EMAIL PROTECTED]or Direct:m +61 418 414 341f +61 2 9798 0070e [EMAIL PROTECTED] *** Let RocketBoots help upgrade your team to Studio 8! ***On 15/11/2005, at 4:15 AM, Mykola Paliyenko wrote: Dear Flexcoders. I want to start here discussion about development enterprise applications using Flex. Our company has choosen Cairngorm as a framework to do it, but I believe it has some drawbacks My comments are here: http://jroller.com/page/mickolka?entry=cairngorm_is_bad I'm new to Flex but not new to the ActionScript and _javascript_, also I know lots of Java Web MVC frameworks so I have a vision about how framework should look like to make your project succeed. Thanx for any comments. Regards, Mykola -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm is bad?
"as it's great to see the technology challenged" True indeed, I think other unique frameworks would highlight more, any strengths or weaknesses in Cairngorm. So far Cairngorm holds the flex framework's heavyweight belt, time for some new contendors -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes Sent: Tuesday, 15 November 2005 10:44 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm is bad? Interesting read and well thought out. Couple of things: "..FrontController for command accessing - I see no reason why I have to look up somehting by name rather that access directly. It gives nothing but pain because it does not make Command free of knowing about the View and the Model, the dependency still remains.." --- I've probably used it in a different manner, but essentially i tend to broadcast an event request, rather then accessing it direct. Commands can change, but their verbing doesn't or better yet you can disable a command by capturing it and diverting it to a swap out sequence...ie not sure how you mean the view access the front controller direct? - as for model? again, you get a result with a command, how do you abstract that cleanly? ie where do you store that commands result stack? i think the objective for Model in Cairngorm was to formalize the overall "how it gets stored" vs free for all memory storage. "..Almost everything is static - Singleton is antipattern, since it does not allow inheritance. It means I cannot enhance FrontController, ServiceLocator etc. Also I do not understand why ModelLocator is static. Static model is bad since you cannot have 2 instances of window that has different models. The best practice is to have everything non-static and bind in run time. Otherwise it becomes not OOP and you finally come to the situation when you cannot extend your functionality without complete re factoring..." -- Right tool right job... Static has gains, more so you don't need to write some long winded factory method to access a singleton or something along those lines. As then their is now a reliance on it first being initialized in memory, secondly did it succeed or fail and lastly then access it. Static can be used to implement instance based nodes, its perfectly legitimate to use a static class as a facade to your memory cache or instance specific nodes? isn't OOP more about abstraction of complexity? the semantics of how to me are "whatever blows your hair back" weighted arguments? (ie not sure i'd back your decision on this one fully, partially yes, but not fully). "...Single command instances :) I was surprised but in suggested FrontController all events of the same name are handled by the same command instance. It is completely wrong usage of the command pattern that considering that you are always create new command instance upon execution. Without this you cannot implement such stuff as undo/redo (actually it is the only case when you need command, only for undo/redo). But don't 99% of your functionality does not requires undo/redo. Then why you use commands, and why you use it wrong way? The answer is: To make your code contain more lines and more files, to say you manager that the framework requires lots of work, but is is architectured by megaguys and they cannot be wrong. Remember EJB? I do.." I can't speak for i2 guys on this one, but to me i think the overall level of thinking was more about memory then anything else. Unlike other languages or platforms, we in the FLEX world (ie FLEX 1.5 especially) have a limited usage of memory, the more we take up, the slower things get. So its in our best interest to unload as much as we can as soon as we can, especially with previous versions of Flash Player having issues with automated Garbage Collection. That being said, the new and latest FLEX 2.0 has a lot more powers at hand, so this could be revisited in a new light - that's for people like yourself and others on this list to flood the Cairngorm development team with suggestions..so they can be debated and weighed up against the overall purpose of why the framework exists. Writing a Framework is never going to be the complete universal way of life, the purpose of a framework is to increase delivery and abstract complexity where possible. Cairngorm does that, the semantics of how and why are more about theology. In that if you wanted to implement the above and you *HAVE* to use the Cairngorm way of life, you can, there are avenues to do this, it just requires your mode of thinking to be a bit more agile in execution. That being said, feel free to write one based on cairngorm or other, as the more out there the more we can cherry pick and hopefully come together on a more battle tested and power-focused framework.? Interesting read though and i (flexcoder member badge #221
Re: [flexcoders] Cairngorm is bad?
Interesting read and well thought out. Couple of things: "..FrontController for command accessing - I see no reason why I have to look up somehting by name rather that access directly. It gives nothing but pain because it does not make Command free of knowing about the View and the Model, the dependency still remains.." --- I've probably used it in a different manner, but essentially i tend to broadcast an event request, rather then accessing it direct. Commands can change, but their verbing doesn't or better yet you can disable a command by capturing it and diverting it to a swap out sequence...ie not sure how you mean the view access the front controller direct? - as for model? again, you get a result with a command, how do you abstract that cleanly? ie where do you store that commands result stack? i think the objective for Model in Cairngorm was to formalize the overall "how it gets stored" vs free for all memory storage. "..Almost everything is static - Singleton is antipattern, since it does not allow inheritance. It means I cannot enhance FrontController, ServiceLocator etc. Also I do not understand why ModelLocator is static. Static model is bad since you cannot have 2 instances of window that has different models. The best practice is to have everything non-static and bind in run time. Otherwise it becomes not OOP and you finally come to the situation when you cannot extend your functionality without complete re factoring..." -- Right tool right job... Static has gains, more so you don't need to write some long winded factory method to access a singleton or something along those lines. As then their is now a reliance on it first being initialized in memory, secondly did it succeed or fail and lastly then access it. Static can be used to implement instance based nodes, its perfectly legitimate to use a static class as a facade to your memory cache or instance specific nodes? isn't OOP more about abstraction of complexity? the semantics of how to me are "whatever blows your hair back" weighted arguments? (ie not sure i'd back your decision on this one fully, partially yes, but not fully). "...Single command instances :) I was surprised but in suggested FrontController all events of the same name are handled by the same command instance. It is completely wrong usage of the command pattern that considering that you are always create new command instance upon execution. Without this you cannot implement such stuff as undo/redo (actually it is the only case when you need command, only for undo/redo). But don't 99% of your functionality does not requires undo/redo. Then why you use commands, and why you use it wrong way? The answer is: To make your code contain more lines and more files, to say you manager that the framework requires lots of work, but is is architectured by megaguys and they cannot be wrong. Remember EJB? I do.." I can't speak for i2 guys on this one, but to me i think the overall level of thinking was more about memory then anything else. Unlike other languages or platforms, we in the FLEX world (ie FLEX 1.5 especially) have a limited usage of memory, the more we take up, the slower things get. So its in our best interest to unload as much as we can as soon as we can, especially with previous versions of Flash Player having issues with automated Garbage Collection. That being said, the new and latest FLEX 2.0 has a lot more powers at hand, so this could be revisited in a new light - that's for people like yourself and others on this list to flood the Cairngorm development team with suggestions..so they can be debated and weighed up against the overall purpose of why the framework exists. Writing a Framework is never going to be the complete universal way of life, the purpose of a framework is to increase delivery and abstract complexity where possible. Cairngorm does that, the semantics of how and why are more about theology. In that if you wanted to implement the above and you *HAVE* to use the Cairngorm way of life, you can, there are avenues to do this, it just requires your mode of thinking to be a bit more agile in execution. That being said, feel free to write one based on cairngorm or other, as the more out there the more we can cherry pick and hopefully come together on a more battle tested and power-focused framework.? Interesting read though and i (flexcoder member badge #221312) would love to see more talk like this here, as it's great to see the technology challenged (whether thats frameworks or as2). On 11/15/05, Mykola Paliyenko <[EMAIL PROTECTED]> wrote: > Dear Flexcoders. > I want to start here discussion about development enterprise > applications using Flex. Our company has choosen Cairngorm as a > framework to do it, but I believe it has some drawbacks > My comments are here: > http://jroller.com/page/mickolka?entry=cairngorm_is_bad > I'm new to Flex but not new to the ActionScript and JavaScript, also I > know lots of Java Web MVC frameworks so I have
RE: [flexcoders] Cairngorm is bad?
Mykola, I'm about to head out to MAX in Hong Kong, so will pick up this thread on your return. What I would say is that if you find things are not working for your needs, propose to us how you would alter Cairngorm to make things better, before starting with a blank page. We're very much open to your comments and suggestions. Very briefly: 1) Commands I'd like to hear your thoughts in more detail as to why the command pattern is not as effective as anonymous classes ? What do you mean by "lots of dummy commands" ? As an application scales, the command patterns scales well also. 2) Front Controller Again, I don't quite understand your concern. Command manipulates the model, not the view (if you follow the ModelLocator), so command is unaware of the implementation of the view. What do you mean by "accessing something by name" ? 3) Singleton as anti-pattern I just disagree here; that we choose these things to be singletons is *because* we only want a single instance. If you require multiple instances, refactor the singleton to a factory pattern ? Can you give real use-case here as to why you might want to do this, and where current implementation fails you ? 4) Il8n The architectural framework provides a prescriptive framework for architecture, and doesn't choose to implement services in a prescribed manner. There is belief that internationalisation may become a core part of the Flex framework, and Cairngorm elected not to prescribe an implementation until this becomes apparent. In the meantime, there is a well described implementation by Benoit Hedard that fits within the Cairngorm architecture, but does not rely upon it. 5) No unit-tests Fair point; however, we haven't prescribed mock objects as part of Flex Unit, or asynchronous tests as part of Flex Unit, but that doesn't mean they aren't strategies that can be implemented alongside Flex Unit. Irrespective, the lack of prescribed unit-testing strategy is not to the detriment of using the Cairngorm framework. You can use the Cairngorm framework, and adopt these testing strategies if you see fit. I don't understand this as an argument for or against adopting a Cairngorm-esque architecture. 6) Single Command Instances We have an internal build of Cairngorm that doesn't have single command instances, and creates a new instance per command. It's not backward compatible, which is why we chose not to release it as yet. As for "we only use commands to be architecture megaguys and write lots of lines of code". I assume you're being flippant That we choose to use Commands is because we find that it provides a readable and maintanable code-base, that it supports feature-driven development, that it encourages reuse and promotes refactoring of the code-base, and that it enables collective code ownership. Command patterns have worked for us on a large number of multi-team projects, and I know it's working for a great number of other developers. If you can propose something that also achieves the above, I'm open to suggestions. Cairngorm is by no means "the true way, the only way", and I absolutely agree that one could take alternate approaches to implementing a framework microarchitecture. However, I'd welcome that these approaches be presented as alternatives, with their own justifications for the rationale and motivation behind their particular implementations. Incidentally; Cairngorm *is* open-source; your blog entry suggests that it isn't ? So; how would you do things differently ? What are the problems that you feel a framework for RIA has to address, what are the forces, and how do you think you might go about your implementation ? Do you agree with the forces and motivations, and dispute their implementation, or do you believe we are offering solutions to problems that do not exist ? I genuinely look forward to your feedback; however, please excuse me if I don't reply over the next week. I'll be spreading the Cairngorm-word at MAX Greater China :-D Best, Steven -- Steven Webster Practice Director (Rich Internet Applications) Macromedia Consulting EMEA Office: + 44 (0) 131 338 6108 Mobile: +44 (0) 7917 428 947 > -Original Message- > From: flexcoders@yahoogroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Mykola Paliyenko > Sent: 14 November 2005 17:15 > To: flexcoders > Subject: [flexcoders] Cairngorm is bad? > > Dear Flexcoders. > I want to start here discussion about development enterprise > applications using Flex. Our company has choosen Cairngorm as > a framework to do it, but I believe it has some drawbacks My > comments are here: > http://jroller.com/page/mickolka?entry=cairngorm_is_bad > I'm new to Flex but not new to the ActionScript and > JavaScript, also I know lots of Java Web MVC frameworks so I > have a vision about how framework should look like to make > your project succeed. > Thanx for any comments. > > Regards, > Mykola > > > > > ---