Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 616539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:20:16+00:00 2026-05-13T18:20:16+00:00

This is in response to certain comments made by Zed Shaw in his blog

  • 0

This is in response to certain comments made by Zed Shaw in his blog a long while ago.

The experts will then saunter off to
implement their Flaming Tower of Babel
without any comments, horribly complex
mock enabled tests, making sure EVERY
SINGLE CLASS HAS AN INTERFACE, and
ending every class with “Impl”
because, well, that’s the best
practice.

I use Spring and Google Guice in equal measures and I’ve noticed that these frameworks do use the Impl postfix but sparingly. In my code, I use interfaces everywhere because I’ve been told that it makes it easier to mock etc. Do I have a naive understanding of the issue ? (Perhaps mock frameworks can work with abstract classes or classes, I don’t know. I have never tried) For my concrete implementations, I have chosen the Spring convention of prefixing the name of the implementation with the word Default.

e.g. BottleOpener (interface) is implemented by DefaultBottleOpener (class)

What is the best practice on this issue ?

UPDATE1 I find it useful to return an interface from a method because I can always return an anonymous class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:20:16+00:00Added an answer on May 13, 2026 at 6:20 pm

    It’s more than just mocks. In the case of Spring, it’s about dynamic proxies and aspect-oriented programming. That’s how Spring does transactions, remoting, and aspects of all types.

    I use interfaces for repositories, services, and the like, but I don’t put interfaces on model objects or anything else whose implementation isn’t likely to change.

    Interfaces separate APIs from how they’re implemented. If your implementation doesn’t change, an interface doesn’t make much sense.

    Zed Shaw is a terrific writer and developer, but take what he says with a grain of salt. I think some of the over the top hyperbole that he indulges in is for entertainment value. He’s got a point (“Don’t do things just because somebody who claims to be an authority tells you it’s a ‘best practice'”), but the way he’s saying it is part theater.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not certain if this will get much response due to the newness of Windows
I've got this response from JSOn web service: categoria = ( { id_categoria =
I get this response: {success:true,errorCode:-1,error:} No HTML inside the JSON, but the js say
If my cookie is set like this: Response.Cookies(Employees)(UserID) = 43 How do I get
I have stored the XML path to items in a string like this: response->items->item
I have this JSON response string: {d:{\ID_usuario\:\000130\,\Nombre\:null,\Vipxlo\:0,\Provmun\:null,\Descuentos\:null,\Listaviplocal\:null}}` With this code: - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
If i have this json response {error:repeated} Why the alert is not showed? It
I'm using the Google Maps API. Please see this JSON response . The HTML
In @mmalc's response to this question he states that In general you should not
Based on the response to this question: Why does C++ have header files and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.