[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Distributed versus local processing

  • To: "Alaric B. Snell" <alaric@a...>
  • Subject: Re: Distributed versus local processing
  • From: Bill de hÓra <bill.dehora@p...>
  • Date: Fri, 01 Nov 2002 10:38:41 +0000
  • Cc: Paul Prescod <paul@p...>, xml-dev@l...
  • Organization: Propylon
  • References: <36C08A70-E9A2-11D6-9F26-0030657E2F34@m...> <E186pZI-0001AB-00@c...> <3DC15B34.50809@p...> <E187Jro-0004c2-00@c...>
  • Reply-to: bill.dehora@p...
  • User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

idempotent distributed
Alaric B. Snell wrote:

> But metadata extraction code I've writ for Java looks like:
> 
> link = getLinkFromSomewhere () // you missed this out in the HTTP one
> 
> Class c = link.getClass ();
> 
> boolean idempotent;
> 
> try {
>    idempotent = c.getField (methodName + "IsIdempotent").getBoolean (link);
> }
> catch (NoSuchFieldException e) {
>    // There was no explicit flag, assume not idempotent for now
>    idempotent = false;
> }


If the objects implemented an interface, you could just use a cast:

try
{
  Idempotent i = (Idempotent)getLinkFromSomewhere ()
   ...
}
..

and avoid all that reflection verbosity.


> Reflective programming languages make this explicit! 

Not as explicit as a cast/classcastexception block - which is what 
you're doing deep down.


Bill de hÓra
-- 
Propylon
www.propylon.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.