Interfaces are a convenient way to define standard behaviors that other types can implement. Although JavaScript has no built-in
support for interfaces, Microsoft has developed a way to mimic interfaces in JavaScript. As in .NET, an interface is a contract that
states that the implementer of the interface must provide all of the functionality specified in the interface. The interface itself
is only a specification and has no functionality of its own. When a type declares that it implements an interface, you are assured
of the set of features it offers. Types can use interfaces to establish contracts for behavior that can then be enfored at runtime.
Situation
The Bible SmartScripture class does not provide a way to handle Bible cross references. It is labor-intensive for Christian Web
developers to associate Bible cross references with existing Bible text or references on web pages.
Target
Christian Web developers working together with Christian Web designers need to add Bible cross references to existing Bible text
or references on web pages to allow users to "compare, confer, or consult" one Bible text to another. Bible cross references are
essential for serious Bible students, theologians, scholars, and church leaders.
Proposal
We will create a new Bible scripture class called SmarterScripture based upon the SmartScripture class using JavaScript
interfaces. SmarterScripture will contain an interface to store Bible cross references and add them to the linkable Bible
reference of the base class.
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
Sample Bible Link with Cross Reference