What are the pros and cons of storing heavely used CFCs in the application scope?

I've been storing all the required CFCs for a site in the application scope. During onApplicationStart I do something like this application.objSomeCfc =CreateObject('component', 'com.someCfc').init().
Here is my reasoning.
Get the CFCs initialized once and stored in memory for better performance.
Using CreateObject several times on each page load can have a negative impact on performance.
Having one place to create application scoped CFCs makes it easier to manage code.
So is my thinking flawed? Are there any additional pros or cons for dealing with CFCs? Is there any docs, articles, blogs, videos, frameworks, ...... that I should check that may change my perspective on how I'm doing this?
Thanks

Your approach is fine, depending on how many and what type of CFCs you are talking about. If they are "singletons" - that is, only one instance of each CFC is needed to be in memory and can be reused/shared from multiple parts of your application - caching them in the application scope is common.  Just make sure they are thread safe ("var" or local.* all your method variables).
You might consider taking advantage of a dependency injection framework, such as DI/1 (part of the FW/1 MVC framework), ColdSpring, or WireBox (a module of the ColdBox platform that can be used independently).  They have mechanisms for handling and caching singletons.  Then you wouldn't have to go to the application scope to get your CFC instances.
-Carl V.

Similar Messages

  • Are there pros and cons to using TFS as compared to Sharepoint?

    are there pros and cons to using TFS as compared to Sharepoint?

    TFS and SharePoint are two different products with overlapping functionality.
    If you are planning to use TFS for Application Lifecylce management, then I would not suggest SharePoint replacing TFS.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • What are the application can able to deploy in Weblogic

    What are the application can able to deploy in Weblogic Server ?
    We have one desktop application which developed by .net and its database in SQL Server.
    My Question is
    Is it Possible to Deploy this application in Weblogic Server ?
    Or kindly advice me what technologies can helpful for me to access via PDA
    Thanks in Advance
    Hameed
    Edited by: Hameed on Mar 10, 2013 12:44 AM

    User, this question is better asked on the {forum:id=570} forum.
    This more depends on the specification of your app and has nothing to do with jdev or adf.
    Timo

  • What are the Application avaliable in Apple Iphone 4s? i wanna that application details?, what are the Application avaliable in Apple Iphone 4s? i wanna that application details?

    I wanna know what are the defalut application will come iphone 4s.

    So they doing the ye'old monkey in the middle routine, eh? Well I'm not a monkey and neither is anyone else(!)
    AT&T is saying they aren't doing it, and that if my phone decides to crap out that I will have to see if Apple will replace my phone. But she said even though they have no involvement nor allowance with this carrier version update, that it is between apple and the federal agency requesting these updates, that she will document and send the complaint to the people at AT&T that are working on carriers updates with them.
    I also stated to the rep, that there is some chatter stating the updates are being implemented by AT&T. The rep denied any such information.
    I also asked the rep, if there has been any customer complaints or concerns brought to AT&Ts attention today in regards to Carrier Version Updates? The reps response was "no, this is a first"
    What I am experiencing: LTE or WiFi: these OTA Forced updates are unexpected and with out advanced notice.
    This is the second time I've witnessed this while the device is in use that this OTAFU comes through. There is a data cap on bandwidth, so I think the OTAFU is hogging bandwidth and other resources, which in turn is making any other apps in use choke for bandwidth and other resources while the update is taking place.
    I still have the Government Alerts with the 14.2 CU.
    I do believe this is IOL and Data Redundancy which is causing technical debt to grow exponentially out of control.
    Amber Alerts are great, useful, and helpful - but there is an App for that, a text message, and an email alert system.
    Emergency Alerts are great, and useful - BUT there are many apps and signals for that as well as being broadcasted on TV, Radio, FiOS, And Cable.
    Simply all too much(!) When is enough enough?
    What is the backup system to the government emergency alerts system, if we are unable to access any form of electronic communications?

  • What are the application components for Marketing

    Hi,Guru's
    I've got confusion about the application components which are supported by SAP CRM for Marketing for a implementation project ? And how would be the landscape for Marketing ?
    can you describe me.
    Regards
    C.R.Gupta
    Edited by: CR.Gupta on Mar 7, 2012 7:12 PM

    User, this question is better asked on the {forum:id=570} forum.
    This more depends on the specification of your app and has nothing to do with jdev or adf.
    Timo

  • What are the applications run on the Java Stack ?

    Hi all,
    Our SAP System is being upgraded to 6.o . Basis team is telling that they will not install a java stack as it need more time & extra resources. Just we want to know the list of applications OR Functionality  which need  java stack . And also in future  if we want to go for new technologies  which avaliable on SAP ,  Would this affect( missing java stack ) ?  Advanced thanks for all your suggestions.
    Thanks
    Suds

    Hi,
    For what purpose you want Java stack ?
    Thanks
    Sunny

  • What are the applications that work with time machine on lion?

    I cannot use time machine on:
    iCal
    iPhoto
    I am at a loss here. pretty sure before i could go into iphoto in the "past" and look at a picture i might have erase from before. not anymore, same with ical.

    If it's iPhoto 9.1.5 it changed with Lion:
    http://support.apple.com/kb/HT4754
    Regards,
    Colin R.

  • Using CLOB data type - Pros and Cons

    Dear Gurus,
    We are designing a database that will be receiving comments from external data source. These comments are stored as CLOB in the external database. We found that only 1% of incoming data will be larger than 4000 characters and are now evaluating the Pros and Cons of storing only 4000 characters of incoming comments in VARCHAR2 data type or using CLOB data type.
    Some of the concerns brought up during discussion were:
    - having to store CLOBs in separate tablespace;
    - applications, such Toad require changing defaults settings to display CLOBs in the grid. Default value is not to display them;
    - applications that build web page with CLOBs will be struggling to fit 18 thousand chararcters of which 17 thousand are blank lines;
    - cashing CLOBs in memory will consume big chunk of data buffers which will affect performance;
    - to manipulate CLOBs you need PL/SQL anonymous block or procedure;
    - bind variables cannot be assigned CLOB value;
    - dynamic SQL cannot use CLOBs;
    - temp tables don't work very well with CLOBs;
    - fuzzy logic search on CLOBs is ineffective;
    - not all ODBC drivers support Oracle CLOBs
    - UNION, MINUS, INTERSECT don't work with CLOBs
    I have not delt with CLOB data type in the past, so I am hoping to hear from you of any possible issues/hastles we may encounter?

    848428 wrote:
    Dear Gurus,
    We are designing a database that will be receiving comments from external data source. These comments are stored as CLOB in the external database. We found that only 1% of incoming data will be larger than 4000 characters and are now evaluating the Pros and Cons of storing only 4000 characters of incoming comments in VARCHAR2 data type or using CLOB data type.
    Some of the concerns brought up during discussion were:
    - having to store CLOBs in separate tablespace;They can be stored inline too. Depends on requirements.
    - applications, such Toad require changing defaults settings to display CLOBs in the grid. Default value is not to display them;Toad is a developer tool so that shouldn't matter. What should matter is how you display the data to end users etc. but that will depend on the interface. Some can handle CLOBs and others not. Again, it depends on the requirements.
    - applications that build web page with CLOBs will be struggling to fit 18 thousand chararcters of which 17 thousand are blank lines;Why would they struggle? 18,000 characters is only around 18k in file size, that's not that big to a web page.
    - cashing CLOBs in memory will consume big chunk of data buffers which will affect performance;Who's caching them in memory? What are you planning on doing with these CLOBs? There's no real reason they should impact performance any more than anything else, but it depends on your requirements as to how you plan to use them.
    - to manipulate CLOBs you need PL/SQL anonymous block or procedure;You can manipulate CLOBs in SQL too, using the DBMS_LOB package.
    - bind variables cannot be assigned CLOB value;Are you sure?
    - dynamic SQL cannot use CLOBs;Yes it can. 11g supports CLOBs for EXECUTE IMMEDIATE statements and pre 11g you can use the DBMS_SQL package with CLOB's split into a VARCHAR2S structure.
    - temp tables don't work very well with CLOBs;What do you mean "don't work well"?
    - fuzzy logic search on CLOBs is ineffective;Seems like you're pulling information from various sources without context. Again, it depends on your requirements as to how you are going to use the CLOB's
    - not all ODBC drivers support Oracle CLOBs not all, but there are some. Again, it depends what you want to achieve.
    - UNION, MINUS, INTERSECT don't work with CLOBsTrue.
    I have not delt with CLOB data type in the past, so I am hoping to hear from you of any possible issues/hastles we may encounter?You may have more hassle if you "need" to accept more than 4000 characters and you are splitting it into seperate columns or rows, when a CLOB would do it easily.
    It seems as though you are trying to find all the negative aspects of CLOBs and ignoring all the positive aspects, and also ignoring the negative aspects of not using CLOB's.
    Without context you're assumptions are just that, assumptions, so nobody can tell you if it will be right or wrong to use them. CLOB's do have their uses, just as XMLTYPE's have their uses etc. If you're using them for the right reasons then great, but if you're ignoring them for the wrong reasons then you'll suffer.

  • What are the steps required for running a form in web browser in form10g

    Hi All,
    I want to run my form in web i.e forms10g. Please guide me what are the application server, configuation files and built in packages required to set up.
    Thanks

    You have to do some homework before you post here. You're very unlikely to get any help without explaining what you already tried and what your specific problem is. I guess your best of to start reading the Forms Services Deployment Guide.
    I can't point you to the correct location since you didn't even mention the version you're using. If it's 10.1.2.0.2 you can find it at http://download-uk.oracle.com/docs/cd/B14099_19/web.1012/b14032/toc.htm
    Otherwise have a look around at http://docs.oracle.com

  • What are the concurrent programs or query for safe purge to claim  space

    I am using Apps R12.1.3 and database 11g Enterprise Edition(11.1.0.7.0) .Due to excess increase in the tablespace sizes,i want to know
    What are the application tables which contains logs and unwanted information which we can purge safely without affecting user data.
    And how to purge them (any query or concurrent program)?

    Hi,
    We discussed this many times before.
    Please use the following link where you will get many (all) refereces
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Purge&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks

  • What are the installer(setups) I need to install for webcenter Portal

    I use a 32bit laptop now and I want to start working on webcenter portal. What are the applications I need to install in order so I can successfully get my webcenter working. I already have installed Jdeveloper 11.1.1.6.0
    Thanks

    This depends on what exactly you mean by 'my webcenter'.
    If all you want is develop your own webcenter applications (using the WebCenter Framework), you might be good to go only with the webcenter jdev plug-in (see http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/156082.xml#oracle.webcenter.app). Your apps will be deployed to the integrated WLS. There will be two important missing pieces:
    a) WebCenter Content as the document storage (requires also a database)
    b) BPEL/BPM as the workflow engine
    You might also want to install WebCenter Portal: Spaces, or deploy your apps to a separate WebCenter Portal server (running on its own Weblogic Server).
    Optionally, you might also want to utilize other servers contained in the WebCenter Portal license such as Secure Enterprise Search for enterprise searching and/or Oracle Access Manager for enabling single sign-on between the above mentioned components.

  • HT204053 What are the pros and cons of 1) choosing to use the SAME Apple ID for iCloud services on one side, and purchases on the iTunes Store, App Store, and iBookstore, on the other side; or 2) to have and use two separate Apple Ids for these "two sides

    All is in the title, so I repeat it below with a better identation.
    What are the pros and cons of
    1) choosing to use the SAME
                                                  Apple ID for iCloud services on one side, and
                                                  purchases on the iTunes Store, App Store, and iBookstore, on the other side; or
    2) to have and use two separate Apple Ids for these "two sides"?
    P.S.
    I have loads and loads of free podcasts in iTunes in my iMac, that are certainly more thant the 5 gigas the iCloud provides for free, so I don't want those to go to the cloud. But this is perhaps a different question...
    Also need to mention that I have itunes on a mac, a pc and an iphone.
    Sorry to look so silly with this question, but I don't get the "big picture".

    You need to create a user account for your wife (or yourself depending on who has the current user account). When syncing, each of you should sign in as a separate user, login to iTunes and then sync. I had this problem when my sister got an iPhone. When we did her initial sync, everything on my iPhone showed up on hers. Apple gave me this solution.

  • What are the pros and cons of installing java+abap stack for portal?

    Hi all,
      1.What are the pros and cons of installing java+abap stack for portal?
      2.what effect it does on the ume options to be choosen??
      3.for the purpose of integration of r3,bw and crm on portal and crm 4.0 60.2.3 business package which option of stack(java or abap or both)will be good option and which ume option while installation should be choosen?
    regards
    Rajendra

    Hi Rajendra,
    The NetWeaver Installation Master Guide offers some good scenarios on the pros and cons:
    https://websmp201.sapag.de/~sapidb/011000358700005412792005E.pdf
    In a nutshell:
    ABAP+JAVA
    Pros
    - Decrease # of servers required to administer the portal
    - Less costly
    Cons
    - Upgrades could be dependent on ABAP and Java release level
    - Additional load on the server due to ABAP stack
    - Limited scalability
    JAVA and ABAP on separate server
    Pros
    - Improved performance
    - Allows each system to be single-use purpose therefore downtime does not affect other components
    - More scalable
    Cons
    - Adds complexity to landscape
    - Additional costs
    Regards,
    Thomas Pham

  • What are the pro's and con's of the 4s?

    I am not yet an owner of the 4s iphone. So what are the pro's and con's of owning the white 32gb iphone 4s? I have had the white 32 gb iphone 3gs for two years and until I get a job I will not be buying the 4s I so need.

    Samplers do alot of things, what do you need a sampler for?
    Korgs remind me of alot of presets and alot of verb and chorus. I guess if you're posting here you already have EXS and want more sounds or more functionality and if the korg thing is true you lean more to sampling/synthesis than instrument recreation (as in you probably aren't going for VSL if the korg caught your ear). Independence looks really cool, it's quite new. Kontakt is demanding and very flexible, both include huge libraries and I know kontakt has tons of great filters, FX, modulation. It also needs a pretty strong update-which is being dealt with after a year or so.

  • What are the pro's and con's (samplers)

    -I hate to beat and dead horse, but Im about to buy some new software, and I trying to make the best choice--
    What are the pro and cons of the major samplers (Im looking for a more radio-ish sound, motif/triton/phantom).
    i.e:mach five, sampletank 2l, exs, and kontact
    (a poster here said Colossus, ive need heard of it are used it--or HALion(is this only for pc's)--gigastudio(same questions as halion).

    Samplers do alot of things, what do you need a sampler for?
    Korgs remind me of alot of presets and alot of verb and chorus. I guess if you're posting here you already have EXS and want more sounds or more functionality and if the korg thing is true you lean more to sampling/synthesis than instrument recreation (as in you probably aren't going for VSL if the korg caught your ear). Independence looks really cool, it's quite new. Kontakt is demanding and very flexible, both include huge libraries and I know kontakt has tons of great filters, FX, modulation. It also needs a pretty strong update-which is being dealt with after a year or so.

Maybe you are looking for

  • [SOLVED] Random kernel panics during boot (Waiting for UDev uevents..)

    Update 2012-03-31: Workaround confirmed to work, see tenthirteen's post. Update 2012-02-03: I've narrowed down the problem to the 3.x kernels. Downgrading to kernel26-2.6.38.5-1, with the other packages up-to-date (using nouveau instead of nvidia dri

  • Create a pdf print without the HD files

    Hello every one, Working on Macintoch with Lightroom 4.2 Before we were able to print a pdf file on Mac, even if we weren't connected to the Raw files. It was enought to click on "brouillon" in french, what is draft I think in english I think. But no

  • [ABAP] Create sales order using FM BAPI_SALESORDER_CREATEFROMDAT2 problem

    Hello All, In a report I have to create sales orders, I use function  BAPI_SALESORDER_CREATEFROMDAT2, but I got the message like "ship-to-party xxxx is not assigned to sold-to-party" if I_PARTNERS-PARTN_ROLE = 'WE' and when is 'SH' I get 'please ente

  • Content Server on Oracle

    Dear collegues, do you know anybody if will be SAP Content server on Oracle? Best regards, Wladimir Sorokin, Moscow.

  • How to double-click on ipad

    hello, does someone know how to make double-click with ipad? thanks