• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Design advice

Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi fiends !
I want other point of view regarding the choice for Persistence lawer.
Interface or Abstract classes ?
I wait for some advice !
Thx in adv
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are only three general cases I use abstract classes for:
1) To dictate method procedure, as with a Template pattern
2) To define the general framework of class relationships, but leave certain implementation details wide open
3) As a specific case of 1) and 2), to dictate how a class must be constructed, but require all subclasses to implement one underlying type that puts it all together
After those cases, I'm hard-pressed to use an abstract class over an interface.
For the purposes of the exam, there's no advantage to using an abstract class that I can think of.
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
I promise I will be the best, most loyal friend ever! All for this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic