Wrapping Functionality to Avoid Redundant Coding

CreateDS.vbs depends on PMAdmin.vbs, so I wrapped the functionality of PMAdmin.vbs in CreateDS.vbs. If you're not a software developer, you might not have heard the term wrap before. The term comes from COM programming, in which all COM objects are technically available for reuse in other pieces of code. In other words, you don't have to reinvent the wheel each time you need the functionality. For example, I've written several ActiveX Data Objects (ADO) that companies use in the middle tier of their Web sites. I needed to search the Registry for a value in those objects and had previously written a separate COM object that pulls values from the Registry. It would be senseless to rewrite the Registry reader code by copying it into my ADO, so I simply referenced it in my ADO code. In other words, I wrapped the Registry reader object's functionality. In CreateDS.vbs, I use similar technology to wrap the functionality of PMAdmin.vbs.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish