Chapter 7

Putting Your Code in the Right Place

In This Chapter

bullet Placing code in the database

bullet Using triggers

bullet Using application logic

bullet Placing code in the middle tier

Writing good code that runs efficiently isn’t enough to guarantee the success of a project. Deciding where to put the code is just as important as writing it. Code can be written in lots of different places within a system, but each of these places has pro and cons. Frequently, depending upon what the code needs to do, you can make a clear, correct decision about where the code should reside. At other times, you have a variety of acceptable alternatives for placing the code.

Deciding how and where to place code has been a hotly debated topic in the application development world. In client/server development, you had to decide what logic belonged in the database and what logic belonged within the user interface. Since the advent of Web-based systems that run code on an application server, code can reside in even more places. With all these options, the question remains: Which code should be placed where?

This chapter ...

Get Oracle PL/SQL For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.