Procedure versus package
Always use a package. Never use a standalone procedure except for demos, tests and standalone utilities (that call nothing and are called by nothing)
Why?
Because packages:
o break the dependency chain (no cascading invalidations when you install a new package body -- if
you have procedures that call procedures -- compiling one will invalidate your database)
o support encapsulation -- I will be allowed to write MODULAR, easy to understand code -- rather
then MONOLITHIC, non-understandable procedures
o increase my namespace measurably. package names have to be unique in a schema, but I can have
many procedures across packages with the same name without colliding
o support overloading
o support session variables when you need them
o promote overall good coding techniques, stuff that lets you write code that is modular,
understandable, logically grouped together....
If you are a programmer - you would see the benefits of packages over a roliferation of standalone procedures in a heartbeat
Why?
Because packages:
o break the dependency chain (no cascading invalidations when you install a new package body -- if
you have procedures that call procedures -- compiling one will invalidate your database)
o support encapsulation -- I will be allowed to write MODULAR, easy to understand code -- rather
then MONOLITHIC, non-understandable procedures
o increase my namespace measurably. package names have to be unique in a schema, but I can have
many procedures across packages with the same name without colliding
o support overloading
o support session variables when you need them
o promote overall good coding techniques, stuff that lets you write code that is modular,
understandable, logically grouped together....
If you are a programmer - you would see the benefits of packages over a roliferation of standalone procedures in a heartbeat
Comments