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 8184269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:26:41+00:00 2026-06-07T01:26:41+00:00

Developing small sample BookStore application and got a questions if someone explain to me

  • 0

Developing small sample BookStore application and got a questions if someone explain to me please.

Using Model 2 architecture (MVC) pattern with JSP & Servlet. Hoping to add CDI dependency injection.

Sorry for the trouble.

1 – Naming convention.

In the screenshot. Is my folder structure and naming files is correct?

Ex:

I named my files like:

BookRepository.java implements IBook = Data access layer. Methods to add,update,remove etc

IBook.java = Interface for above methods.

Online tutorial I am following uses file names like

BookRepositoryImpl.java = CRUD methods implementation

BookRepository = Interface

Question: Is there any specific convention when we name the files in JavaEE?

How do you name you files and packages?

BookStore Application

  • 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-06-07T01:26:43+00:00Added an answer on June 7, 2026 at 1:26 am

    There isn’t any one and only true convention for naming those artifacts in Java EE.

    It does however feels a bit strange if your entity/model is called Book, and that IBook is then an interface of a corresponding DAO/Repository. I would expect that to be IBookRepository instead.

    I mentioned that there aren’t any real conventions regarding the terms, but having said that ISomething for interfaces is not as common in Java as it’s in e.g. C#. Eclipse uses this convention and a few other projects also do, but it’s not that common.

    More common would be to use BookRepository for the interface and then SomeTechBookRepository for the implementation, where “SomeTech” could be e.g. “JPA” or “JDBC”. Also consider the term DAO instead of Repository.

    Another recent trend in Java EE is to forego the interface for the repository/dao if you don’t really need it yet (this topic is debatable). If you used the naming convention BookDAO for the implementation class and don’t have an interface, then it’s relatively easy later on to make BookDAO the interface and add e.g. a JPABookDAO.

    Finally a JSP / Servlet based approach is a bit out of date these days in Java EE. Java EE comes with a MVC framework out of the box (JSF) and support for Services/DAOs (EJB) and persistence (JPA). For a CRUD example of these technologies see: http://jdevelopment.nl/sample-crud-app-with-jsf-and-richfaces

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

Sidebar

Related Questions

I'm developing a small application using Blend, basically what I have in my application
I am developing a small application in Java. I am using Java2D Library for
I am new to nhibernate. I am developing a small c# application, using the
I am developing a small application in Java using Netbeans. I use a JFrame
I am developing a small desktop application with Java + Hibernate. I am using
I have been developing a small application in Python using the Web.py framework that
I am developing a small application and for that authentication is needed. That I'm
I am currently developing a small simulation utility, using the Task Parallel Library to
I am developing a small, internal-use only web application. Given its simple nature and
I'm currently developing a small, JavaScript based drawing application on iPad. I've simply wrapped

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.