Framework or platform?
This is just one of those semantic issues that, on its own isn't terribly vexing, but in certain contexts can lead to bigger communications problems. I was recently involved in a discussion on the JUnit Yahoo! group about limitations of the JUnit framework. Specifically there were two messages written in relatively quick succession mentioning how JUnit doesn't support data-driven testing. The statement is untrue, but JUnit indeed does not provide sophisticated, built-in mechanisms for managing test data. This irks me, because what I see as JUnit's strength, others seems to view as a weakness: JUnit is light, compact and does everything absolutely needed to run good, effective tests; but the public seems to want more than that, and complains that it needs to use extensions in order to get those things done.
What we have here is a failure to communicate.
What is a framework? According to my encyclopedic dictionary, it is "a basic structure that supports and gives shape". I emphasize the word basic in this definition, even as it applies to software. A software framework is a basic structure that abstracts away repetitive tasks (supports) and provides extension points for additional features (gives shape). JUnit does this extremely well, so why the complaining? I think the public asks for a framework, but really wants a platform.
So, what is a platform? Again, my encyclopedic dictionary: "a raised structure on which a performer stands". A software platform is a suite of tools that aims to cover a broad spectrum of features needed for a given task. IBM's WebSphere Commerce is not an e-commerce framework; it is an e-commerce platform. It tries to give you everything you need to start running an e-commerce site today, along with enough extension points to let you customize your work. It is definitely not a basic structure that supports and gives shape. It is a Swiss Army knife.
So it seems that a number of people out there want a testing platform, complete with test data repositories, logging, resource management and assertion libraries for all kinds of technologies (XML, HTML, JDBC, JMS...). The problem is that they expect JUnit -- merely a framework -- to be a platform. It is not. There is, however, a de facto platform out there: JUnit plus JUnit-addons, XMLUnit, GSBase, MockEJB, jMock, and more... If you want a platform, you simply have to download the individual pieces yourself. This way, if you don't need to test JMS components, you don't have to be burdened with another *.jar file and more classes to wade through. This is the essential difference between a framework and a platform.
So folks, please don't expect JUnit to be the Swiss Army knife of Java testing. It isn't, and it won't apologize for that. It shouldn't. After all, it's just a framework, and a damn fine one at that.
jbrains on 12.20.04 @ 02:04 PM ET [link]
