Although JavaScript allows types to be dynamically modified, and ASP.NET AJAX uses this to add the type system functionality
into existing objects, it is not the approach recommended for mainstream development. Instead of modifying a type directly, you
can inherit from it and extend it in new members by overriding existing ones.
Situation
The Bible Scripture class does not provide a way to generate linkable Bible references. It is tedious and time-consuming for
Christian Web developers to manually create web page hyperlinks linking Bible references to online Scripture providers.
Target
Christian Web developers working together with Christian Web designers need to create linkable Bible references on web pages
to allow users to view Bible text in the Bible version associated with the Bible reference. When a user clicks on a linkable
Bible reference on a web page, the browser should open a new window to the online Scripture.
Proposal
We will create a new Bible scripture class called SmartScripture based upon the Scripture class using JavaScript
inheritance. SmartScripture will contain member properties and functions to generate web page hyperlinks to
Bible Gateway (an online Bible provider).
Sample Bible Text
"For God so loved the world, that He gave His only begotten Son, that whoever believes in Him shall not perish, but have eternal life."
Sample Bible Elements
Book: Gospel of John, Chapter: 3, Verse: 16, Version: New American Standard Bible (NASB)
Sample Bible Reference
Jn 3:16 :: NASB