Parameterization - Generalisation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Could anyone give me some hints how I can evaluate the reuse potential of a
program related to the parameterisation and generalisation? - I think it
concerns at the one hand the interfaces...

Has anybody ideas?:((

regards

rob
 
Could anyone give me some hints how I can evaluate the reuse potential of
a
program related to the parameterisation and generalisation? - I think it
concerns at the one hand the interfaces...

Hi Rob,

Your post isn't clear about what you are looking for. If you have a portion
of an application that you want to re-use, OK... tell us what your goal is:
do you want to reuse an assembly? do you want to take an entire application
and modify it for new uses? do you want to take an application and replace
it's prior version in place? do you want to pull bits of code out of an
application and use that code in another application? do you want to expose
the capabilities of an application so that the capability can be re-used by
another application over an integration interface (RPC or Message)?

If you want to know if the code is "good," along the lines of OO principles,
you can evaluate the code according to basic principles and rate the
performance of the original developers on that basis. A good list of
principles (from Robert Martin) exists as http://butunclebob.com

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
Hello,

Oh, it was a principal questions evaluating the reuse potential of any
application. I read in an article (I do not know the source any longer.) that
a factor is if there are many or few parameters regarding the interfaces and
if there are generic or specific types referring to the interfaces of an
application. But I do not know how I should interpret this in the right
way...?:((

regards

rob
 
Hello Rob,

In general, an interface can be coupled to a type if that type is used as a
parameter or return type in the interface. Therefore, if one of the types
that your interface exposes, either as a parameter or as a returned type, is
a sealed type, then you have an interface that is not open for extension.
Technically, this means that the interface cannot ultimately demonstrate the
open-closed principle (that an object is open for extension but closed for
modification).

Note that most of the intrinsic types in .Net are sealed types, including
String. Personally, I find this irritating because, in my opinion, a URL is
a specialized string (for example) but it cannot be expressed as such.
Therefore, most of our interfaces suffer in some sense or another from this
kind of pernicious coupling.

As far as coupling to a specific or a generic type: technically any type
that is not sealed can be a generic type. However, the intention is to say
that binding to an abstract type or another interface is, on the surface,
"better" because any of the classes that implement the interface have
flexibility about what concrete type to return.

I'll be honest: I don't find this last bit of argument all that compelling,
and I would judge the other principles, as well as a clean use of patterns,
to be a better approach than evaluating a design solely on the basis of
coupling to an interface.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top