Requiring several database queries for my GUI - where to put the reads?

Requiring several database queries for my GUI
Hi all,
I am to create a GUI with a couple of drop downs
These are populated from database queries, as well as the main program reading from the database based on all inputs in the GUI.
Should I put all database reads into a class as seperate methods.
e.g,
one method for the database read to populate the first combo box.
a second method to take the choice from combobox 1 and read from the database to populate combobox 2
a third method to then perform the main database read based on GUI selections from the above two methods..
is this the 'right' way to do it.
my GUI would then be in a sperate class.
or should I sperate the 3 database reads into 3 different classes?
thanks in advance,
Matt

BigDaddyLoveHandles wrote:
walker8 wrote:
You might also read some info on three tier design using MVC (Model, View, Control) if i recall correctly.
Here's an article by Martin Fowler on GUI architecture: [http://martinfowler.com/eaaDev/uiArchs.html]
awesome! that's just what i needed. i haven't read all of it yet but it gives me ideas about the classes i need.
regards
walker8

Similar Messages

  • Hi basically when i try download a app its saying sign in required ask for sercurity code for bank card and i put the correct details in and still saying its invalid? Can anyone help

    Hi basically when i try download a app its saying sign in required ask for sercurity code for bank card and i put the correct details in and still saying its invalid? Can anyone help

    Refusal of a card is based on information provided matching what is on file from your credit card provider. If it is refused, it generally means something is not matching. That can inclue the name, the address or other information. It has to be exact to match. If you check your credit card bill to make sure you are spelling the name correctly, the address is listed correctly, and yes, ST is different than Street, and it still does not work, contact iTunes support. http://www.apple.com/emea/support/itunes/contact.html

  • Where to put the commit in the FORALL BULK COLLECT LOOP

    Hi,
    Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
    'commit' :
    open f_viewed;
    LOOP
    fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
    forall i in 1..f_viewed_rec.count
    insert into jwoodman.jw_job_history_112300
    values f_viewed_rec(i);
    --commit; [Can I put this 'commit' here? - Jenny]
    EXIT when f_viewed%NOTFOUND;
    END LOOP;
    commit;
    Thanks,
    - Jenny

    mc**** wrote:
    Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
    When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
    That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
    If you use commit outside the loop,
    Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
    Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
    I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
    When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
    What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
    Why is frequent committing undesirable I hear you ask?
    First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
    Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
    This then brings us two rules of thumb that will always lead a developer in the right direction.
    1. Commit as infrequently as possible, usually at the logical unit of a transaction
    2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
    Regards
    Andre

  • I changed my iPhone lately but i can't restore my last backup since it keeps saying "itunes could not restore backup because the password was incorrect" but I don't know where to put the password to make it happen... Any suggestions?

    Hey guys,
    I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?

    Select your iDevice in the iTunes.
    Choose the Summary screen (tab) and scroll to the bottom of the screen.
    Then un-select Encrypt iPhone backup.
    iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally.

  • Hello I just bought the usb super drive and for some reason when I put the disc in and download the application it won't show.Just a bunch of words will show up.

    Hello I just bought the USB super drive for the mac book pro and for some reason when I put the disc in and I download the content and for some reason when I put the aplication just a bunch of random words come out,not the content the disc brings.

    Ok, I hope I'm not steering you in the wrong direction, but I've just found this on the support site for the software.
    Interchange Interactive Whiteboard Software System Requirements
    Please note: These discs work on Windows PCs only.
    Minimum System Requirements
    Pentium II 300 MHz processor
    Windows 98 / ME / 2000 / XP / Vista
    64 MB RAM
    50 MB free disk space if not installing onto hard disk
    1.44 GB free disk space if installing (recommended)
    4x CD-ROM drive
    800 x 600 screen resolution displaying 16-bit color
    Sound Blaster compatible sound card
    Mouse or other pointing device
    Headphones or speakers

  • Architecture question...where to put the code

    Newbie here, so please be gentle and explicit (no detail is
    too much to give or insulting to me).
    I'm hoping one of you architecture/design gurus can help me
    with this. I am trying to use good principals of design and not
    have code scattered all over the place and also use OO as much as
    possible. Therefore I would appreciate very much some advice on
    best practices/good design for the following situation.
    On my main timeline I have a frame where I instantiate all my
    objects. These objects refer to movieClips and textFields etc. that
    are on a content frame on that timeline. I have all the
    instantiation code in a function called initialize() which I call
    from the content frame. All this works just fine. One of the
    objects on the content frame is a movieClip which I allow the user
    to go forward and backward in using some navigation controls.
    Again, the object that manages all that is instantiated on the main
    timeline in the initialize() function and works fine too. So here's
    my question. I would like to add some interactive objects on some
    of the frames of the movieClip I allow the user to navigate forward
    and backward in (lets call it NavClip) . For example on frame 1 I
    might have a button, on frame 2 and 3 nothing, on frame 4 maybe a
    clip I allow the user to drag around etc. So I thought I would add
    a layer to NavClip where I will have key frames and put the various
    interactive assets on the appropriate key frames. So now I don't
    know where to put the code that instantiates these objects (i.e.
    the objects that know how to deal with the events and such for each
    of these interactive assets). I tried putting the code on my main
    timeline, but realized that I can't address the interactive assets
    until the NavClip is on the frame that holds the particular asset.
    I'm trying not to sprinkle code all over the place, so what do I
    do? I thought I might be able to address the assets by just
    providing a name for the asset and not a reference to the asset
    itself, and then address the asset that way (i.e.
    NavClip["interactive_mc"] instead of NavClip.interactive_mc), but
    then I thought that's not good since I think there is no type
    checking when you use the NavClip["interactive_mc"] form.
    I hope I'm not being too dim a bulb on this and have missed
    something really obvious. Thanks in advance to anyone who can help
    me use a best practice.

    1. First of all, the code should be:
    var myDraggable:Draggable=new Draggable(myClip_mc);
    myDraggable.initDrag();
    Where initDrag() is defined in the Draggable class. When you
    start coding functions on the timeline... that's asking for
    problems.
    >>Do I wind up with another object each time this
    function is called
    Well, no, but. That would totally depend on the code in the
    (Draggable) class. Let's say you would have a private static var
    counter (private static, so a class property instead of an instance
    property) and you would increment that counter using a
    setInterval(). The second time you enter the frame and create a new
    Draggable object... the counter starts at the last value of the
    'old' object. So, you don't get another object with your function
    literal but you still end up with a faulty program. And the same
    goes for listener objects that are not removed, tweens that are
    running and so on.
    The destroy() method in a custom class (=object, I can't
    stress that enough...) needs to do the cleanup, removing anything
    you don't need anymore.
    2. if myDraggable != undefined
    You shouldn't be using that, period. If you don't need the
    asset anymore, delete it using the destroy() method. Again, if you
    want to make sure only one instance of a custom object is alive,
    use the Singleton design pattern. To elaborate on inheritance:
    define the Draggable class (class Draggable extends MovieClip) and
    connect it to the myClip_mc using the linkage identifier in the
    library). In the Draggable class you can define a function unOnLoad
    (an event fired when myClip_mc is removed using
    myClip_mc.removeMovieClip()...) and do the cleanup there.
    3. A destroy() method performs a cleanup of any assets we
    don't need anymore to make sure we don't end up with all kinds of
    stuff hanging around in the memory. When you extend the MovieClip
    Class you can (additionally) use the onUnLoad event. And with the
    code you posted, no it wouldn't delete the myClip_mc unless you
    program it to do so.

  • I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of

    I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of session and I take 3 weeks or more with this problem if they can support me solve it was the number of seire wearing this being installed at a private university

    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page

  • Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk.

    Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk. I press the :c" button on startup but its not picking up the disk in the rom, i have tried to put the disk in an external rom but same answer, am starting to think that my os disk is bad. Please help me.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this exercise is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login. Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Where to put the Transform.xsl File

    Good evening!
    I am trying to execute a bpel:doXslTransform(xslURI,$a) and i dont know where to put the transform.xsl file for this operation.
    Can anybody tell me?
    Greetz,
    RaRu

    It needs to be in the same folder as the .bpel process - the bpel folder of your project.
    Hope this helps,
    Shanmuhanathan Thiagaraja

  • New patches for SAP GUI 6.40 and the Screenreader Extension

    Hi,
    patch 10 for SAP GUI 6.40 and version 8 of the screenreader extension have been published on service.sap.com and ftp.sap.com.
    Best regards,
    Christian

    Hi John,
    short update: I talked to the service market place team, and unfortunately the software corner is not a standard SMP site, so the nice features you know from other pages are not available, and won't be in the near future.
    I will post news about new patches here, but as mentioned this is not part of the official workflow and may not always happen, for example when I'm on vacation
    Best regards,
    Christian

  • Where to put the url endpoint for changing between enviroments?

    Hello,
    I have created a few jax-ws clients. I am now in development stage, but in the future I will want to put them in preproduction enviroment. where is the best place to put the service urls for calling it and changing in an easy way?
    I came from dot net world, I am used to a web.config file which I can change in hot, does java have something like that?
    Thanks in advance.

    If you are using Spring then these will be helpful to you-
    [http://blog.vinodsingh.com/2008/11/environment-specific-property-with.html|http://blog.vinodsingh.com/2008/11/environment-specific-property-with.html]
    [http://blog.vinodsingh.com/2008/05/webservice-endpoint.html|http://blog.vinodsingh.com/2008/05/webservice-endpoint.html]
    if not then you can devise some thing similar.

  • In HELLO Where doI put the email address of a contact.

    I must be very stupid (admitted) but I cannot get Hello to work for me. Where do I put the email adddress of a person I wish to contcact.

    Hi Brad,
    I really appreciate your taking the effort to help - I must be the greatest of idiots or someting is wrong with my system. I click on the Hello button at the top of my screen and this brings up a panel stating "conversation 1" and below that "Start a conversation" in a blue box. I cannot see the two tabs you refer to "one for chat and other for contacts."
    Unfortunately I am going away for a few days and will not be able to respond, but certainly will when I return.
    Thank you for your interest.

  • JNI where to put the jnilib?

    I have a smal calculating code, and need it fast done, therefore I will use the JNI.
    On MacOSX there is no problem doing this with a dylib, compile the dylib, compile the jnilib put them in the Bundle .. ready to deploy. Easyly done.
    On WIN I get a messsage of unknownsource in the ClassLoader., Runtime. and System. loadlibrary(blah)
    Where do I have to put the blah.jnilib and the dll to get the applikation used of them??
    Must the library path set to get the compiled jnilib run on WIN?? Where do i have to set the path for the jnilib and the dll? DLL in system 32 I guess but where the jnilib???
    Or should i just name the prefix of blah when compiling .dll instead of .jnilib, but then I need to manage the file using on different platforms isn�t so??
    thanks for help

    Windows will find the DLL if it is listed in the PATH environment variable. On Windows XP, I click Start / Control Panel / System / Advanced / Environment Variables. I can then edit the path string which is a semicolon-separated path list.
    If you do not want to mess around with the environment variables, you can allways do it M$-style and squeeze the DLL into c:\windows\system32 amongst the other couple hundreds of DLL's already there.

  • Where to put the patches ????

    Hi All,
    I have a question about where to keep the patches on weblogic6.1+sp2.
    what is the best practice/way to put the patches on wls6.1/wls8.1 .....iam more or less interested on putting these patches on wls6.1+sp2
    say for some reason, i need 4 patches(which are related to the same problem) ....and i downloaded it from support.bea.com site ...and then ......what is the best practice to place them....where ??
    We have been keeping the 4 patches(or all of them) at CLASSPATH level....but i don't know if it could be a issue for HOT DEPLOYMENT or not ....OR some other issues ?
    please let me know what is the BEST practice and other practices of keeping these patches ????
    thanks alot.
    -sangita

    I put patches on the knees of my denim overalls. I also like to wear a straw hat and carry around a pitchfork. It makes me look like a hick, but people better respect me or I will spear them with my pitchfork!

  • Where to put the GIF/JPG files so they show up in Forms Developer

    Hi:
    This refers to Forms 10gR2; Forms Builder running on Windows XP......
    Where do I put the GIF and JPG files referenced by the "iconic filename" property so that they show up in Forms Builder? By placing them in the jar file, I can get them to appear at runtime, but NOT in development!
    I have tried putting the files in the same directory as the FMB, as well as in C:\DevSuiteHome_10g\forms\java (where the image jar file resides).
    In each case, I have included the path in the FORMS_PATH environment variables.
    Thanks

    Hi,
    For design time, you need to use the UI_ICON and UI_ICON_EXTENSION environment variables. Set them in the registry.
    UI_ICON=location where you have the image files.
    UI_ICON_EXTENSION=Extension of your image files (ICO / GIF / JPG)
    Edit :
    Refer : http://www.oracle.com/technology/products/forms/pdf/10g/frm10gnewfeatures.pdf
    Search for UI_ICON and UI_ICON_EXTENSION
    -Arun
    Edited by: Arunkumar Ramamoorthy on Jan 26, 2010 6:26 PM

Maybe you are looking for

  • Insert direct column from database table and function value into a table

    Hi All, Please resolve this query for me.... Suppose my select query is like this Select empno from EMP; (simple select) Select fun_dept(empno) from dual;(function) i want both the output of the select query to be written into a table like this.... S

  • How to Clear page.

    Hi All, i have two pages.first page is search page,secound page is create page. in search page having one lov,go,create button. once click on the create button it ll navigate to create page. here enter some data and click on the submit button data in

  • Fatal error C1083: Cannot open type library file: '..\..\bin\TsAdpApi.tlb': No such file or directory

    Hi Folks: I am doing one Dll file for TestStand , and got an error : d:\teststand3.5\teststand 3.5\examples\modaldialogs\mfc\tsapivc.h(18) : fatal error C1083: Cannot open type library file: '..\..\bin\TsAdpApi.tlb': No such file or directory Could a

  • None of the links on my site work.....

    people cant get my site links to work unless they right click and open in new tab. www.jbrooksfilm.com

  • Mail crashes when get a S/MIME receipt

    Hi, I installed a certifiacte profile in order to test the email signing and encryption for my organization. Everything is working fine, both signing and encryption, but when outlook client is configured to "Request S/MIME receipt for all S/MIME sign