Search WebSpherePower's 6,973 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Using a reusable code approach to HTML select option lists, part IV (continued)

Consumers order their OptionListSource objects by name, and the factory uses the name to look up the configuration parameters specific to that named OptionListSource and uses those parameters to instantiate the object. The factory then completes its work by returning the fully configured OptionListSource back to the consumer.

To obtain an OptionListSource, a consumer would use something like the following code:

OptionListSource projectSource =
OptionListSourceFactory.getOptionListSource("projects");
OptionListSource customerSource =
OptionListSourceFactory.getOptionListSource("customers");

The fact that the "projects" source may be of a different class than the "customers" source really doesn't matter to the consumer, because the consumer is going to invoke the same methods in the same way for both objects, regardless of the specific class of the objects.

Now what?
Once again, we've made quite a jump from where we left off last time, but we're not done yet! Now that we have our little framework in a usable form, we could continue to add additional implementations such as an LdapOptionListSource or an XmlOptionListSource, but we've done more than enough of these to leave any other potential implementations up to those who need them. What we have not done, though, is take a look at what other potential uses we might have for our little framework beyond the purpose for which it was designed. That will be the focus of our next installment.

Product availability and resources
For more information on Echo Technogoly Group, Inc., visit http://www.teametg.com.

H1 Easy, flexible article reprints ZATZ now offers a quick, easy, flexible and inexpensive way to use article reprints in your marketing and promotion efforts. You can now get article reprints for a one-time fee of only $200. For details, visit http://mediakit.zatz.com/reprints.

Jeff Chilton is Vice President of Fulfillment at Echo Technology Group, Inc., an IT consulting firm that specializes in enterprise-focused best practices. He can be reached at jchilton@teametg.com


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Projects > Reusable Code (5 articles)
   Using a reusable code approach to HTML select option lists, part VI
   Using a reusable code approach to HTML select option lists, part V
   Using a reusable code approach to HTML select option lists: part III
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Legal question: Can HP keep Hurd from going to Oracle?
Caringo announces integration with Symantec EV 9.0
Cisco & Citrix marry on virty PCs
Take Heed, Tech Giants: Edison's Failed Plot To Hijack Hollywood
IBM code unchains virtual workloads
Oracle names H-P ex-CEO Mark Hurd as co-president
Cloud Messaging Provider, Linxter, Releases SDK for Java and Android
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Introducing the Jones family and their full-family backup challenges
David Gewirtz Online: CNN commentary and analysis
DominoPower: Lotus must open source Notes and Domino
OutlookPower: Hands on debugging a broken Outlook forwarding rule
-- Advertisement --

EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.

NO LONG WAITS. Server provisioned within hours.

Tap here now and be up and running with your own server tonight.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login