O
Ojas
First, I can understand component-based design when it is obvious that
components will likely be reused, or when we want to leverage existing
components.
Does anyone know of a good web page that nicely summarizes best
practices for when, and when not to, follow component design versus
traditional OOP? And are there different implementation levels that
one can follow when implementing a component?
Is there a web page anywhere that explains how to properly implement a
component? For example, should it thoroughly check all input
parameters, should it gracefully throw a published exception when
methods are called out of sequence, etc. To what extent should the
component be made idiot proof? I'm asking because this comes at a
cost in terms of development time, QA time, and processing overhead
(impacts performance).
Why:
I am working on a new product, and it is a product where nobody will
ever want to reuse any of our classes for other products.
In Visual Studio we've broken the product up into multiple projects
that use each other to simplify development on it given we have a half
dozen developers working on it.
This is a non-UI product, and it is highly specialized.
Assuming we do not need reuse of our large-grain components, for
example a component could be an adapter for reading and writing data
to a specific data source type (SQL Server), it seems like over-
engineering to have the main classes in these project files conform to
strict component contracts.
The public methods on our classes will never be used by anyone other
than the immediate small development team.
For example:
* do we need to have the component handle any invalid input values by
throwing an exception? For example, if someone passes a list, throw
an exception if any list element is null.
* do we need to have the component gracefully throw exceptions anytime
a dev makes an incorrect call sequence?
* should we add unit tests for every invalid and valid input parameter
combination we can think of? And of course add and test the software
to make all of these unit tests pass.
* etc.
components will likely be reused, or when we want to leverage existing
components.
Does anyone know of a good web page that nicely summarizes best
practices for when, and when not to, follow component design versus
traditional OOP? And are there different implementation levels that
one can follow when implementing a component?
Is there a web page anywhere that explains how to properly implement a
component? For example, should it thoroughly check all input
parameters, should it gracefully throw a published exception when
methods are called out of sequence, etc. To what extent should the
component be made idiot proof? I'm asking because this comes at a
cost in terms of development time, QA time, and processing overhead
(impacts performance).
Why:
I am working on a new product, and it is a product where nobody will
ever want to reuse any of our classes for other products.
In Visual Studio we've broken the product up into multiple projects
that use each other to simplify development on it given we have a half
dozen developers working on it.
This is a non-UI product, and it is highly specialized.
Assuming we do not need reuse of our large-grain components, for
example a component could be an adapter for reading and writing data
to a specific data source type (SQL Server), it seems like over-
engineering to have the main classes in these project files conform to
strict component contracts.
The public methods on our classes will never be used by anyone other
than the immediate small development team.
For example:
* do we need to have the component handle any invalid input values by
throwing an exception? For example, if someone passes a list, throw
an exception if any list element is null.
* do we need to have the component gracefully throw exceptions anytime
a dev makes an incorrect call sequence?
* should we add unit tests for every invalid and valid input parameter
combination we can think of? And of course add and test the software
to make all of these unit tests pass.
* etc.