From: Nick Malik [Microsoft] on
<frebe73(a)gmail.com> wrote in message
news:1157793451.449872.172010(a)i42g2000cwa.googlegroups.com...
>
> Is Guest/Premium the only way you need to classify users? What if you
> later find it that you need to have different functionality for
> domestic and international users? How would the user subtypes look like
> (DomestGuestUser, InternationalGuestUser, DomesticPremiumUser,
> InternationalPremiumUser)? What if yet another dimension is introduced.
> Subtyping can be very dangerous. It is very unlikely that a entity such
> as user only need to be classified in only one dimension.

Bridge Pattern

Haven't you read Design Patterns?

--
--- 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.
--


From: Nick Malik [Microsoft] on
<frebe73(a)gmail.com> wrote in message
news:1157899409.121392.234250(a)b28g2000cwb.googlegroups.com...
> Lets say we have a method processOrder and the behavior of this method
> depends both on the premium and domestic/international criteria. Where
> will we put the implementation? (I am not saying that subtyping and
> inheritence is a bad thing, I only trying to say that it is not very
> likely to be used a lot in enterprise (web) applications, as the OP
> already has found out).
>

Strategy pattern or Bridge pattern should take care of this rather nicely.
One Order object, with one ProcessOrder method.
Specific parts of the processing can be delegated to child objects
(strategy). If the order object itself is subclassed, then you have Bridge.
I don't know enough about the actual variations in this example to decide on
which implementation may work, but regardless, you do NOT have an explosion
of types if you use actual design patterns.

Useful Reference: http://en.wikipedia.org/wiki/Bridge_pattern

--
--- 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.
--


From: Nick Malik [Microsoft] on
"Stefan Ram" <ram(a)zedat.fu-berlin.de> wrote in message
news:markup-20060910132836(a)ram.dialup.fu-berlin.de...
> "H. S. Lahman" <h.lahman(a)verizon.net> writes:
>>[Apocryphal anecdote. A couple of years ago I saw an article in a
>>journal where the author actually claimed the first markup language was
>>invented in 1986. How soon they forget and repeat past mistakes.
>>Markup and scripting languages were very much in vogue in the late '50s
>>and '60s. But there was a reason why they were abandoned by the early
>>'70s.]
>
> Is there a source (preferably accessible via the Internet)
> where I can learn more about this, with names or examples of
> these languages and an explanation why they were abandoned?
>

There were literally dozens of markup languages. The markup language HTML
is a simplified version of SGML, which was not a language I personally
worked with. However, I did work with a couple of others (back in 1980,
when I was a technical markup editor).

Note: I define 'markup language' as any data format that is designed to
respresent the formatting of text whereby a human being would insert
'commands' directly into the text stream to indicate the formatting that
should be applied to the text by a computer program.

{Special note: if the language is so complex that a non-programmer cannot be
reasonably expected to learn it, and/or it is normally written by computer
programs as a storage and retrieval format, then I am not considering that
language to be a markup language, but rather a data storage mechanism.}

Examples of markup languages:
TRS-80 Scripsit http://en.wikipedia.org/wiki/Scripsit
PDP-11 TJ-2 http://en.wikipedia.org/wiki/TJ-2
Knuth's TEX: http://en.wikipedia.org/wiki/TeX
Wordstar: http://en.wikipedia.org/wiki/WordStar

What killed the markup language? WYSIWYG editing, notably including
Microsoft Word, Borland Amipro and, of course, WordPerfect.

When I first opened up an HTML page and looked inside, I felt like I tripped
back DECADES. I still feel that way sometimes as I watch the web make most
of the same decisions, however slowly, that evolved into client/server
computing on the Windows platform. Fashion and computing both appear to run
in multi-decade cycles.

--
--- 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.
--


--
--- 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.
--


From: Nick Malik [Microsoft] on
"Patrick May" <pjm(a)spe.com> wrote in message
news:m2irjo5dkn.fsf(a)Dagney.local...
> "topmind" <topmind(a)technologist.com> writes:
>> Patrick May wrote:
>>> "topmind" <topmind(a)technologist.com> writes:
>>> >> I was responding to your statement that people who find
>>> >> benefits in OO techniques don't understand procedural and
>>> >> relational techniques. That's not at all the case.
>>> >
>>> > It is what I encounter.
>>>
>>> Just to be clear, are you stating that everyone who finds some
>>> benefits in OO techniques does not understand procedural and
>>> relational techniques?
>>
>> No. I am only stating my experience.
>
> So you have never encountered a single developer who understands
> procedural and relational programming but still finds value in OO
> techniques? Not one?

Hello Patrick,

The person who calls himself 'topmind', while an intelligent and outspoken
individual, has been haunting this board for quite some time. He has been
challenged by dozens of folks, including yourself. Many of these folks *do*
understand both procedural and relational programming techniques. However,
if any of them came down on the side of OO, then -T- does not appear to
change his approach or ideas based on their feedback.

He is a dedicated individual, as you have discovered. I mean that as a
compliment. From his threads, topmind does not consider it to be 'evidence'
of anything if the preponderance of individuals whom he meets on this board
disagree with him. That would simply be an example of someone that he has
yet to convince.

With all due respect to -T-, many great thinkers were not appreciated by
their peers, but they persisted. That said, for every good idea that has
been championed by dedicated folks now recognized as visionary, there were
one hundred more ideas championed by people who were just as lucid,
dedicated, and persistent, but whose ideas have since been forgotten. In
the rapidly changing world of computing, I expect that any effect that
'topmind' hopes to create in the computing world will occur in the
relatively near-term future.

It's fun to discuss OO vs Relational with topmind... once. Some try more
than once. Don't expect to change his opinion, though.

--
--- 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.
--


From: Nick Malik [Microsoft] on
"Rick Elbers" <rick(a)elbers.org> wrote in message
news:kpf8g2dad2nrrncp52ls8c97ot43vpc4kp(a)4ax.com...

<<clip>>

> ps: A good two-tier framework is still not constructed imho. Even .net
> doesnt have for instance updatableViews.
>

Common misconception. The Dataset object is, in fact, completely updatable.
Since you can derive objects from this object, you can create a very clean,
typesafe, updatable view. See
http://msdn2.microsoft.com/en-us/library/esbykkzb.aspx

--
--- 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.
--