[ajug-members] design theory
Jason Chambers
yzxbmlf at gmail.com
Mon May 5 08:26:25 EDT 2008
A desirable goal in developing software is to achieve loose coupling.
Loose coupling is desirable because a system that has low degrees of
coupling is better positioned to withstand changes going forward.
Tightly coupled systems, and I think most of us have seen such systems
in our careers are the ones that are very fragile and can break very
easily. For example, you make a simple change to one area of code and
find out that it breaks other seemingly unrelated areas of
functionality. If you the developers are depressed and you here
constant chants of re-write, it's probably because the code-base is a
tightly-coupled ball of spaghetti.
Separating interface from implementation and binding to interfaces is
one technique to achieve loose coupling. This makes the system
flexible because you can rip out and replace implementations without
causing too many ripples through the code base. Dependency Injection
frameworks such as Spring Core and Guice (my new favourite) make it
easier to achieve this separation.
If a Formula 1 car was a tightly coupled system, if would take a lot
longer than 6s to change the wheel.
Jason
On May 4, 2008, at 5:50 PM, mcdaniel wrote:
> can someone tell me what design to an interface means- what i mean by
> this is that i know what it means by definition- because i read
> about it
> often- most oop examples are oak tree extends tree, implements
> growable,
> and then tree extends plantae... etc -then i see lots of code right
> up
> front as extends jframe, extends awprx.border etc; so... and this may
> be basic'ish, but what's a persons' example of design to the
> interface(s); by the way- i am enjoying learning java (i've programmed
> for years, but it has all been procedural) and tks for any
> (theory)input
> [i think that i just casted theory-traits onto what was an 'input'
> object]
>
> Shivraj Patil wrote:
>> answer is Spring oriented.
>> Design using Interfaces than Classes,
>> it gives us multiple inheritance and polymorphism benefit.
>> Enjoy!
>>
>> On Fri, May 2, 2008 at 9:51 PM, mcdaniel <521 at ofig.org
>> <mailto:521 at ofig.org>> wrote:
>>
>> i understand, this was not a question- like, from a test- it's
>> simply me
>> wondering... -i understand why it looks that way though...
>>
>> b
>>
>> Chris Fowler wrote:
>>> On Fri, 2008-05-02 at 21:38 -0400, mcdaniel wrote:
>>>
>>>> can anyone please answer my question?
>>>>
>>>
>>> Not good following a mailing list post asking for an answer to the
>>> question. You'll not get many answers that way.
>>>
>>> I did a quick google and found some answers
>>>
>>>
>> http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=27&t=002061
>> <http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=27&t=002061
>> >
>>>
>>> http://www.google.com/search?hl=en&q=Extend+Threads+vs
>> <http://www.google.com/search?hl=en&q=Extend+Threads+vs>
>>> +Runnable&btnG=Google+Search
>>>
>>>
>>>
>>>> barclay
>>>>
>>>>>>>>
>>>>
>>>> 5/1/2008; barclay wrote:
>>>>
>>>>> why would one ever "extend Thread" vs. "implementing
>> Runnable"? -are
>>>>> there speed gains/losses?
>>>>>
>>>>>
>>
>> ------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> ajug-members mailing list
>>>>> ajug-members at ajug.org <mailto:ajug-members at ajug.org>
>>>>> http://www.ajug.org/mailman/listinfo/ajug-members
>>>>>
>>>>>
>>>> _______________________________________________
>>>> ajug-members mailing list
>>>> ajug-members at ajug.org <mailto:ajug-members at ajug.org>
>>>> http://www.ajug.org/mailman/listinfo/ajug-members
>>>>
>>>
>>>
>>> _______________________________________________
>>> ajug-members mailing list
>>> ajug-members at ajug.org <mailto:ajug-members at ajug.org>
>>> http://www.ajug.org/mailman/listinfo/ajug-members
>>>
>>>
>>>
>>
>> _______________________________________________
>> ajug-members mailing list
>> ajug-members at ajug.org <mailto:ajug-members at ajug.org>
>> http://www.ajug.org/mailman/listinfo/ajug-members
>>
>>
>>
>>
>> --
>> Regards,
>> ShivRaj Patil
>> 4685, Apartment # K4
>> Atlanta, GA-30338
>> Cell: (908) - 720 0285
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ajug-members mailing list
>> ajug-members at ajug.org
>> http://www.ajug.org/mailman/listinfo/ajug-members
>>
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
More information about the ajug-members
mailing list