The Artima Developer Community
Sponsored Link

Java Buzz Forum
XMLEnabled

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Russell Beattie

Posts: 727
Nickname: rbeattie
Registered: Aug, 2003

Russell Beattie is a Mobile Internet Developer
XMLEnabled Posted: Aug 21, 2003 2:12 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Russell Beattie.
Original Post: XMLEnabled
Feed Title: Russell Beattie Notebook
Feed URL: http://www.russellbeattie.com/notebook/rss.jsp?q=java,code,mobile
Feed Description: My online notebook with thoughts, comments, links and more.
Latest Java Buzz Posts
Latest Java Buzz Posts by Russell Beattie
Latest Posts From Russell Beattie Notebook

Advertisement
I was doing some more coding today and realized that I was implementing *a lot* of unused methods. First, the hack of throwing exceptions when I wasn't using a method in my XMLMap really bugged me, it just wasn't clean. Secondly, I haven't bothered doing anything at all with the getSchema() methods. It makes sense to have it there, but if I'm not use it, why include it just to ignore it.

So I took another step back (any more and I'll be off the cliff) and tried to figure out what I was looking for and stumbled upon the very simple root of what I was doing, an XMLEnabled interface.

public interface XMLEnabled {
	
	public String getXML() throws XAOException;
	
	public void setXML(String xml) throws XAOException;
	
}

I originally called it XMLBean because of the get/set pair, but there was a zillion conflicts with that, so I named it XMLEnabled and it doesn't seem to conflict with much (though I thought it was used by .Net at first and was twisted).

I haven't gotten much farther than this actually in the redesign, but it looked like such a fundamentally useful interface that I decided to get it out there. What I'm doing from this is extending the XMLEnabled interface with various interfaces that'll take parameters and provide schemas. This way it's all Interfaces, but a bit more mix and match.

Java needs a generic XMLException. I'd like to use that name, but everyone's already used it a dozen different ways. I know it's okay if it's in my package, but in general for something this basic, it'd be nice to have it more generic.

Weee! Refactoring is fun! Good thing I haven't actually done a lot to refactor. ;-)

-Russ

Comment

Read: XMLEnabled

Topic: Microsoft Architect Touts SOAs Previous Topic   Next Topic Topic: JSP-based tree controls?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use