The Artima Developer Community
Sponsored Link

Java Buzz Forum
Interfaces and Abstract Classes - Don't design without them

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ben Hosking

Posts: 208
Nickname: hoskinator
Registered: Apr, 2006

Ben Hosking is Java Developer with about 5 years experience and interest in OO
Interfaces and Abstract Classes - Don't design without them Posted: May 30, 2006 10:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Ben Hosking.
Original Post: Interfaces and Abstract Classes - Don't design without them
Feed Title: A Funny Java Flavoured Look at the World
Feed URL: http://businesslogs.com/WebLog/RSS.xml
Feed Description: The blog looks at using Java and programming in general as it pops up in life as a Java programmer. It will have links to interesting Java articles and resources. It will also have a lot of SCJP Java 1.5 information and links as I am currently studying
Latest Java Buzz Posts
Latest Java Buzz Posts by Ben Hosking
Latest Posts From A Funny Java Flavoured Look at the World

Advertisement

Although this is a small article, which is some of the time is a good thing.  The article won't help you learn how to use Abstract classes or interfaces but it does explain why they are useful, particularly why they are useful when used with Object orientated programming.



It describes the way I view interfaces and abstract classes where the interface or abstract class becomes the type instead of just the class.  What this allows you to do is have many classes to become the same type as the interface or abstract class by implementing the interface or extending the abstract class.  In other words Interfaces allow you to use Polymorphism but without the hierarchy and coupling that comes with abstract classes.  This gives you good flexible points in your code where you can easily change the workings behind this type thus making your code easily changed in the future.  The use of interfaces also allows you to separate the code via the interface and decouple the code. 



I have blogged about Abstract classes versus Interfaces http://hoskinator.blogspot.com/2006/04/interfaces-vs-abstract-classes.html

 

but this articles takes a different approach by just describing the benefits and strengths of both.  It finally talks about the collections frameworks as a good example of interface and abstract class usage.



here's the link






I really enjoyed reading the article, especially the part about interfaces because although it wasn't very long it explained the benefits of using interfaces very succinctly

Read: Interfaces and Abstract Classes - Don't design without them

Topic: How should you deal with null's passed into methods Previous Topic   Next Topic Topic: [May 22, 2006 12:48 PDT] 14 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use