Search This Blog

Thursday, May 16, 2013

Procedure vs Package

Package have alot advantages over procedure, which can be summarized as following:
  • Break the dependency chain
No cascading invalidation when you install a new package body, if you have procedures that call procedures then compiling one will invalidate your database.
  • Support encapsulation
I will be allowed to write MODULAR, easy to understand code, rather then MONOLITHIC, non-understandable procedures.
  • 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.
  • Support overloading
  • Support session variables
  • Promote overall good coding techniques
Stuff that lets you write code that is modular, understandable, logically grouped together....

No comments: