tag:blogger.com,1999:blog-7631414.post111401633620068884..comments2023-05-31T04:00:19.993+00:00Comments on Tony Andrews on Oracle and Databases: Business Logic APIsTony Andrewshttp://www.blogger.com/profile/16750945985361011515noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7631414.post-1139251294055206202006-02-06T18:41:00.000+00:002006-02-06T18:41:00.000+00:00Yes, the client will need to be refreshed if it ma...Yes, the client will need to be refreshed if it may be showing data that has been changed by the API. Whether you should therefore minimise the amount displayed depends on whether the users really need to see it. If they do then refresh it, if they don't then don't show it until they ask for it.Tony Andrewshttps://www.blogger.com/profile/16750945985361011515noreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1139250138842729252006-02-06T18:22:00.000+00:002006-02-06T18:22:00.000+00:00Ok, so the API does the work, butyou're not done y...Ok, so the API does the work, but<BR/>you're not done yet, because the<BR/>client GUI has to reflect the<BR/>changes. How do you do that? The<BR/>client may not always know what data was changed, does it have to<BR/>requery the whole data that is displayed?<BR/><BR/>For this example, that's no problem. But what about more complex business logic that affects a lot of data. I guess you can minimze Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1130756661794612702005-10-31T11:04:00.000+00:002005-10-31T11:04:00.000+00:00Will> If we have an API we need to add the new col...Will> If we have an API we need to add the new column to the arguments of the API and then modify, recompile and relink every piece of code that calls the API.<BR/><BR/>Not modify: API parameters can have default values too! But the recompilation would be required I agree.<BR/><BR/>I agree to some extent that triggers could be used instead of APIs, but not entirely. For one thing, triggers can Tony Andrewshttps://www.blogger.com/profile/16750945985361011515noreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1130414365246282442005-10-27T11:59:00.000+00:002005-10-27T11:59:00.000+00:00Or alternatively we could add the following trigge...Or alternatively we could add the following trigger<BR/><BR/>create or replace trigger transactions_insert<BR/> after insert on transactions<BR/> for each row<BR/> begin<BR/> update accounts<BR/> set current_balance = current_balance - :new.amount<BR/> where account_id = :new.source_account_id;<BR/> update accounts<BR/> set current_balance = current_balance + :new.amount<Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1124902294216074542005-08-24T16:51:00.000+00:002005-08-24T16:51:00.000+00:00Anonymous said...> I don't think you really unders...Anonymous said...<BR/><BR/>> I don't think you really understand what an API is, let alone how business logic is properly implemented.<BR/><BR/>Who, me or the spammer whose spam I deleted?Tony Andrewshttps://www.blogger.com/profile/16750945985361011515noreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1124123610746233532005-08-15T16:33:00.000+00:002005-08-15T16:33:00.000+00:00I don't think you really understand what an API is...I don't think you really understand what an API is, let alone how business logic is properly implemented.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1123677104302076202005-08-10T12:31:00.000+00:002005-08-10T12:31:00.000+00:00This comment has been removed by a blog administrator.Tony Andrewshttps://www.blogger.com/profile/16750945985361011515noreply@blogger.comtag:blogger.com,1999:blog-7631414.post-1123514185807000362005-08-08T15:16:00.000+00:002005-08-08T15:16:00.000+00:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.com