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

  • Home
  • SEARCH
  • 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 6540767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:01:11+00:00 2026-05-25T11:01:11+00:00

I know that many people suggest grouping Spring controllers by page, i.e. LoginPageController and

  • 0

I know that many people suggest grouping Spring controllers by page, i.e. “LoginPageController” and “LandingPageController,” etc. So the GET handler and other request handlers for the login page are in LoginPageController.

I like this organization most of the time, but lately I’m adding more AJAX functionality, some of which can be reused across many pages and isn’t necessarily tied to a single page. I’m wondering what other people are doing in this situation. Maybe make a package for general purpose controllers and try to categorize them in there?

Any advice would be great!

  • 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-25T11:01:12+00:00Added an answer on May 25, 2026 at 11:01 am

    I prefer to group by function. Given your example, I would have a ProjectController that handles both the pages related to Projects as well as the Ajax calls that get/update project data.

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

Sidebar

Related Questions

I know that many people have had this problem... but I am now having
I know that many people use Sinatra when programming webapps in Ruby because they
I know that many people, at a first glance of the question, may immediately
Similar to Google docs in that many people can edit real time. I know
I know that there are many free and not so free compression libraries out
I know that there are many Delphi database related questions available, but I'm considering
Firstly I know that there are many question and solutions to correct thread marshalling
It's my first question on SO. I know that there were many topics on
I think many developers know that uncomfortable feeling when users tell them that The
I know that there are so many standards for writing code. And some policy

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.