|
|
|
|
|
|
|
|
|
|
|
|
|
|
Save time and effort with a strong application framework (continued)
By creating interface standards for retrievers, filters, and formatters, different applications can use different components, mixing and matching the various options at will, but from the perspective of the framework, the process to obtain formatted navigation is always the same. In Java code, it might look something like this:
navigation=formatter.format(filter.filter(retriever.getNavigation()));
|
Since navigation options and a user's authority are unlikely to change during the course of a single on-line session, this is something that could conceivably be done once at sign-on, then stored in the user's session for use throughout the system until the user signed off. In the event that their authorizations were updated during their session, they would merely need to sign off and sign back on again in order to pick up their updated list of options.
Putting it all together Generally speaking, there are four distinctly different components of any particular shared element of your application framework. In a Java development environment, they are:
- The contract (a Java interface);
- The base code (a Java abstract class that implements the interface);
- Specialized base code (other abstract classes that extend the base class);
- Application-specific implementations ( Java classes that extend either the base code or specialized base classes).
In the case of our navigation example, your framework would include a Java interface for navigation retrievers, navigation filters, and navigation formatters. The framework would also include an abstract class that implemented the common base code necessary to implement each of the three interfaces. Additionally, there might be some specialized base code classes for specific types of implementations, such as a base class for all vertical navigation formatters and a similar base code class for all horizontal navigation formatters. Assuming that you had an interface specification for navigation formatters called NavFormatter, your framework library might include items such as the following:
- FormatterBase implements NavFormatter
- VerticalFormatterBase extends FormatterBase
- HorizontalFormatterBase extends FormatterBase
- PullDownFormatter extends HorizontalFormatterBase
As you can see, once you have created the framework foundation and implemented a few basic classes necessary for your initial application system, adding functionality to the framework for new application system requirements is simply a matter of creating new classes that conform to your interface specification. Through specialization, you separate independent functions and created for yourself the capability to have distinctly different components (such as an XML navigation retriever as opposed to a JDBC navigation retriever) interoperable with other interchangeable components (such as a new vertical formatter that presents menu options like a directory tree, complete with little +'s and -'s to open and close the tree nodes like a file system directory).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|