Dare Obasanjo's weblog
"You can buy cars but you can't buy respect in the hood" - Curtis Jackson
Navigation for Disagreeing with Ken Arnold on Java Design, Kapor Vaporware and a Triple F List - Dare Obasanjo's weblog
Content
Sidebar
Footer
October 22, 2002
@ 12:58 AM
Comments [0]
Disagreeing with Ken Arnold on Java Design, Kapor Vaporware and a Triple F List
Java [and C#] Design Issues
I recently found an
interview with Ken Arnold
, one of the original designers of CORBA, via
The ServerSide
. He mentions
Effective Java
which many people I know including myself consider to be one of the best C# books around. Doug has referred to it as
Effective Java and C#
on his blog which isn't too far of the mark given the
similarities
between both
languages
.
The first thing discussed in the article is the wisdom of marking entire classes or methods within a class as
final
thereby preventing derivation. Ken Arnold is strongly against making classes final because it hinders potentially interesting reuses of the class. I tend to agree and have seen many users [including myself] brush up against frustration when faced with a class that is closed off to derivation. Of course, one may wonder why if I
favor composition over inheritance
I have any complaints about this practice. This leads to the main point where I disagree with Ken Arnold.
I believe derivation is the right option in situations involving polymorphism that satisfy the
Liskov Substitution principle
. Basically my checklist given a potential derived type D and a base class B is to ask
Are the behavior and properties of D a superset of the behavior and properies of B?
Can an instance of D always [except for extenuating implementation related issues] be used in a situation where an instance of B is expected?
given my above checklist I think
java.util.Stack
is a bad design and question Ken's statement that inheritance is still desirable if all the methods in the class are marked
final
. If all the methods in a class are final as they are in the case of
java.lang.String
(and for good reason) then one is as well served by composition as they are by polymorphism. Of course, some may consider providing the same interface to the wrapping class as unnecessary and inefficient overhead.
Being on the other side of the fence working on class implementations that may eventually be used by thousands to millions of developers there is a significant test cost to ensuring that derivation is not gratuitiously blocked yet one does not violate Liskov substitution. This is
hard
. Very few developers actually write code that considers that given that a given method parameter is of a type which doesn't have derivation blocked then the behavior of object or its most specific type are not guaranteed. This
constructor for the System.Xml.XmlValidatingReader class
is an example of poorly supporting derivation scenarios. The constructor accepts an instance of the
System.Xml.XmlReader
class but somewhere along the line it turns out that the code fails unless it is passed a specific subclass (in this case an instance of
System.Xml.XmlValidatingReader
).
This
USENET post
is another example of not expecting a derived type to appear at some core part of the architecture and breakage occuring when it does.
Ken Arnold's
critique of the copy constructor approach to avoiding the problems with
Object.clone()
are spot on. Secondly, the fact that the
clone() method is on java.lang.Object
and not on the
java.lang.Cloneable
interface is very broken and something that definitely can only be fixed by deprecation and starting afresh. I definitely second the idea of a
java.lang.Copyable
interface.
I think
marker interfaces
are a poor hack around the lack of a concrete metadata feature like .NET Framework
Attributes
. With any luck
JSR 175
will pass and the irritating hack that are marker interfaces will cease to exist.
#
Design Goals and Common Usage of W3C XML Schema
Alexis Smirnov wrote
his opinion of Noah Mendelsohn's Web Services DevCon presentation
. Sam Ruby was cool enough to hook me up with the slides to the presentation entitled
W3C XML Schema: what you might not know (and might or might not like!)
. The summary on Smirnov's webpage implies that [Noah said] the W3C XML Schema working group intentionally designed the schema language to be used on more than XML data. I assume this is why it is described working on the
XML Infoset
as opposed to in terms of operations on
XML 1.0
syntax and constructs. I should note that I didn't really get this impression from Noah's slides but this may have been something that he said and didn't actually have planned.
Alexis asks whether there has been much use in W3C XML Schema being used outside document validation scenarios. Funny enough, at least in the .NET Framework it sees more usage as a mapping format for
XML to objects
or
XML to relational
and back than it does as a validation language for XML documents. Neither of the XML technologies described in the previous links (XML Serialization and SQLXML) actually uses the rules of W3C XML Schema for validation of the mapped results which I've assumed are due to performance reasons and the fact that many W3C XML Schema concepts simply do not transfer well to objects or relational schema
#
Cool .NET Open Source Project
What I always liked about being a Java developer were the number of innovative Open Source projects that took Java in many interesting directions. I keep looking for similar projects for the .NET framework but for now it seems most major Open Source .NET projects are primarily clones of Java Open Source projects which I guess is to be expected until people become more comfortable with the framework and start using it as their primary development environment.
The first really cool [and XML savvy] .NET Open Source application I've seen is
NMatrix
which according to the
NMatrix SourceForge Project Page
has 47 developers signed up. Sweet.
#
BSD Privilege Elevation
Every once in a while
I get involved in a thread on Slashdot that reveals the fact that I really want to be a *nix system level hacker
#
KaporWare or VaporWare?
Slashdot recently carried a story about
Mitch Kapor's plans to build an Outlook killer
. An Outlook/Exchange killer is considered by many in the Linux crowd as one of the largest impedements to Linux on the desktop in corporate environments. However I'm not sure if this is that strong of a case given Miguel's work in trying for interop via
Evolution
which would seem to be the more likely catalyst for getting Linux on corporate desktops than trying to replace Outlook/Exchange.
#
Bob Abooey: Dev Lead of the Apple Two Button Mouse Team
Great question for Donald Becker from K5's own Bob Abooey
Disclaimer
The opinions in this diary are my own and do not reflect the opinions, thoughts, intentions or strategies of my employer.
Tweet
Categories:
Tracked by:
"los angeles mortgage" (los angeles mortgage)
[Trackback]
"Ford C6 Transmission Shifter Parts" (Ford C6 Transmission Shifter Parts)
[Trackback]
"atlanta ebony escorts that fuck" (atlanta ebony escorts that fuck)
[Trackback]
"mangosteen caplets" (mangosteen caplets)
[Trackback]
"Sydney Bristow" (Sydney Bristow)
[Trackback]
"psychic network" (psychic network)
[Trackback]
"precious metals prices" (precious metals prices)
[Trackback]
"service desk software" (service desk software)
[Trackback]
"us state department" (us state department)
[Trackback]
"Ohio liver damage lawsuit attorneys" (Ohio liver damage lawsuit attorneys)
[Trackback]
"www.derma-smoothe%2Ffs eczema oil" (www.derma-smoothe%2Ffs eczema oil)
[Trackback]
"Wedding event" (Wedding event)
[Trackback]
"FM Jammer Rf" (FM Jammer Rf)
[Trackback]
"40-Hour External Li-ion Battery for iPod" (40-Hour External Li-ion Battery for ...
[Trackback]
"celtic sea salt" (celtic sea salt)
[Trackback]
"generator wheel kit" (generator wheel kit)
[Trackback]
"difference brand synthroid vs generic synthroid" (difference brand synthroid vs...
[Trackback]
"supper solutions" (supper solutions)
[Trackback]
"Phone Number for Symantec Customer Service" (Phone Number for Symantec Customer...
[Trackback]
"central oregon" (central oregon)
[Trackback]
"alabama secretary of state" (alabama secretary of state)
[Trackback]
"Float Sink Submarine" (Float Sink Submarine)
[Trackback]
"fax cover sheet" (fax cover sheet)
[Trackback]
"realestate listings" (realestate listings)
[Trackback]
"What Is Vasotec Used for" (What Is Vasotec Used for)
[Trackback]
"kauai accommodation" (kauai accommodation)
[Trackback]
"los angeles jail twin towers" (los angeles jail twin towers)
[Trackback]
"Bernardo Miami Sandals" (Bernardo Miami Sandals)
[Trackback]
"air reserve personnel center" (air reserve personnel center)
[Trackback]
"acne remedies" (acne remedies)
[Trackback]
"surgical treatment of obesity" (surgical treatment of obesity)
[Trackback]
"Spongebob Squarepants Screensaver" (Spongebob Squarepants Screensaver)
[Trackback]
"liquid siding" (liquid siding)
[Trackback]
"copywriter vancouver BC" (copywriter vancouver BC)
[Trackback]
"numb linkin park" (numb linkin park)
[Trackback]
"sex rpg games" (sex rpg games)
[Trackback]
"georgia tech football" (georgia tech football)
[Trackback]
"womens lingerie online shopping" (womens lingerie online shopping)
[Trackback]
"direct mail magazine insert printing" (direct mail magazine insert printing)
[Trackback]
"lynn daily item" (lynn daily item)
[Trackback]
"George Washington High School Guam deca" (George Washington High School Guam de...
[Trackback]
"bartender guide" (bartender guide)
[Trackback]
"vacuum cleaner bags" (vacuum cleaner bags)
[Trackback]
« Generation Wrecked, XDocs, and Musical C...
|
Home
|
Trip to Atlanta and More "Daddy Dearest"... »
Comments are closed.
RSS/Subscribe
Archives
All dates
All Posts
Search
Latest Posts
Culture Eats Strategy for Breakfast
Some Thoughts on Paul Graham’s Essay on Income Inequality
How Facebook Knows Who You’re Talking to on Tinder and OKCupid
Fabric: Why Developers Can Trust Twitter Won’t Screw Them This Time
5 Account Security Features Every Online Service Should Implement But Doesn't
Facebook’s Newsfeed Experiment: Most people have grabbed the wrong end of the stick
Change is bad unless it’s great: Lessons from user revolts against Foursquare’s Swarm and the new Skype for iPhone
Facebook’s App Links: The Good, the Bad and the Ugly
The mobile web vs apps is another front on the battle between open and closed systems
How Facebook Knows What You Looked at on Amazon
Categories
Cloud Computing (5)
Comics (1)
Competitors/Web Companies (161)
Current Affairs (31)
Das Blog (3)
dasBlog (1)
Life in the B0rg Cube (197)
Mindless Link Propagation (185)
Movie Review (13)
MSN (127)
Music (20)
Office Live (8)
Personal (54)
Platforms (59)
Programming (58)
Ramblings (145)
Rants (7)
RSS Bandit (215)
Seattle Startup Shoutout (4)
Social Software (185)
Startup Shoutout (4)
Syndication Technology (108)
Technology (169)
Trip Report (63)
Video Games (6)
Web Development (198)
Windows Live (227)
XML (203)
XML Web Services (114)
Archives
January, 2016 (2)
October, 2015 (1)
October, 2014 (1)
September, 2014 (1)
July, 2014 (1)
June, 2014 (1)
May, 2014 (1)
April, 2014 (1)
February, 2014 (1)
January, 2014 (1)
December, 2013 (1)
November, 2013 (2)
July, 2013 (1)
March, 2013 (1)
November, 2012 (2)
September, 2012 (2)
July, 2012 (3)
June, 2012 (1)
April, 2012 (1)
February, 2012 (1)
January, 2012 (1)
November, 2011 (1)
September, 2011 (3)
July, 2011 (2)
June, 2011 (1)
April, 2011 (1)
March, 2011 (1)
January, 2011 (2)
November, 2010 (2)
October, 2010 (2)
August, 2010 (3)
July, 2010 (3)
June, 2010 (3)
April, 2010 (6)
March, 2010 (3)
February, 2010 (5)
January, 2010 (4)
December, 2009 (2)
November, 2009 (8)
October, 2009 (1)
September, 2009 (3)
August, 2009 (4)
June, 2009 (1)
May, 2009 (12)
April, 2009 (5)
March, 2009 (17)
February, 2009 (11)
January, 2009 (20)
December, 2008 (12)
November, 2008 (12)
October, 2008 (22)
September, 2008 (12)
August, 2008 (15)
July, 2008 (18)
June, 2008 (19)
May, 2008 (12)
March, 2008 (2)
February, 2008 (27)
January, 2008 (20)
December, 2007 (26)
November, 2007 (26)
October, 2007 (29)
September, 2007 (16)
August, 2007 (34)
July, 2007 (26)
June, 2007 (33)
May, 2007 (37)
April, 2007 (14)
March, 2007 (32)
February, 2007 (35)
January, 2007 (29)
December, 2006 (29)
November, 2006 (47)
October, 2006 (26)
September, 2006 (46)
August, 2006 (40)
July, 2006 (38)
June, 2006 (48)
May, 2006 (33)
April, 2006 (39)
March, 2006 (38)
February, 2006 (42)
January, 2006 (42)
December, 2005 (43)
November, 2005 (40)
October, 2005 (48)
September, 2005 (45)
August, 2005 (40)
July, 2005 (31)
June, 2005 (36)
May, 2005 (38)
April, 2005 (31)
March, 2005 (39)
February, 2005 (22)
January, 2005 (25)
December, 2004 (32)
November, 2004 (27)
October, 2004 (24)
September, 2004 (26)
August, 2004 (23)
July, 2004 (25)
June, 2004 (29)
May, 2004 (39)
April, 2004 (37)
March, 2004 (41)
February, 2004 (51)
January, 2004 (54)
December, 2003 (42)
November, 2003 (40)
October, 2003 (41)
September, 2003 (8)
August, 2003 (11)
July, 2003 (9)
June, 2003 (14)
May, 2003 (12)
April, 2003 (12)
March, 2003 (13)
February, 2003 (13)
January, 2003 (13)
December, 2002 (12)
November, 2002 (8)
October, 2002 (6)
September, 2002 (5)
August, 2002 (6)
July, 2002 (6)
June, 2002 (4)
May, 2002 (8)
April, 2002 (3)
March, 2002 (1)
February, 2002 (1)
January, 2002 (4)
November, 2001 (4)
October, 2001 (3)
September, 2001 (3)
August, 2001 (1)
July, 2001 (1)
May, 2001 (0)
April, 2001 (2)
March, 2001 (2)
BlogRoll
Alexander Groß
Anthony Bouch
Ben Scheirman
Clemens Vasters
Erv Walter
Gray's Matter
Harry Pierson
James Snape
John Forsythe
Joshua Flanagan
Kris van der Mast
Mark Michaelis
Michael Earls
Omar Shahine
Paulb Vanbrenk
Scott Hanselman
Stephen Forte
Steven Rockarts
Tom Mertens
Tom Watts
Tony Bunce
Vasanth Dharmaraj
Categories
Cloud Computing
Comics
Competitors/Web Companies
Current Affairs
Das Blog
dasBlog
Life in the B0rg Cube
Mindless Link Propagation
Movie Review
MSN
Music
Office Live
Personal
Platforms
Programming
Ramblings
Rants
RSS Bandit
Seattle Startup Shoutout
Social Software
Startup Shoutout
Syndication Technology
Technology
Trip Report
Video Games
Web Development
Windows Live
XML
XML Web Services
Contact the Author
Themes
Pick a theme:
BlogXP
business
calmBlue
Candid Blue
dasBlog
dasblogger
dasblueblog
dasEmerald
DirectionalRedux
Discreet Blog Blue
Elegante
essence
Just Html
MadsSimple
Mobile
Mono
Movable Radio Blue
Movable Radio Heat
nautica022
orangeCream
Portal
Project84
Project84Grass
Slate
Sound Waves
Tricoleur
useit.com
Voidclass2
Admin
Sign In