Where is the best place to put the cfqueries?

What is the best place to get cfqueries, inside the mind of <>< / head > or before the html tag? Thank you

So before the tag doctype? Thank you

I just doesn't really matter.  the doctype, body, head, etc., of importance in the browser; the importance of the CF CF tags.  The browser does not see the CFML, and CF cares about the supplement a bit: he knows nothing.

The best place - as I said - is not in the same file at all.  But if you insist on slapping your logic with your display logic, then the only consideration is that you must set your variables before you use them.  Other than: it does not matter.

Is a review, you could do - even if she threw everything into the same file - at least separate the file itself into sections: have all your CFML code that gets your data above and try to limit the CFML you have mixed with the supplement, for example: limited to things like loops and conditions.

But, seriously, to separate your concerns.  Dan pretty much just wrong when he says that it is too technical. It's just sloppy to do not to write a code clean, well-maintained and organized.

--

Adam

Tags: ColdFusion

Similar Questions

  • Where is the best place to put custom functions?

    Hello

    I have a composition that has a number of symbols. I have to call some methods customized to the outside and I was wondering what is the best place to put custom methods?

    I saw the messages I should put the code in the event CompositionReady of the scene, but I'd like a little closer to the coast.

    Is - this best place?

    Sham.

    Here's a case:

    It is a good idea if you understand global and local variables.

    You're right about the whole event.

  • Where is the best place to put the code pl/sql only for after the events of the insert?

    Hi, I can not use database triggers, but I need to run pl/sql code only after an insertion.

    I think I need to create a process in the page that inserts into my table, but how do I know if the page is inserting or editing?

    Now I have 3 process: (the tablename parameter is in_incidencias)

    After the execution of

    10 get PK blocked anonymous PL/SQL
    30 process row IN_INCIDENCIAS
    page 40 of reset

    What kind of process that I need to create, and how can I know if there is a new record to insert?

    Thanks in advance

    Do not be sorry, that this forum is for all kinds of developers :) I am fairly new to APEX.

    When you create a process on your page, you choose ' PL/SQL', click 'Next', and then give you it a name, a sequence number and a point of execution (after Submit, generally). You click 'Next' again and then you can code your process. Encode you, click again on "next". Now you have success and failure messages, you can put whatever you want in here. Click 'Next' again, and you finally processing Conditions. Select the button in the field when you press button and're you good to go. If you never want your process to shoot several buttons, and they all have a request, you can also choose the "Request is contained in the Expression 1" Type of Condition and type a comma list of applications in the field of the Expression 1 (something like "CREATE, SAVE", but without the quotation mark).

    With respect to the code of the process itself, I still have to code an email sending process myself, but this thread contains the basics that you need, with useful links to the official documentation.

    Hope this helps,
    Matt

  • Mavericks where is the best place for sites folder?

    Hi there... Thanks for reading

    I need to put in place of the Mavericks and dreamweaver sites

    where is the best place to have the sites folder?

    Thank you very much.

    warmly,.

    Hope

    Hope,

    This is a discussion on the establishment of a local web (Apache) on your Mac server.  Given that you do not use one, it is not applicable to your situation.

    Nancy O.

  • where is the best place to store my information

    I migrated to the new version of the macbook, I am very happy, but the new macbook can not read the external hard drive I used to back up. It could be the fact that I need to use an adapter for USB, I'm looking for suggestions on where would be the best place for me save my information.

    What your old drive to backup link use: Firewire, perhaps? There is no adapter for FW on USB, so you can get a new enclosure that supports USB 3 then move the backup disk in the new case assuming that the disk is a SATA drive. Otherwise, buy something new to use for your backup.

  • Where is the best place and the best prices to buy LCD 15 "display

    I want to buy a 15 "TFT laptop awkward girls...
    any suggestions about where is the best place and the best price?

    Post edited by: peterrothwell

    Hi Peter

    As you probably know the laptop LCD display is one of laptop parts expensive (apart from the motherboard).
    I found a few new LCD for around $ 300

    CA? s your choice. Either you will be by a new one for $ 300 with warranty or you will try to buy a second hand one.
    I recommend to check big famous auction site for some deals! ;)

    Good luck

  • Where is the best place to find Widgets?

    Of course, there are many, many different widgets out there, some free, no more. Where is the best place to find a bunch of them that didn't cost me an arm and a leg?

    Unfortunately, they are not very easy to do. I'm working on a widget to do at the moment, but it's a larger project and I'm not sure when it will be ready for release. When using Muse, the other way to do this is through sites Business Catalyst. You can set up secure areas and manage it this way. But unfortunately I have no experience with that side of him, that I'm not much help here :/

  • Where is the best place to implement the business logic in application of the ADF?

    I use jdeveloper 11g R2, JSF, Facelet

    Where is the best place to implement the business logic in application of the ADF?
    I mean something like the service layer in the spring

    Appreciate your comments

    Concerning
    Mohsen

    your application module...

  • Best place to initialize the View object query where clause or params

    Where is the best place to initialize the View object 'where' clause before the page is initially rendered? Or how should it be done?
    Specifically, I can't set these values in the entity or view objects because I need information from the user or information Session
    the user has entered before you navigate to the page. I want to prepare the View object so that the results of the query appears something reasonable
    the first time before using chooses search.

    Note: The view object must exist and I need to access managed beans to define the query.

    Is there an event hook (java code) that can be called before the page is rendered?
    Also, there are hooks that can be called when the user navigates to another tab or page?

    Published by: Greateful Sep 6, 2012 19:48

    Hello

    Check out this blog: https://blogs.oracle.com/aramamoo/entry/an_epic_question_how_to

    Arun-

  • I have an iPad without any place to put a Sim Card.But I just updated my iPhone IOS 9.3 5 and before the full update there don't say "SIM necessary." Like I said my iPad has no where to put a SIM card on it what should I do?

    I have an iPad that has no place to put a SIM card on it.but I just updated my iPhone 5 in IOS 9.3, but before the end of the update there is a stage says "SIM card required" so I put a SIM card to this topic, but how do I update my iPad to IOS 9.3? Please help I'm really scared of what will happen!

    Only your iPhone needs a SIM card to do the upgrade, you will not be asked this question when you update your iPad unless it's an iPad GSM. I wouldn't do the update again as IOS 9.3 has serious bug (s) to fix first.

  • Where is the best place to trap the keys?

    I want to intercept keyboard events to flip between screens (equivalents of menu) and also invoke actions in each screen.

    For example, if you press a letter on the keyboard to switch between screens and send/end keys to start and stop things.

    I'm currently adding the keypadlistener to each screen and definitions by editing screen. However, when the focus moves to my listfield, I lose the keyboard while this area focuses...

    East - the best place to listen to events for the entire screen? I couldn't find out how to add a keypadlistener to the listfield.

    I could not find a good description of the way in which this should be done. How "correct" and "more effective" to do?

    Thank you

    Ah. The simple answer is to replace KeyChar in the ListField and simply return false. Processing then returns to the screen. Makes perfect sense...

    logList = new ListField(){
        public void onFocus(int direction) {
            setSelectedIndex(this.getSize());
        }
        public boolean keyChar( char key, int status, int time ) {
            return false;
        }
    };
    
  • Where is the best place to go to install the driver for printer hp 1320?

    Where is the best site to get the printer drivers? I have a hp 1320 printer and cannot get it installed correctly.

    HP

    http://h20000.www2.HP.com/bizsupport/TechSupport/DriverDownload.jsp?lang=en&cc=us&prodNameId=410624&TaskID=135&prodTypeId=18972&prodSeriesId=410622&lang=en&cc=us

  • What is the best place to call the HomeScreen.setNewState method?

    Hello

    I have a requirement where I need to remove the 'Asterix' around my candidacy. So what is the best place to keep the code in HomeScreen.setNewState (false) which has been determined by an electronic mail message?

    THX

    Srinivas

    You want to delete when you know that your applicaitn has been invoked, so I consider this "reset" in the activate method (() of UiAppplication)

  • Where are the best sites for high-level and how information to do different things in Oracle?


    Hello

    Where are the best sites for high-level and how information about various things in Oracle?

    Some examples of things:

    * spa

    * spm

    * db replay

    * Resource Manager

    I need a place high-level

    and also a place of step by step.

    For example, I look at these sites:

    www.Oracle-base.com

    www.psoug.org

    Thank you Roger

    Part of the problem is not so much finding sites that have articles on Oracle, that is to find reliable websites with this information.  When I search my site of certification for resources, I find a significant number of people who have 'technical' Articles on Oracle. However, many of these blog posts have simply no useful information.  It is not even that they are wrong so far as article does not include anything that is not declared more clearly and in detail in the documentation.

    That said, a site you have not mentioned above is the Oracle Learning Library.  There very often an excellent material that is very closely linked to the themes of the certification:

    https://apexapps.Oracle.com/pls/Apex/f?p=44785:1:0

  • Can I still buy photoshop cs6 on the adobe site, or what I need to find somewhere else, and what would be the best place to do it?

    I trying to get adobe Photoshop cs6, but with Adobe pushing the creative cloud, can I still get the program from the Web site? If not, where would be the best place to buy it?

    Adobe still sells CS6 via their website, but they made the page very, very hard to find for non insiders:

    See Creative Suite 6

Maybe you are looking for

  • How can I get aniweather back on the bottom of my screen?

    After downloading Firefox 4 my Aniweather extension/add-on (?) appears at the top of my browser and I want to bring him down. I tried to use the suggestions I found on the help page, but that did not help. AniWeather was not on the list of the possib

  • App Store: Your device or computer cannot be verified. Contact technical support for assistance.

    I am running the latest version of El Capitan, and I tried to restart the computer and the applications of countless times. I have nowhere to go in this situation! I tried to use different WiFi. I tried to delete the plist of network document and I f

  • Lenovo Z580 does not start after the BIOS update

    I tried to update the BIOS of my lenovo Z580 but when it restarted it says "boot PXE on IPv4/IPv6. When I booted without internet LAN cable there was a window with this: Start menuHARD DRIVECDIPv4IPv6 Ah yes before you say it on the hard drive of the

  • Bugs update Cumulative SharePoint 2013 November 2015

    Recently, we updated our Sharepoint for last CU environment.  We know the following problems. 1. user profileAdministrator downloads user profile photos.  The image is saved with the administrator account on the connection.  Post of the administrator

  • Detection of MDS via WiFi access

    Hello My application uses the BES/MDS connection to join a server within the company. The server is not routable on the internet, so I have to use BES/MDS connection. I have a method "is data routable ' which checks the status of 'data by radio', how