What do you find to be best practice when it comes to writing AS code to manage a big app ?

Right now I am considering 3 options:
1) I write all the code in a root component that extends group for example like this:
<s:Application>
     <s:AppGroup>
               <s:List />
     </s:AppGroup>
</s:Application>
So in it I will write the code to manage the list. Ok but Imagine now I have 10 views inside that AppGroup each having a list which needs to be managed. So here comes my option 2.
2) I write code in the AppGroup component to manage what's on it's level and for new level (view for example) I create another component like ViewGroup1, ViewGroup2 etc which extends group or something else and I write code in it to manage what's inside of it. This looks like this:
<s:Application>
     <s:AppGroup>
          <s:ViewGroup1>
               <s:List />
          </s:ViewGroup1>
          <s:ViewGroup2>
               <s:List />
          </s:ViewGroup2>
     </s:AppGroup>
</s:Application>
So this time the code to manage the views will be in AppGroup and the code for managing the Lists will be in the ViewGroup1/2 component.
3) of course sometimes mixed architecture if for example the ViewGroup1 is very simple and doesn't have list but a label or something like that the code could be written in the AppGroup.
What do you think of this code structure? Is my logic good or there's something else considered a best practice at the moment ? Thanks!

Thank you all for the thoughts. Could we please stick to flex only for now...
Currently I have a project where I see this structure:
<Application creationComplete="init();">
     <fx:Script source="MainApp.as" /> - all initialization code is here
     <components /> - many components
</Application>
In the creation complete of the Application which is in MainApp.as, dataProviders are set and a controller class is initiated to which the Application is passed as Object and everything is manipulated from that controller. As you mentioned I guess you can always create additional controllers and pass them the Application or some other components from which they could start controlling so to speak.
I am not sure if this structure is good or not, I started comparing it with mine and I ended up here...
What I see at this point compared to mine is that:
- in the included MainApp.as in Application I have question marks when i type something like "stage" in a function, I needs me to type "this.stage", which I don't like. To me it looks like including is bad and maybe everything should have started with creationComplete in the Application mxml with importing and initiating the controller with passing him the Application right away. Is that correct?
- in the example given above, after MainApp initiates the controller by passing him the Application, the controller looses all of the nice code hints since now the Application is an object... maybe it's wrong for it to be object ? Should it be something else?
Compared to my approach when I separate my logic into AS Group which is then extended as MXML Group. All I have to do is declare the instances in AS which I have as IDs in MXML and voila... I can control them and write their logic with all the nice code hints present.
So basicly at this point you say instead of extending Group in AS every time I want to separate logic, write a controller right ?
Here is what I summarized for now:
1) Create a RootController class
2) Initiate it in the creation complete of the Application passing the Application (as what type - object or something else?)
3) manage all logic in that controller
4) if parts of the application are too complex they can be separated into additional controllers.
5) the RootController can initiate SubControllers which can initiate SubSubControllers
6) to all controllers a component must be passed as a starting point for the logic
Is this correct? If yes, what about the code hinting compared to my approach?
Would be very nice if someone of you could make a very very very simple app with the model you are talking about, or if you have an article you took it from share the link! Thanks!

Similar Messages

  • Best practices when it comes on online content creation

    I'm trying my luck since Google is not really providing me the results I'm looking for or I'm using the wrong word searches. Is there any information available that lets a novice like me to know when developing an online content, what are some of the best practices to adopt from a user prespective or human factor engineering. Examples of some scenarios
    - When developing text caption, what should be the appropriate font size be?
    - When having a light color background, what color should the text caption and highlight box looks like?
    - In software simulation and adopting the TTS agent, should I have only one voice or should I have multiple voices?
    Any advice or point of reference is appreciated.
    Regards
    AJ

    Definitely no internet-wide standards for any kind of presentation, but most mid-to-large sized companies have a standards document somewhere.
    That said, if you're like me and lacking in visual design sensibilities, the answer is simple - theft!  Find a video or training presentation you like, and adapt it.  The rules say you can't re-use their actual content, but nothing is stopping you from ethically borrowing a few aspects of a visual style - font, background colors, etc.
    Also, your approach will evolve over time, as you gain experience, and the specifics will change quite a bit depending on your subject matter, and your intended audience.  A marketing video is distinct from an informational video in some fundamental ways, and aiming at customers vs. prospects will also significantly affect how you present your message.
    If all else fails, go to Fiverr.com and ask someone to build you a title slide based on your company logo and the title of your piece.  That should give you a great starting point, for $5!

  • Best practice when it comes to inserting audio for powerpoint slides

    I'm creating a mixture of PowerPoint slides with animation and software simulation projects from captivate.
    Currently I have developed the audio files associated with the animation objects for the PowerPoint slide. My question
    Should I insert the audio files into PowerPoint and edit the timing of the animation based on the duration of the audio. I have been playing around with the editing and too be honest, I'm getting a tad frustrated trying to conduct the timing.
    or
    Should I insert the audio via Captivate after importing the PowerPoint slides?
    Any help is appreciated.
    Regards
    AJ

    In the Library all audio clips will be stored. Either from the Library or using the Audio Management panel, you can edit the audio clips directly in Audition (part of the Adobe Creative Cloud, one of the best audio applications available) and when saving they are automatically edited in Captivate as well. Same work flow exists with Photoshop: you can edit a source Photoshop file, where Captivate will keep the wanted layers as separate images in the Library, and you can edit them from Captivate right away in Photoshop. The integration of Captivate with other Adobe applications is unique in the eLearning tools.

  • Where does one find the Oracle Best Practice/recommendations for how to DR

    What is the Oracle Best Practice for install/deployment and configuration of ODI 11g for Disaster Recovery?
    We have a project that is using Oracle ODI 11g (11.1.1.5).
    We have configured all the other Oracle FMW components as per the Oracle DR EDG guides. Basically using the Host ip name/aliasing concept to ‘trick’ the secondary site into thinking
    it is primary and continue working with minimal (or no) manual reconfiguration. But will this work for ODI? The FMW DR guide has sections for SOA, WebCenter and IdM, but nothing for ODI.
    Since ODI stores so much configuration information in the Master Repository..when this DB gets ‘data guarded’ to the secondary site and promoted to Primary…ODI will still think it is at the ‘other’ site. Will this break the actual agents running the scenarios?
    Where does one find the Oracle Best Practice/recommendations for how to DR ODI properly?
    We are looking for a solution that will allow a graceful switchover/failover with minimal manual re-configuration.

    user8804554 wrote:
    Hi all,
    I m currently testing external components with Windows Server and I want to test Oracle 11g R2.
    The only resource I have is this website and the only binaries seem to be for Linux OS.You have one other HUGE resource that, while it won't answer your current question, you'd better start getting familiar with if you are going to use Oracle. That is the complete and official documentation, found at tahiti.oracle.com
    >
    Does anybody know how I can upgrade my Oracle 11.1.0.7 version to the R2 release?
    Thanks,
    Bertrand

  • What are Microsoft- or other's-best practice or recommendation of Disk usage, CPU usage, memory usage monitoring to prevent system trouble ?

    We use win2003,win2008,win2012 servers.
    I heard somewhere that Microsoft recommendation threshold of disk usage monitoring is ( free disk space >= 15- 20 %) , if I remember correctly, but how about CPU usage and memory usage monitoring ? 
    What are  Microsoft- or other's-best practice or recommendation of Disk usage, CPU usage, memory usage monitoring to prevent system trouble and improve availability ?

    Hi,
    You can refer the following Performance Tuning Guidelines,
    Performance Tuning Guidelines for Windows Server 2003
    http://download.microsoft.com/download/2/8/0/2800a518-7ac6-4aac-bd85-74d2c52e1ec6/tuning.doc
    Performance Tuning Guidelines for Windows Server 2008 R2
    http://blogs.technet.com/b/josebda/archive/2010/08/27/performance-tuning-guidelines-for-windows-server-2008-r2.aspx
    WINDOWS SERVER 2012 - PERFORMANCE TUNING GUIDELINES
    http://blogs.technet.com/b/itprocol/archive/2012/11/27/windows-server-2012-performance-tuning-guidelines.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • What would you recommend as the best video converter (mac)?

    Hi,
    I frequently have to convert from mov. to wmv files for work presentations, currently i am using wondershare video converter for mac but it seems to be playing up. What would you say is the best video converter on the market, or most reliable?
    Thanks!

    Hi(Bonjour)!
    flip4mac WMV component
    www.flip4mac.com
    Michel Boissonneault

  • What do you think is the best APPS?

    So after downloading a few apps I would like to know what do you think is the best Free apps and best paying apps you have.
    MY BEST FREE APPS
    1.) Facebook
    2.) Myspace
    3.) Bank of America
    4.) Ebay
    5.) TMZ
    MY BEST PAYING APPS
    1.) Touch Grind
    2.) Deal or no deal
    3.) Price is right

    Depending on the specs of your computer, time taken to convert DVD's to an iPod-playable format can vary. On my computer (see below), it takes about 10 hours to convert a 2-hour DVD to the iPod format, using Videora.
    So, due to the extremely large size of the DVD rip, it'll take a while to convert it, regardless of how fast or slow your system is.

  • Best practices when carry forward for audit adjustments

    Dear experts,
    I would like to know if someone can share his best practices when performing carry forward for audit adjustments.
    We are actually doing legal consolidation for one customer and we are facing one issue.
    The accounting team needs to pass audit adjustments around April-May for last year.
    So from January to April / May, the opening balance must be based on December closing of prior year.
    Then from May / June to December, the opening balance must be based on Audit closing of prior year.
    We originally planned to create two members for December period, XXXX.DEC and XXXX.AUD
    Once the accountants would know their audit closing balance, they would have to input it on the XXXX.AUD period and a business rule could compute the difference between the closing of AUD and DEC periods and store the result on an opening flow.
    The opening flow hierarchy would be as follow:
    F_OPETOT (Opening balance Total)
        F_OPE (Opening balance from December)
        F_OPEAUD (Opening balance from the difference between closing balance of Audit and December periods)
    Now, assume that we are in October, but for any reason, the accountant run a carry forward for February, he is going to impact the opening balance because at this time (October), we have the audit adjustments.
    How to avoid such a thing? What are the best practices in this case?
    I guess it is something that you may have encounter if you did a consolidation project.
    Any help will be greatly appreciated.
    Thanks
    Antoine Epinette

    Cookman and I have been arguing about this since the paleozoic era. Here's my logic for capturing everything.
    Less wear and tear on the tape and the deck.
    You've got everything on the system. Can't tell you how many times a client has said "I know that there was a better take." The only way to disabuse them of this notion is to look at every take. if it's not on the system, you've got to spend more time finding the tape, and adding "wear and tear on the tape and the deck." And then there's the moment where you need to replace the audio for one word from another take. You can quickly check all the other takes (particularly if you've done a thorough job logging the material - see below)_.
    Once it's on the system, you still need to log and learn the material. You can scan thru material much faster once it's captured. Jumping around the material is much easier.
    There's no question that logging the material before you capture makes you learn the material in a more thorough way, but with enough selfdiscipline, you can learn the material as thoroughly once it's been captured.

  • Best practice when using Tangosol with an app server

    Hi,
    I'm wondering what is the best practice when using Tangosol with an app server (Websphere 6.1 in this case). I've been able to set it up using the resource adapter, tried using distributed transactions and it appears to work as expected - I've also been able to see cache data from another app server instance.
    However, it appears that cache data vanishes after a while. I've not yet been able to put my finger on when, but garbage collection is a possibility I've come to suspect.
    Data in the cache survives the removal of the EJB, but somewhere later down the line it appear to vanish. I'm not aware of any expiry settings for the cache that would explain this (to the best of my understanding the default is "no expiry"), so GC came to mind. Would this be the explanation?
    If that would be the explanation, what would be a better way to keep the cache from being subject to GC - to have a "startup class" in the app server that holds on to the cache object, or would there be other ways? Currently the EJB calls getCacheAdapter, so I guess Bad Things may happen when the EJB is removed...
    Best regards,
    /Per

    Hi Gene,
    I found the configuration file embedded in coherence.jar. Am I supposed to replace it and re-package coherence.jar?
    If I put it elsewhere (in the "classpath") - is there a way I can be sure that it has been found by Coherence (like a message in the standard output stream)? My experience with Websphere is that "classpath" is a rather ...vague concept, we use the J2CA adapter which most probably has a different class loader than the EAR that contains the EJB, and I would rather avoid to do a lot of trial/error corrections to a file just to find that it's not actually been used.
    Anyway, at this stage my tests are still focused on distributed transactions/2PC/commit/rollback/recovery, and we're nowhere near 10,000 objects. As a matter of fact, we haven't had more than 1024 objects in these app servers. In the typical scenario where I've seen objects "fade away", there has been only one or two objects in the test data. And they both disappear...
    Still confused,
    /Per

  • Best practices when making service requests

    Best practices when making service requests
    We've been working on moving our old services that were built with an different service request tool into RequestCenter and were wondering if anyone had any thoughts about best standards or practices for the new forms that they would be willing to share.  For example, one such standard might be that the customer - initiator information will always be displayed at the top of the request.
    Are there any other standardizations you could share that help lend consistency and provide improved readability for request forms?  Maybe someone has a design framework guide they would be willing to share?
    Thanks!
    Tim

    Thanks for the comments and the book suggestion.
    We've been placing the customer information at the top because wanted the customer to review the information before subbmitng the form.  Our LDAP data is somewhat spotty and we want to make sure we have the right information when the form is submitted but I can see the advantages to placing it at the bottom as well.  I'll have to think that over more.
    Does anyone find tha certain fields work better than others?  For example, we've not had much

  • Books / links on best practices when writing on-line Help

    Hi everyone
    Not sure were to place this topic...
    I have not posted in here for ages...
    I am a RoboHelp user and I am looking for one or several
    books about best practices when writing on-line help. For examples,
    what are the "rules" or "do's" and "don'ts" for CSS, topic linking,
    number of clicks, links within a topic, index building, etc.
    Just wondering if some people on this forum know about some
    good books where all of the rules or do's would be compiled?
    Thanks in advance for any input.
    Regards

    KeepItSimple,Stupid!
    That is, just because there are neat things like drop-down
    text, marquees, and such, doesn't mean you should use them.
    Stick to the basic HTML fonts and colors (use the
    w3schools web site for all
    things HTML and CSS.
    Instead of styles, create your lists by selecting Normal
    paragraphs and formatting with the Bullet and Number toolbar
    buttons.
    Keep your tables as simple as possible (try not to nest them
    and have all sorts of row and column spans, and try to avoid lists
    and figures, if you can). Also, break up very long tables into
    functional groupings with introductory headings.
    Use
    Peter Grainge's web
    site and
    Rick
    Stone's web site for all the best workarounds and diagnostics.
    Good luck,
    Leon

  • Best practice when modifying SAP Standard Development Component

    Hello Experts,
    What is best practice when modifying SAP Standard Development Component (Java Web Dynpro)? Iu2019m looking for the best method to do modifications to SAP Standard DC so that my changes will be kept (or need low maintenance) after a new service package (or EHP) is applied.
    Thanks,
    Kevin

    Hi,
      'How to use Busiess Packages in Enterprise Portal 6.0' is available in this link.
    http://help.sap.com/bp_epv260/EP_EN/documentation/How-to_Guides/misc/Using_Business_Packages.pdf
    Check out for the best practices.
    Regards,
    Harini S

  • A must read best practices when starting out in Designer

    Hi,
    Here is a link to a blog by Vishal Gupta on best practices when developing XFA Forms.
    http://www.adobe.com/devnet/livecycle/articles/best-practices-xfa-forms.html
    Please go read it now; it is excellent :-)
    Niall

    I followed below two links. I think it should be the same even though the links are 2008 R2 migration steps.
    http://kpytko.pl/active-directory-domain-services/adding-first-windows-server-2008-r2-domain-controller-within-windows-2003-network/
    http://blog.zwiegnet.com/windows-server/migrate-server-2003-to-2008r2-active-directory-and-fsmo-roles/
    Hope this help!

  • What is the guideline and/or best practice for EMC setup on ASM?

    We are going to use EMC CX4-480 for ASM storage on RAC. What is the guideline and best practice for EMC setup on ASM?
    Thanks for the advice!

    Probably a poor choice of words. Sorry.
    So basically, I have gotten further, but I just noticed related problem.
    I'm using the WebServices(WS) 1.0. I insert an account, then, on a separate WS call, I insert my contacts for the account. I include the AccountID, and a user defined key from the Account when creating the Contact.
    When I look at my Contact on the CRMOD web page, it shows the appropriate links back to the Account. But when I look at my Account on the CRMOD web page, it shows no Contacts.
    So when I say workflow or Best Practice, I was hoping for guidance on how to properly write my code to accomplish all of the necessary steps. As in this is how you insert an account with a contact(s) and it updates the appropriate IDs so that it shows up properly on the CRMOD web pages.
    Based on the above, it looks like I need to, as the next step, take the ContactID and update the Account with it so that their is a bi-directional link.
    I'm thinking there is a better way in doing this.
    Here is my psuedocode:
    AccountInsert()
    AccountID = NewAcctRec
    ContactInsert(NewAcctRec)
    ContactID = NewContRec
    AccountUpdate(NewContRec)
    Thanks,

  • What is the best practice when any of Src/Tgt DB is re-started in streams

    We have a live production dual direction streams environment (A --> B and B --> A) and due to a DBFcorrupt file at source A, it was brought down and all traffic was switched to B. All streams captures,prop and apply were enabled and messages were captured at B and propagated to A (but cannot reach A and apply there as it was down) .When A is re-started, some of the captured messages in B never got applied to A. What could be the possible reason. What is a best practice in a streams environment when any of the source/target instance is shutdown and re-started.

    Hi Serge,
    A specific data file got corrupted and they restored it. Can you please send me the URL for the metalink document about that bug in 9.2. I'd really appreciate your help on this.
    Thx,
    Amal

Maybe you are looking for

  • Why Automatic Generation STO

    Dear All Please release my confusion in STO Process we are using Customer and Vendor right, now i am using two vendors and same Customer because my criteria is  Two Supplying plants and One Receiving plant, here if am leaving blank in Customer Record

  • Question: Best Strategy for Dealing with Large Files 1GB

    Hi Everyone, I have to build a UCM system for large files > 1GB. What will be the best way to upload them (applet, checkin form, webdav)? Also what will be the best way to download them (applet, web form, webdav)? Any tips will be greatly appreciated

  • Possible to use RMI to upload client side image files?

    Is it possible to use RMI to upload client side image files? My intent is to allow remote clients to upload a number of small image files (jpg & gif) to a central server DBMS, by modifying a "Customer" object (eg adding a new Image object to a vector

  • CS5.5 Design Premium Fonts

    After installing I noticed that ROCKWELL font is missing. There may be others but I used this one regularly so it is really missed. I have checked the system font folder and the old font storage folder on my windows machine and its not showing up. AD

  • Video: The Three Ages of the FPGA and the Age of the Design Engineer

    Last year, Xilinx Fellow Dr. Steve Trimberger gave a talk at the University of Toronto titled "The Three Ages of the FPGA." Trimberger has worked at Xilinx since 1988-just three or four years after the company was founded-and he has seen the entire e