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

Re: SAX: Method Name Collisions

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev Mailing List <xml-dev@i...>
  • Date: Thu, 16 Apr 1998 08:27:53

sax method
At 10:12 13/04/98 -0400, David Megginson wrote:
>
>The first, "getAttributeListLength", is the ugliest.  It is simple to
>avoid this problem by creating a separate class for SAXAttributeList,
>rather than implementing it in the main driver -- what does everyone
>else think about this question?
>
I've been away for some days, so ignore this if you've come to a conclusion...

I have been gently struggling with the naming problem whilst developing
JUMBO2 which is now based on the SwingSet classes. I though about names
like jumbo.xml.Tree and so on, but rejected them in favour of a small
uniquifying prefix (XTree, etc.). This is rather similar to the swing use
of JTree. The likelihood of collision between Tree, Node, Element,
Attribute, and a few others is very high and the result is that there may
have to be lines of the form:
	jumbo.xml.Tree tree = new com.sun.java.swing.JTree(new
jumbo.xml.Node("Root"));
which is the appropriate way to uniquify them. The short names are
difficult to search for - searching for Tree in all files will return a
large number of unwanted hits.  Therefore I'm mildly in favour of SAXFoo.


I'm not passionate on this, but I also support Stroustrup's philosophy that
well devised names are often better than comments.  So
getAttributeListLength() may possibly avoid the use of a comment.

Also, where possible, anything that has the same 'feel' as the Java class
libraries is a help to learning.

As we all know this is a subjective matter and I'll trust David to make a
good job of it.

	P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.