19.1. About Plug-and-Play
Plug-and-play packages allow you to replace whole sections of code with programs from PL/Vision packages. You essentially "plug-in" PL/SQL code and immediately gain benefits in your application. The best example of a PL/Vision plug-and-play component is the PLVexc (PL/Vision EXCeption handling) package. It provides very high-level exception-handling programs so that individual developers can simply call a procedure that describes the desired action, such as "record and continue," and PLVexc figures out what to do. It makes use of PLVlog to automatically write errors to the log of your choice (database table, PL/SQL table, etc.).
To give you a sense of plug-and-play in PL/SQL code, consider the following exception section. It has two different exception handlers: one for NO_DATA_FOUND and one for all other exceptions. When NO_DATA_FOUND is raised, I request that PLVexc display a message to the user, record the error, and then stop the program. When any other error occurs, I request that PLVexc record the error and then continue processing.
EXCEPTION
WHEN NO_DATA_FOUND
THEN
PLVexc.recNstop ('Company has not been located.');
WHEN OTHERS
THEN
PLVexc.recNgo;
END;
So PLVexc does a lot of work for me. What's new about that? You build a module encapsulating multiple actions and then use it over and over again. That's the central concept of modularization and black-boxing of logic. Why give it a fancy name like "plug-and-play"? Maybe it's just a difference of ...