Re: Create a JAVA Client/Server app in 5 Minutes
Andreas Otto wrote:
When you declare the variable to be a specific concrete type, and more
importantly when you declare the public methods to return or accept
that type, you have committed your code to that specific
implementation in perpetuity. If that concrete type embodies
behaviors not essential to your algorithm, then you specified it too
narrowly.
yes, the "Filter1b" example is final this is an application
(propably i [sic] should add the "final" to the class= .
what you are saying is right for libraries created to be extended
but not for a "final" class ready to be used with "main"
Every method you write is part of an API, even if only for a single
application. Unless you intend to throw away your code, you will have to
maintain it. You proffered your project as a framework for others to use.
That means that you are committing to an interface for client programs to use.
That means maintenance.
"Program to the interface", or as I prefer, "Program to the type", is
one of those essential principles of software development of which all
practitioners should be aware.
yes, that what I have done with the MqS package,
-> abstract base class
-> and interfaces used to modify the behavior
It is especially significant for frameworks intended for use by a wide
audience to incorporate in their own works. Such projects need to
adhere to the highest possible standards.
its clear, that "Filter1b" is an filter example implementation and *not*
part of the javamsgque project -> it's clear .. right ?
My comments are based on the overall visible code style after a few minutes of
visiting your project. The bottom line is that your code shows so little
respect for Java coding conventions and risk factors (such as doing the work
of a class from the constructor) that I would never consider using that
framework. It just isn't up to the standard.
--
Lew