I hate to say this, because it is more work, but I think the answer is usually “Both”. In other words, I have constraints in the database to keep bad data out, no matter whether the data comes from my ADF application, or some goofball developer like me with SQL Developer. But I also have validations in the ADF application. The ADF validations are for three purposes:
1. They are closer to the user, give a better error message than the database constraint, and often provide a more immediate response with no database round trip.
2. They can be warning or informational messages – i.e. “You might want to check this entry – it doesn’t look right, but I’ll let it in anyway if you say so.” This is impossible to do in a database constraint – either it passes the constraint or it doesn’t.
3. I can validate non-permanent entries – stuff that doesn’t get stored in the database, like query parameters.
--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).
Hi all
I think this depends on the profile of your developers (java developers vs forms developers to be short)
The way we have solves this in my company is closed to typical java application
All business logic in java except for Business rules that requires to do business logic on a large set of data (>1000 rows) and returns only a limited rows of data as a result (<200). Otherwise all is done in java with sometimes complex SQL query.
Olivier
De : adf-met...@googlegroups.com [mailto:adf-met...@googlegroups.com]
De la part de John Flack
Envoyé : vendredi 18 novembre 2011 15:23
À : adf-met...@googlegroups.com
Objet : RE: [ADF EMG] Business Logic in PL/SQL or Java?
Sten Vesterli
helloI always favor PLSQL Stored procedures for three reasons1) You can use from many other different presentation layers and other applications
2) You can modify without having to open the application and then go through the deployment steps.
3) PLSQL is easier to deal with and tightly integrated with the Database.
On Tue, Nov 22, 2011 at 5:01 AM, Ammar™ <ammar...@gmail.com> <ammar...@gmail.com> wrote:
helloI always favor PLSQL Stored procedures for three reasons1) You can use from many other different presentation layers and other applications
That's really true of any place to store the business logic. If it's well designed, you can move it anywhere you want.
2) You can modify without having to open the application and then go through the deployment steps.
Going to have to say that's a terrible idea. The purpose of a deployment process is to ensure that you can replicate what is running in production. If you don't do that properly then who knows what you're running. You might fix some bugs now, but if your fixes evaporate the next time someone else does a deployment then you haven't really fixed the bug. Besides, how can you test your fixes in your development DB and make sure you've pushed out all your changes?Also, the steps to do a deployment should be "mvn deploy", which really cuts down on the excuse that doing a real deployment is too much work.
3) PLSQL is easier to deal with and tightly integrated with the Database.
PL/SQL might be easier to deal with if you're a PL/SQL guy.
Being tightly integrated with the database isn't really a good thing. It's fine to use database features but excessive coupling will only make you more sensitive to any change in the database. It's similar to the IE6 issue where it makes the cost of upgrading prohibitive because of how tightly IE6 is coupled. You never want to the be in the position of being 'That App' that is forcing everyone to stay on old versions of the software indefinitely.
Le mercredi 23 novembre 2011 05:07:30 UTC+4, Mark Robinson a écrit :On Tue, Nov 22, 2011 at 5:01 AM, Ammar™ <ammar...@gmail.com> <ammar...@gmail.com> wrote:
helloI always favor PLSQL Stored procedures for three reasons1) You can use from many other different presentation layers and other applications
That's really true of any place to store the business logic. If it's well designed, you can move it anywhere you want.
If true for any place, why not the database? It's there waiting for you to enrich its dictionary with your pl/sql code.
Of course you have to love it to enrich it :)
2) You can modify without having to open the application and then go through the deployment steps.
Going to have to say that's a terrible idea. The purpose of a deployment process is to ensure that you can replicate what is running in production. If you don't do that properly then who knows what you're running. You might fix some bugs now, but if your fixes evaporate the next time someone else does a deployment then you haven't really fixed the bug. Besides, how can you test your fixes in your development DB and make sure you've pushed out all your changes?Also, the steps to do a deployment should be "mvn deploy", which really cuts down on the excuse that doing a real deployment is too much work.I don't agree it's a terrible idea. I can't see why you can't replicate what is running in prod with pl/sql. You do it similarly to what you do for the other db objects.Same applies to a change in the DB tables for example and you have to manage db side changes anyway.Usually the pl/sql code role is to make checks, return data other than values directly in a database (format an employee name for ex, pipelining is a good example too) or run a process(close an accounting period for ex), I mean it is part of the Database design and build independently of your application.
Your ADF application will consume the functions and will follow/implement the changes, not the opposite.
3) PLSQL is easier to deal with and tightly integrated with the Database.
PL/SQL might be easier to deal with if you're a PL/SQL guy.
Being tightly integrated with the database isn't really a good thing. It's fine to use database features but excessive coupling will only make you more sensitive to any change in the database. It's similar to the IE6 issue where it makes the cost of upgrading prohibitive because of how tightly IE6 is coupled. You never want to the be in the position of being 'That App' that is forcing everyone to stay on old versions of the software indefinitely.
If you don't want to be dependant on an Oracle DB I agree otherwise I don't.
PL/SQL written 20 years ago is running well on 11gR2, in fact when you have new releases it is much better to have PL/SQL guy fine tune the large processes using the new releases techniques and features as it is more part of the SQL & PL/SQL expertise.
PL/SQL brings more performance capabilites/features than SQL on its own.
That's why to me tighly integration is a good thing for performance and tuning.
Of course we can say what will happen if Oracle stops PL/SQL development, but I think we can easily bet on the fact that it won't be the case very soon.