Sever vs. Database Code, Server Options

I'm looking for some introductory as well advanced
Oracle or non-Oracle texts/tutorials on
1. Deciding how to split code to
- database strored code
- and application (Apex) code.
Advantages, disadvantages etc.
Especially, some description of database stored code execution.
2. methods of Apex installation.
What are the options for the servers
and what are the choice criteria.
Thank you very much,
Marios

Marcos,
Hmmm... You are asking interesting questions.
How many tiers can an APEX application have?
Well, this all depends on how you define tiers and whether or not you are talking physically or logically.
Physically APEX has three basic tiers; Browser, Application Server and Database, where 'Application Server' can be a number of solutions (Apache/Oracle HTTP Server and mod_plsql or the embeded PL/SQL gateway in Oracle 11g or Oracle XE). The reality of our physical Application Server tier is that it really just forwards requests from a browser into the APEX engine. So as Application Servers go, it's really, really light.
Logically things are a bit different.
Logically it might make sense to say that the APEX engine is the 'Application Server', even though it lives inside the database since its really the engine that runs our application logic.
Let's say that the browser is one tier (client/view) and the database is another tier (data/model). Those tiers are pretty straight forward.
Next comes the 'application logic' or controller tier. If we logically separate the storage of our data in the database (and it's a pretty good idea to do this physically too with different schemas and/or packages) from the application logic we can easily achieve a good model/view/controller architecture even if the controller and model tiers are both physically in the database.
So if the rendering of a data entry form is handled by the browser and the database holds the table that stores the data that form accepts, where should we put the business rules that will manipulate the data?
As Tyler suggested it's almost always a good idea to put the business rules inside the database. Let's say that some of the fields on our form are required. APEX allows you to make data entry fields required pretty easily, but if this wasn't enforced inside the database (with a NOT NULL column for instance) then another application (or even SQL/Plus for instance) might be able to put rows into the table with NULLs and break our business rule. There are many applications out there today that everybody was totally positive that no other application would ever be built against that are totally broken and/or have bad data because someone got around the application logic by building a bad application.
But also remember that as a development environment there's no reason why you couldn't call out to and/or consume web services, XML feeds, etc. from APEX. How you do this is up to you, but really, the sky is the limit.
Is there some sort of clearly separated 'application level'?
There can be if you want there to be. Certainly you can use an APEX workspace to hold your 'application level' information. Again as Tyler mentioned it's not a bad idea to put as much of this application level logic into reusable code libraries using potentially PL/SQL packages.
Is database stored PL/SQL code part of this 'application level'?
It certainly can be. Sometimes this can be a bit confusing, but there is really two 'sections' of PL/SQL code with APEX. The first is the actual APEX engine itself. The second is any PL/SQL code that results from using the wizards and/or PL/SQL code that you write directly. You should really keep the two separate. By default this is what APEX does with workspaces.
Hopefully that helps. If not, ask away...
Rich

Similar Messages

  • Web Server Options for APEX Installation on Oracle Database 10g

    Hi. We are installation a APEX on a test server that is running Oracle Database 10g 10.2.0.4.0. As I understand it there are two Web Server Options:
    1) Oracle HTTP Server (Apache)
    2) Oracle Application Express Listener
    Do both of these work for Oracle Database 10g 10.2.0.4.0? I thought I remember reading somewhere that only the Oracle Application Express Listener would only work with database version 11 or higher.

    Do both of these work for Oracle Database 10g 10.2.0.4.0?Yes.
    I thought I remember reading somewhere that only the Oracle Application Express Listener would only work with database version 11 or higher. No, that restriction (with the exception of 10g XE) applies to the third web server option which you haven't mentioned: Embedded PL/SQL Gateway (EPG), as discussed in your previous thread: +{thread:id=2201975}+
    System requirements for APEX Listener
    {forum:id=858} forum

  • How to code browse option in jsp

    hi
    i m making a website in jsp
    i have a option for uploading a picture in my website.i want to code browse option in website.how can i do that in jsp.
    i mean that how can a user select a picture for uploading by clicking on browse button
    and save it to a database and again see it on some another page.
    plz help me

    <input type="file">is all what you need at the client side to get a browse dialog.
    At the server side you can fetch the file in several ways. Most commonly used is the Apache Commons FileUpload API [1].
    [1] http://commons.apache.org/fileupload

  • How to replace ENTERPRISE Server Option by BB Internet Service Option?

    On my 8700 there is the ENTERPRISE Server option installed.
    As I want to vsend and receive emails from different email account without making use of the BB Enterprise geature I would like to get rid of the Enterprise-program installed and replace it by the Internet Service option.
    I wonder whether this would be possible.
    Can I replace Enterprice feature by the normal Internet Service?? and how?
    Thank you for any information
    Solved!
    Go to Solution.

    Hi there!
    The options you are presented with when you start the email configuration wizard are controlled by virtue of the account type you have with your carrier. Given what you describe, it sounds as if you have perhaps on a generic data plan (or perhaps no data plan at all) -- that is normally not sufficient to grant you access to the Blackberry Internet Service that is hosted at your carrier. To enable Personal Email configuration, you must contact your carrier and request what is often (thought not universally) called The Blackberry Data Plan. Whatever it is called, you need a plan from your carrier that grants you access to the enhanced Blackberry services that they host - and you must pay them to access those enhanced services. Once you have that proper account, you will have Personal email as a configuration option (note, though, that Enterprise will not be "replaced"...rather, Personal will be added to the screen).
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Moving the log file of a publisher database SQL Server 2008

    There are many threads on this here. Most of them not at all helpful and some of them wrong. Thus a fresh post.
    This post regards SQL Server 2008 (10.0.5841)
    The PUBLISHER database primary log file which is currently of 3 blocks and not extendable,
    must be moved as the LUN is going away.
    The database has several TB of data and a large number of push transactional replications as well as a couple of bi-directional replications.
    While the primary log file is active, it is almost never (if ever) used due to its small fixed size.
    We are in the 20,000 TPS range at peak (according to perfmon). This is a non-trivial installation.
    This means that
    backup/restore is not even a remotely viable option (it never is in the real world)
    downtime minimization is critical - measured in minutes or less.
    dismantling and recreating the replications is doable, but I have to say, I have zero trust in the script writer to generate accurate scripts. Many of these replications were originally set up in older versions of SQL Server and have come along for the
    ride as upgrades have occurred. I consider scripting everything and dismantling the whole lot pretty high risk. In any case, I do not want to have to reinitialize any replications as this takes, effectively, an eternity.
    Possible solution:
    The only option I can think of is to wind down everything, such that there are zero outstanding uncommitted transactions and detach the database, delete the offending log file and reattach using the CREATE DATABASE xyz ATTACH_REBUILD_LOG option.
    This should, if I have understood things correctly, cause SQL Server to recreate the default log file in the same directory as the .mdf file. I am not sure what will happen to the secondary log file which is not moving anywhere at this point.
    The hard bit is insuring that every transaction in the active log files have been replicated before shutdown. This is probably doable. I do not know how to manually flush any left over transactions to replication. I expect if I shut down all "real"
    activity and wait for a certain amount of time, eventually all the replications will show "No replicated transactions are available" and then I would be good to go.
    Hillary, if you happen to be there, comments appreciated.

    Hi Philip
    you should try this long back suggested way of stopping replication and restore db and rename or detach attach
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6731803b-3efa-4820-a303-4ffb7edf154a/detaching-a-replicated-database?forum=sqlreplication
    Thanks
    Saurabh Sinha
    http://saurabhsinhainblogs.blogspot.in/
    Please click the Mark as answer button and vote as helpful
    if this reply solves your problem
    I do not wish to be rude, but which part of the OP didn't you understand?
    Specifically the bit about 20,000 transactions a second and database size of several TB. Do you have any concept whatsoever of what this means? I will answer for you, "no, you are clueless" as your answer clearly shows.
    Stop wasting bandwidth by proposing pointless and wrong solutions which indicate that you did not read the OP, or do you just do this to generate points?
    Also, you clearly failed to notice that I was on the thread to which you referred, and I had some pointed comments to make. This thread was an attempt to garner some input for an alternative proposal.

  • Oracle Database Mobile Server 11 sync

    Hi,
    I have two simple tables in the back-end oracle database in order to create a meeting-room android application with and embebbed SQLite database on the client devices. I have written all the functionality to register, authenticate, create a new appointent, show it, and delete it and it works fine on my smartphone, but I did all these steps against the local sqlite db.
    Now I would like to share the reserves info with all the clients by synchronization using Oracle Database Mobile Server 11.
    Tables:
    Employees(ID, username, password, firstname, lastname, phone, email)
    Reserves(ID, subject, firstname, lastname, start_date, end_date, meeting_room, alarm)
    I have configured all the publications required (app , item, users, grants...) with the Workbench tool, like i have read from the official documentation and i added the lines to invoke the sync functionality. My problem is that when i launch the first sync the sqlite database in created on the device but the few records on the back-end are not replicated in the sqlite db. ¿is this process automatic or have I to write some code to catch this info?
    Another problem is that the records of the sqlite database is neither replicated to the back-end database. I have to say that th sync process ends succesfully but I can see nothing on the in-queue and out-queue queues in the mobile manager console. So, what´s about this incomind and outcoming data? Th only thing i can see is a set of dirty records, these records are records on the back-end db, but I dont know what means...
    Could you help me please?
    Thank you very much.

    Hi
    Data Subsetting is to restrict the data each Client sees based on values you specify i.e.
    If you only wanted a Client to see data for a specific Dept you could specify the following in the Publication Item
    Select * from emp where DEPTNO = :DEPTNO
    You can define what DEPTNO should be for each Client in the Mobile Server
    So in your case if you want ALL Client to see ALL records for a Publication Item then you should not specify any Data Subsetting i.e.
    Select * from emp - This would retrieve all rows
    There is no specific need to use Sequences in your Application unless you want to. Obviously you must make sure that any new records created on the Client will not conflict with a record created on a different Client otherwise conflicts will occur after the data is synchronized with the server
    With regards to you actual issue can you confirm the following ( NO NOT CHANGE ANY VALUES )
    1. Check the table mobileadmin.applications in the Repository DB and confirm there is a row there for your Application and that the 'Publication' column contains the correct Publication you created in MDW.
    2. Check the Table C$ALL_CLIENT_ITEMS, this should contain one row for each Publication Item you created in MDW i.e.
    Select PUBLICATION_ITEM, DIRTY, CRR From C$ALL_CLIENT_ITEMS Where CLIENTID = '<Your Client Name>';
    regards
    Richard

  • Bug when using Edit in Server Option while editting HiQ node.

    I have recently started using HiQ nodes in my applications, but am running into problems. If I enter the "Edit in Server Option" and then change applications or click on another window without closing the HiQ server window I run into problems. I can no longer enter the "Edit in Server Option" and the HiQ program will not run. I can not seem to find the HiQ server window. The only way I have found around this problem is to close the current document, reopen it, delete the HiQ node and rewrite the entire code, and be very careful to always close the HiQ server window before doing anything else. Of course this is not a suitable solution. Has anyone else run into this problem? Have you figured out a fix?
    Thanks,

    Hi,
    Base on my experience, it seems one of your node have not synced
     the resource configuration, please run the cluster validation report test then post the error or warning part.
    Thanks.
    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.

  • Hinding code with Optional Regions

    I am getting an error:
    HERE
    I know why, it is because I have to use: <body
    onload="load()" onunload="GUnload()"> in the line:
    <body class="thrColFixHdr"
    onload="P7_TMclass();P7_TMopen();load()"
    onunload="GUnload()","P7_TMclass();P7_TMopen();MM_preloadImages('images/layout-images/clo se-tabs-over.gif')">
    This is used to display a google map in my 'Location' page
    but this is the only place I need that code and where the map does
    not exist (all other pages) I get the error.
    Is there any way of hiding part of that code in my template?
    I have tried to have two versions of the line with and
    without the map code in 'Optional Regions' but no luck.
    Some expert advice greatly appreciated.
    Cheers,
    Richard

    > 1. If I add: <!-- TemplateParam name="MapScript"
    type="boolean"
    > value="false"
    > --> to my template and make it true on the page with
    the google map I get
    > the
    > Load() error on all other pages.
    Yes - well, this is a problem with a template controlled
    page. The body tag
    is NOT editable. You *can* use an editable attribute on the
    body tag for
    the onload attribute, which would allow you to access the
    values associated
    with that attribute on each child page, but it's all-or-none
    in the sense
    that you would have to add the full text of that attribute on
    each child
    page (adding or subtracting the 'load()' call).
    Are you using server scripting on these pages?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "RICH POW" <[email protected]> wrote in
    message
    news:ful2gl$lqf$[email protected]..
    > Thanks for the reply...
    >
    > I'm in a bit of a vicious circle here.
    >
    > 1. If I add: <!-- TemplateParam name="MapScript"
    type="boolean"
    > value="false"
    > --> to my template and make it true on the page with
    the google map I get
    > the
    > Load() error on all other pages.
    >
    > 2. If I leave the script in I get a Null Value error on
    all pages except
    > the
    > google map page.
    >
    > Do you know a way I can include that map just on that
    page?
    > Do you know how I can add the whole page with SSI or add
    the <body
    > onload="load()" onunload="GUnload()"> to the body tag
    with an option
    > region?
    >
    > Here is the map in it's simplest form:
    >
    http://adelantedesign.co.uk/websites/adelante/googlemap.html
    >
    > Thanks again for your time.
    >
    > Richard
    >

  • If DW 2014.1 cc does not support database, binding, server behavior, and PHP/MySQL require it, but using Adobe Extensions Mngr IS NOT recommended, then WHAT TOOLS do we use to develop a database with DW?

    I'm using windows DW 2014.1 cc. I'm following lynda.com tutorials to build a website database with PHP and MySQL. I learned I have to download Adobe Extension Mngr to active DATABASE, BINDING, SERVER BEHAVIOR panels, which I've done. BUT NOW I'VE BEEN ADVISED NOT TO USE THESE TOOLS for new development. If this is the truly the case, then WHAT TOOLS DO I USE to develop a website that has a database?

    then WHAT TOOLS DO I USE to develop a website that has a database?
    Besides the tools you would already need for a system using server behaviors (web server, PHP, MySQL, phpMyAdmin) the only extra tool you need is your own brain.
    A lot of people are disappointed by the lack of database tools in DW now, but really it's much better this way. You can never achieve better than a rinky-dink dynamic website using server behaviors. The code Dreamweaver dynamic behaviors create is really terrible. (I'm not insulting the fine folks who wrote the feature. It's just a consequence of automated code.) You can write better, simpler, more maintainable code yourself, and over time you will improve. With server behaviors you cannot improve. you get stuck in database kindergarten.

  • Log the local variables (string type) to the database (SQL Server)

    i have a customized PreUUT callback so that my own VI gets the information from barcode. it contains serial number as well as other information. i am collecting the information into local variables of the PreUUT callback.
    Now i want to log the local variables (string type) to the database (SQL Server).
    i have a successful connection to the database and i am using a generic recordset schema.
    can anyone help me how to do it?
    also shall i have to create the corrosponding fields (columns) in the database? or is there any option in TestStand4.0 to do it?

    Hello i like original,
    After re-reading your original message, I think I might have a better understanding of what you would like to do.  I have included a few links to Knowledge Base and Developer Zone articles that should be very useful for you.  I have included these links below:
    Logging a New UUT Property to a Database in TestStand
    Logging a New Step Property to a Database in TestStand
    Creating a TestStand Database Schema from Scratch
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • Why not always use -server option?

    Hello!
    I've tried running some my applications with -server option - and discovered that for non-GUI apps -server renders drastic increase in execution speed.
    For example code below takes only 2 seconds to execute with java -server while it takes more then 120 seconds with java -client option.
    Now I'm considering writing all apps with
    Runtime.exec("java -server MyApplication");Can someone tell me in what cases -server is a bad choice, and when it's OK?
    And, in my code - does java runtime really create 1000 threads - or is there some optimization?
            public void run()
                    int q=0;
                    for (int i=0; i<10000000; i++)
                            q++;
            public static void main (String args[])
                long l_start = System.currentTimeMillis();
                    for (int h=0; h<1000; h++)
                            new Hell().start();
                    System.out.println("Operation took "+(System.currentTimeMillis()- l_start)/1000+" seconds");

    JVM tutorial states that there are the cases when server performs slower. If you going to execute a small utility (<20 sec), use client.

  • Code format options ---Version 1.5.1.

    Hi all,
    I am new to SQL Developer tool.
    Want to know where I can find settings for code formating options, like PL/SQL developer-Beautifier.
    Also, can we generate E-R diagram like in Toad.
    Tool Version 1.5.1.
    Thanks in advance.

    Better get version 2.1.1 or the latest 3.0 EA for more formatter options (inside the Preferences - Database - SQL Formatter).
    The EA's also have the Data Modeler incorporated, but you can get the last production version in stand-alone too.
    Read the online help inside sqldev for more info.
    Have fun,
    K.

  • Migrating database from server (OS: IBM AIX 5.1 Oracle: 9.2.0.4) to server

    Dear All,
    In order to migrate one database from server (OS: IBM AIX 5.1 Oracle: 9.2.0.4) to another server (OS: IBM AIX 5.3 Oracle: 9.2.0.6)
    I am performing the cold backup and taking the below files backup.
    Datafiles
    Redologfiles
    Archive log file
    Backup of control file from trace
    I just wanted to know
    a) Is there any other files do I need to take backup which may be required to bring the database up on another server?
    b) Upper version of OS and oracle can create any issue or do I need to perform any extra activities?
    I know after restoration the above files to the destination server, what procedure I would require to follow.
    I have doubt with version of OS and oracle.
    Request your advice on this.
    Regards,

    I dont think higher version especially 5.1-5.3 will make any difference but oracle 9.2.0.4 will definitely will have an issue. If i am not wrong you need to startup the database with startup MIGRATE option after moving all the files to the new server
    May be password file (missed out, but you can always create one)
    Init.ora file
    make note on Entries in ORATAB

  • Are Adobe promoting the alternatives to Database and Server Behaviours

    The apparently disastrous depreciation of Database and Server Behaviours in Dreaweaver CC seem to have left a nasty taste in the mouth for many users. I am not a very experienced web developer, to the point where I cringe when describing myself as such, and I assume, possibly naively, that if Adobe have made them optional now, that there is an alternative; if not, the decision seems dimwitted in the extreme, and I did not expect that to be the case with a company who's software I have admired and found useful for so long.
    So, assuming there is an alternative method to create dynamic data driven websites in Dreamweaver, can people please suggest what they are, and possibly point me towards the Adobe support and tutorials that encourage and explain their use. It must be in Adobe's interest to to get Dreamweaver's users to adopt the new technologies, and, at the moment, I cannot believe there is no adequate alternative.
    I have seen many complaints about the depreciation of the support, but no one seems to be saying "don't use those, this is what you need to do the job". If anyone can do that for me, it would be greatly appreciated, and I imagine others would also benefit.
    And if the alternatives are inadequate, then perhaps we could discuss how to get Adobe to repair a broken product.

    Rob Hecker2 wrote:
    As the web has evolved it makes sense that websites are no longer created by one person using one tool (DreamWeaver).
    I agree with you there, depending at what level you are. A large design company will have specialists in all areas whilst a small one man set up will not. These small one-man band businesses usually attract low paying clients who will not have a budget to employ 'specialists' which is where DW server behaviours fitted in perfectly. Although it's benefited me enormously by learning how to manually connect and query databases I still think it was and is pretty lazy on the part of Adobe NOT to update the behaviours which were an important part of the program for many.  3rd party developers have produced extensions at a considerable cost, over and above what it costs to run DW. They quickly rolled out these extensions when it became clear Adobe had decided to upset many of its customers by not including any alternative in CC/CC 2014 - so don't tell me it would have taken many hours development and financial resources which Adobe just could not afford. That's bollocks. This is purely a decision by some wanker at top level in Adobe that is probably smoking crack and don't know their *** from their elbow, or what their customers really want.
    Rob Hecker2 wrote:
    It always seemed to me that by adding support for PHP/MySQL at all, Adobe was just going to frustrate people.
    NO, the frustration is that Adobe introduce components and then doesn't develop them any further preferring to introduce a bag of dog poo into their programs like fluid grids instead of concentrating on what they do best.
    Rob Hecker2 wrote:
    PHP programmers do not use Dreamweaver for PHP Development. I recall a questionnaire on a website where the question was "What tools do you use for PHP development?" Dreamweaver was not even on the list of choices.
    Serious php developers don't  - you're right - but for those who don't program php/mysql on a daily or even weekly basis, but occasionally have the need for it, they do. Most websites can benefit from having a backend database these days and at a time when databases are main stream Adobe decide to ditch what was a premium attraction of the software, completely senseless decision. A few years ago when static sites were main stream Macromedia were ahead of the game an introduced the Server Behaviours. I guess the top brass in charge at the time (Macromedia) weren't smoking crack all day and instead listening to what their customers wanted.

  • To avoid writing database code in the front end

    Hello,
    I am working on a database application using 10g database as backend and dotnet as front end. I wish to execute only oracle stored procedure for all the select (to avoid hard parse and use of bind variable), DDL and DML operations; just to avoid writing database code in the front end. Can anyone please give me a little examples of :
    1.Select query's output to be return as resultset by stored procedure.
    2.DML example by stored procedure.
    3.Any DDL example by stored procedure.
    using scott.emp, so that i would just call the stored procedure, rather than giving select,DML and/or DDL commands in the front end. Even though i have read in the documentation, but a clear cut examples will help me to get into clear concept as well.
    Thanks & Regards
    Girish Sharma

    Hi...
    -->Select example
    create or replace procedure get_emp(rc out sys_refcursor)
    is
    begin
    open rc for select * from emp;
    end;
    -->DML example
    create or replace procedure do_dml_emp(pempid in number,
    pempname varchar2,
    result out number)
    is
    begin
    insert into emp(empid,empname) values(pempid,pempname) returning empid into result;
    exception
    when others then
    result:=-1;
    end;
    -->DDL example
    create or replace procedure ddl_emp(colname varchar2,
    coltype varchar2,
    result out number)
    is
    begin
    result:=-1;
    execute immediate 'alter table emp add column ' || colname || ' ' || coltype ;
    result:=1;
    end;

Maybe you are looking for

  • Rationalization of Cross Reference or XRef

    Hi Friends,                   I would like to know what does rationalization of cross references mean and how to do the rationalization of Cross Refeence? Please be very detail. I will assign highest points for the person who can provide me a detaile

  • How can I detect if the  IMAP service is down ?

    I'm trying to figure out how to monitor when IMAP service down ? $ORACLE_HOME/bin/oesctl show status ${host_name}:um_system:imap However, this always shows that everythings fine. Is there a way of telling if it is not fine ?

  • When I call out which number do they see?

    I have an online number for my german friends w/o skype to call me. If I call them from my online number on skype, will they see my german Online Number in their caller ID when I call them?

  • Oracle EBS R12 installation by newbie...please help.

    Dear Experts, I wanted to learn E-Biz suite R12. So thought of installing R12 on external hard disk and use it with laptop. I googled and in our otn forums also, but i am confused about the steps which i need to do for successful installation. My cur

  • Running Time and Connected Noises

    I am wondering if there is a maximum time limit I should run my laptop, because it gets really hot on the bottom and today it is making funny humming noises like something behind the speakers is vibrating. I think that it's because I used it to aggre