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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:57:21+00:00 2026-05-25T00:57:21+00:00

I am developing an Ajax-heavy application, where the user never navigates away from the

  • 0

I am developing an Ajax-heavy application, where the user never navigates away from the same page. However, there is going to dozens of different kinds of calls to the server for data and I’m confident this application will be added onto in the future. For each of these calls I’d need to check to make sure the user is (A) logged in (B) has sufficient permissions for their request, and then fill a bean with hibernate, and then convert it to either JSON, XML or an error/login message.

I know this possible with Struts, but is there any advantage to using it when I can just make a custom servlet controller that conceptually looks like this:

Controller extends Servlet
{
    status = checkLogin()
    if(status == SUCCESS)
        status = checkPermissions()
    if(status == SUCCESS)
        status = validateCommand()
    if(status == SUCCESS)
        bean = factory()
    if(status == LOGIN)
        promptLogin()
    else if(status == ERROR)
        toError(status)
    else if(isJson)
        toJson(bean)
    else
        toXml(bean)
}

I feel this would serve my purposes and is simpler/smaller but I am no means a Java expert so I’d appreciate some advice on this. My primary priorities are scalability and maintenance. Maybe there’s a better framework I should use? Thanks in advance!

  • 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-25T00:57:21+00:00Added an answer on May 25, 2026 at 12:57 am

    Alex, the idea to use any framework be it struts2/spring mvc is so take away the common code and let the developer concentrate on the business logic same is the case with you and in future as you have mentioned that it can grow to complex piece so its always better to use any of the existing framework and let them to handle the request flow cycle and you concentrate on the business logic

    Additional there is no benefits of re inventing the wheel when its already being developed and well tested by many others.
    As you said your primary goal is scalability and maintenance so i believe that its better to use some well known framework for this

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

Sidebar

Related Questions

I'm developing a Ajax based php application. As anybody knows, I'm checking whether user
I'm developing an ASP.NET application with C# and Ajax. I have a page that
I am currently developing an MVC application in ASP.net. I am using AJAX.ActionLink to
I'm currently developing an ajax application and I'm looking for a feature that lets
I'm developing some ajax script and using wordpress and my question is: is there
I am developing a web application, I need a modern photo gallary using ajax
I'm developing an ajax heavy web app, and would like to have textarea 's
I am developing a web application that uses JQuery AJAX and PHP to upload
i'm developing a widget that is fetching data from the internet via ajax and
I'm developing an ASP.NET MVC 3 application and I'm using SWFUpload to provide ajax

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.