Re: [flexcoders] cairngorm design question, need suggestions
hi Ralf; in our case, we auto-generate the commanders; so we wouldn't need to test these parts. since calling a commander from another one without dispatching a new event does not violate the micro-architecture rules; we will choose it for efficiency; thanks a lot. On Nov 16, 2007 2:09 PM, Ralf Bokelberg [EMAIL PROTECTED] wrote: Both is possible. However, in our practice we try to test as much as possible. The call to a cairngorm command is rather difficult to test, whereas you can easily test if a ciarngorm event is dispatched by adding a listener to the CairngormEventDispatcher. Cheers Ralf. On Nov 16, 2007 12:34 PM, Yigit Boyar [EMAIL PROTECTED]yboyar%40gmail.com wrote: hi all; i work in a project which includes the implementation of a RIA application in which the user will generate an XML based on an XSD defined language using dragdrops and etc. (user never sees the xml). at first, we developed a code generator using AIR that takes the XSD and generates vo's, commaders, events,model controller. so we just hand coded the views. and the demo was very successful. now the second phase of the project came and there are huge differences in the XSD, so we had to handcode additional things into commanders, which violated the auto-generation approach and resulted in some bugs inefficiency. then we decided to upgrade the code generator to create more clever commanders and more specific events. we have an important debate here for which we need suggestions, so i'm presenting you our question. when an event is being handled, there may be need to do some more things which is done by another commander and has a specific event. in such a situation, -- should the commander call the other commander just creating the event and sending it to the other's execute method or --should the commander create the event and just dispatch. the second is the normal way for the cairngorm specs but the first is much more efficient. so which one do you suggest? thnks. p.s. commanders are specific to VO's a a commander just edit's it's VO's data on the model. -- Ralf Bokelberg [EMAIL PROTECTED] ralf.bokelberg%40gmail.com Flex Flash Consultant based in Cologne/Germany
Re: [flexcoders] cairngorm design question, need suggestions
Both is possible. However, in our practice we try to test as much as possible. The call to a cairngorm command is rather difficult to test, whereas you can easily test if a ciarngorm event is dispatched by adding a listener to the CairngormEventDispatcher. Cheers Ralf. On Nov 16, 2007 12:34 PM, Yigit Boyar [EMAIL PROTECTED] wrote: hi all; i work in a project which includes the implementation of a RIA application in which the user will generate an XML based on an XSD defined language using dragdrops and etc. (user never sees the xml). at first, we developed a code generator using AIR that takes the XSD and generates vo's, commaders, events,model controller. so we just hand coded the views. and the demo was very successful. now the second phase of the project came and there are huge differences in the XSD, so we had to handcode additional things into commanders, which violated the auto-generation approach and resulted in some bugs inefficiency. then we decided to upgrade the code generator to create more clever commanders and more specific events. we have an important debate here for which we need suggestions, so i'm presenting you our question. when an event is being handled, there may be need to do some more things which is done by another commander and has a specific event. in such a situation, -- should the commander call the other commander just creating the event and sending it to the other's execute method or --should the commander create the event and just dispatch. the second is the normal way for the cairngorm specs but the first is much more efficient. so which one do you suggest? thnks. p.s. commanders are specific to VO's a a commander just edit's it's VO's data on the model. -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
[flexcoders] cairngorm design question, need suggestions
hi all; i work in a project which includes the implementation of a RIA application in which the user will generate an XML based on an XSD defined language using dragdrops and etc. (user never sees the xml). at first, we developed a code generator using AIR that takes the XSD and generates vo's, commaders, events,model controller. so we just hand coded the views. and the demo was very successful. now the second phase of the project came and there are huge differences in the XSD, so we had to handcode additional things into commanders, which violated the auto-generation approach and resulted in some bugs inefficiency. then we decided to upgrade the code generator to create more clever commanders and more specific events. we have an important debate here for which we need suggestions, so i'm presenting you our question. when an event is being handled, there may be need to do some more things which is done by another commander and has a specific event. in such a situation, -- should the commander call the other commander just creating the event and sending it to the other's execute method or --should the commander create the event and just dispatch. the second is the normal way for the cairngorm specs but the first is much more efficient. so which one do you suggest? thnks. p.s. commanders are specific to VO's a a commander just edit's it's VO's data on the model.
[flexcoders] cairngorm design question , need suggestions
hi all; we have a GUI built with flex using cairngorm microarchitechture. the GUI is quite complex, and there is an xml schema (xsd) that represents the VO structure. We prepared a code generator(using AIR) which parses the xsd and creates vo's,commanders,events,modelfrontcontroller, so we just handcode the view. (Vo's are serializable to XML and deserializable from XML , all auto generated -sth like jaxb of java- ) the GUI was good for version1 but the XSD had to change a lot and we had to insert hand written code into commaders and we started to have performance issues. now there is a new XSD, GUI will be recreated and we want to upgrade our code generator to support the changes (more clever commanders more specific events!); so here comes my design question : every class has it's own commander. and sometimes, when an event is being executed, another commander should also work(sth more must be done), and there is a specific event for that operation too. (e.g. deletion of an instance of class A requires the update of the instances of class B ) in this situation, 1 should commanderA dispatch an event to update class B instance or 2 should commanderA call commanderB's execute function with the needed event as argument or 3 should commarderA edit B vo's . (we don't prefer this cuz it violates the generic style of our code cairngorm) the second option is more efficient since it does not need to dispatch the event and wait for it to be caught; but we wonder whether it violates the cairngorm design pattern rules. this is a really important project, so we'll be very pleased by taking your comments.
Re: [flexcoders] cairngorm design question , need suggestions
Hi Yigit, To execute commanderB from commanderA you need to dispatch eventB from commanderA. You can either pass the instance as an argument of eventB or reference via the model in commandB. regards, Bjorn On 14/11/2007, at 9:44 AM, yigit boyar wrote: hi all; we have a GUI built with flex using cairngorm microarchitechture. the GUI is quite complex, and there is an xml schema (xsd) that represents the VO structure. We prepared a code generator(using AIR) which parses the xsd and creates vo's,commanders,events,modelfrontcontroller, so we just handcode the view. (Vo's are serializable to XML and deserializable from XML , all auto generated -sth like jaxb of java- ) the GUI was good for version1 but the XSD had to change a lot and we had to insert hand written code into commaders and we started to have performance issues. now there is a new XSD, GUI will be recreated and we want to upgrade our code generator to support the changes (more clever commanders more specific events!); so here comes my design question : every class has it's own commander. and sometimes, when an event is being executed, another commander should also work(sth more must be done), and there is a specific event for that operation too. (e.g. deletion of an instance of class A requires the update of the instances of class B ) in this situation, 1 should commanderA dispatch an event to update class B instance or 2 should commanderA call commanderB's execute function with the needed event as argument or 3 should commarderA edit B vo's . (we don't prefer this cuz it violates the generic style of our code cairngorm) the second option is more efficient since it does not need to dispatch the event and wait for it to be caught; but we wonder whether it violates the cairngorm design pattern rules. this is a really important project, so we'll be very pleased by taking your comments.
Re: [flexcoders] Cairngorm - design question, need suggestions-best practices
thanks ben; but i'm not able to afford it in this case... but i found out that Red5 has object sharing and it is open source free. so i'll try to learn and use Red5 yigit - Original Message From: Ben Yee [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, February 22, 2007 12:35:01 AM Subject: Re: [flexcoders] Cairngorm - design question, need suggestions-best practices hey yigit, check out flex data services http://www.adobe. com/products/ flex/dataservice s/ it comes at a cost $$$ if you can afford it, it'll look after pushing data to your app which is what you're asking. can also check out http://www.themidni ghtcoders. com/weborb/ php/index. htm cheers ben On 2/22/07, Yiðit Boyar [EMAIL PROTECTED] com wrote: hi all; i just can not believe there is no reply to my post. has not anyone faces the same question ? or lazy solutions enough for you? or our group started to overflow and not answer needs... maybe a newsgroup/forum is needed.. - Original Message From: Yiðit Boyar [EMAIL PROTECTED] com To: [EMAIL PROTECTED] ups.com Sent: Tuesday, February 20, 2007 9:35:55 PM Subject: [flexcoders] Cairngorm - design question, need suggestions- best practices hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. !-- #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; } #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; } #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ float:left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana; font-size:77%; padding:15px 0; } #ygrp-ft{ font-family:verdana; font-size:77%; border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px; } #ygrp-vital{ background-color:#e0ecee; margin-bottom:20px; padding:2px 0 8px 8px; } #ygrp-vital #vithd{ font-size:77%; font-family:Verdana; font-weight:bold; color:#333; text-transform:uppercase; } #ygrp-vital ul{ padding:0; margin:2px 0; } #ygrp-vital ul li{ list-style-type:none; clear:both; border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold; color:#ff7900; float:right; width:2em; text-align:right; padding-right:.5em; } #ygrp-vital ul li .cat{ font-weight:bold; } #ygrp-vital a { text-decoration:none; } #ygrp-vital a:hover{ text-decoration:underline; } #ygrp-sponsor #hd{ color:#999; font-size:77%; } #ygrp-sponsor #ov{ padding:6px 13px; background-color:#e0ecee; margin-bottom:20px; } #ygrp-sponsor #ov ul{ padding:0 0 0 8px; margin:0; } #ygrp-sponsor #ov li{ list-style-type:square; padding:6px 0; font-size:77%; } #ygrp-sponsor #ov li a{ text-decoration:none; font-size:130%; } #ygrp-sponsor #nc { background-color:#eee; margin-bottom:20px; padding:0 8px; } #ygrp-sponsor .ad{ padding:8px 0; } #ygrp-sponsor .ad #hd1{ font-family:Arial; font-weight:bold; color:#628c2a; font-size:100%; line-height:122%; } #ygrp-sponsor .ad a{ text-decoration:none; } #ygrp-sponsor .ad a:hover{ text-decoration:underline; } #ygrp-sponsor .ad p{ margin:0; } o {font-size:0;} .MsoNormal { margin:0 0 0 0; } #ygrp-text tt{ font-size:120%; } blockquote{margin:0 0 0 4px;} .replbq {margin:4;} -- Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
RE: [flexcoders] Cairngorm - design question, need suggestions-best practices
Unless I am misunderstanding your question, this does not really sound like a problem the MVC design pattern, but rather a typical client-server app problem. To ensure that all of your clients always have the most up to date info, you really only have a few options. Push updates from the server to the clients using something like FDS Poll the server constantly to see if any changes have occurred since your last poll and pull down the latest data if so Either solution, you would then just update your cairngorm model with the data received in the result event (in the pulling case via a service) and if your controls are bound to your model then they would update automatically after the data transfer completed. Of course there are tons of other considerations that come into play in this scenario like conflict resolution, which can be solved with a complex merge/purge based solution or a last in wins kind of thing. All problems that just about every client server app has to face when dealing with multiple clients modifying the same data. Just some things to think about. If I am off base from your question, just let me know. Karl Cynergy From: flexcoders@yahoogroups.com on behalf of Yiðit Boyar Sent: Wed 2/21/2007 3:45 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Cairngorm - design question, need suggestions-best practices hi all; i just can not believe there is no reply to my post. has not anyone faces the same question ? or lazy solutions enough for you? or our group started to overflow and not answer needs... maybe a newsgroup/forum is needed.. - Original Message From: Yiðit Boyar [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 20, 2007 9:35:55 PM Subject: [flexcoders] Cairngorm - design question, need suggestions-best practices hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit Expecting? Get great news right away with email Auto-Check. http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html Try the Yahoo! Mail Beta. http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw-- to find your fit.
Re: [flexcoders] Cairngorm - design question, need suggestions-best practices
hi all; i just can not believe there is no reply to my post. has not anyone faces the same question ? or lazy solutions enough for you? or our group started to overflow and not answer needs... maybe a newsgroup/forum is needed.. - Original Message From: Yiðit Boyar [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 20, 2007 9:35:55 PM Subject: [flexcoders] Cairngorm - design question, need suggestions-best practices hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. !-- #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; } #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; } #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ float:left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana; font-size:77%; padding:15px 0; } #ygrp-ft{ font-family:verdana; font-size:77%; border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px; } #ygrp-vital{ background-color:#e0ecee; margin-bottom:20px; padding:2px 0 8px 8px; } #ygrp-vital #vithd{ font-size:77%; font-family:Verdana; font-weight:bold; color:#333; text-transform:uppercase; } #ygrp-vital ul{ padding:0; margin:2px 0; } #ygrp-vital ul li{ list-style-type:none; clear:both; border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold; color:#ff7900; float:right; width:2em; text-align:right; padding-right:.5em; } #ygrp-vital ul li .cat{ font-weight:bold; } #ygrp-vital a { text-decoration:none; } #ygrp-vital a:hover{ text-decoration:underline; } #ygrp-sponsor #hd{ color:#999; font-size:77%; } #ygrp-sponsor #ov{ padding:6px 13px; background-color:#e0ecee; margin-bottom:20px; } #ygrp-sponsor #ov ul{ padding:0 0 0 8px; margin:0; } #ygrp-sponsor #ov li{ list-style-type:square; padding:6px 0; font-size:77%; } #ygrp-sponsor #ov li a{ text-decoration:none; font-size:130%; } #ygrp-sponsor #nc { background-color:#eee; margin-bottom:20px; padding:0 8px; } #ygrp-sponsor .ad{ padding:8px 0; } #ygrp-sponsor .ad #hd1{ font-family:Arial; font-weight:bold; color:#628c2a; font-size:100%; line-height:122%; } #ygrp-sponsor .ad a{ text-decoration:none; } #ygrp-sponsor .ad a:hover{ text-decoration:underline; } #ygrp-sponsor .ad p{ margin:0; } o {font-size:0;} .MsoNormal { margin:0 0 0 0; } #ygrp-text tt{ font-size:120%; } blockquote{margin:0 0 0 4px;} .replbq {margin:4;} -- 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news
Re: [flexcoders] Cairngorm - design question, need suggestions-best practices
hey yigit, check out flex data services http://www.adobe.com/products/flex/dataservices/ it comes at a cost $$$ if you can afford it, it'll look after pushing data to your app which is what you're asking. can also check out http://www.themidnightcoders.com/weborb/php/index.htm cheers ben On 2/22/07, Yiðit Boyar [EMAIL PROTECTED] wrote: hi all; i just can not believe there is no reply to my post. has not anyone faces the same question ? or lazy solutions enough for you? or our group started to overflow and not answer needs... maybe a newsgroup/forum is needed.. - Original Message From: Yiðit Boyar [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 20, 2007 9:35:55 PM Subject: [flexcoders] Cairngorm - design question, need suggestions-best practices hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit -- Expecting? Get great news right away with email Auto-Check.http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html Try the Yahoo! Mail Beta.http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html -- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travelhttp://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0Ato find your fit.
Re: [flexcoders] Cairngorm - design question, need suggestions-best practices
One solution could be to use FDS ... which,IMO, provides functionality to push changes to the client from server. On Feb 22, 2007, at 3:15 AM, Yiðit Boyar wrote: hi all; i just can not believe there is no reply to my post. has not anyone faces the same question ? or lazy solutions enough for you? or our group started to overflow and not answer needs... maybe a newsgroup/forum is needed.. - Original Message From: Yiðit Boyar [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 20, 2007 9:35:55 PM Subject: [flexcoders] Cairngorm - design question, need suggestions- best practices hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
[flexcoders] Cairngorm - design question, need suggestions-best practices
hi all; i'll buld an application in which the same data (or sth related) is shown in many views; so i will user cairngorm. (phpmysqlamfphp) but the problem is that other clients may change the data(base) so my model values must be updated in these cases. this seems to be a common problem with MVC so can you please share your solutions and best practices ? the first thing that comes to my mind is to check database for changes periodically, and most possibly this is the only way; but many procedures can be used in this also; so i need suggestions before starting coding. thanks.. yigit Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097