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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:48:26+00:00 2026-06-06T20:48:26+00:00

For the past few months, I’ve been using Ajax for purely UX purposes, i.e.,

  • 0

For the past few months, I’ve been using Ajax for purely UX purposes, i.e., allowing the user to submit forms, access content, etc, without having to reload or navigate away from the page. But, after reading an article about the benefits of using Node.js, I started thinking more about whether or not my application could benefit from submitting micro-requests to the server instead of, for instance, submitting the data from a giant form at once.

Now, the way my application works is my DomainObjects map pretty directly to both my db tables and also the forms in the view layer. So, for example,

class Demographics extends DomainObject {

    protected $first;
    protected $last;
    protected $middle;
    protected $ssn;

    // getter, setter methods


}

would have a form that contains inputs for all of the settable properties for the user to update. So, by this point, we have a Demographics object that holds the information for a person in my db. Well, currently, when the user updates the person’s information, the Demographics object is recreated using the data from the page (I’m hiding the customerID in the HTML and using it to re-instantiate the object), but now I’m wondering if this is 1. necessary and 2. good practice.

So, my main question is this: if I do decide to submit micro-requests via Ajax, would I actually need to re-instantiate the objects, or is there some sort of “thread” that keeps my PHP alive in between requests? (i.e., are previously instantiated objects accessible?).

Also, is this practice of recreating the DomainObject and hiding the row’s ID in the HTML common practice, or should this be avoided?

  • 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-06T20:48:27+00:00Added an answer on June 6, 2026 at 8:48 pm

    Every request cycle is its own thread, and that’s as it should be. You don’t want to have several different users sharing the same data. This looks a perfect example of a piece of data that should be stored in a database and retrieved on each request. However, your micro-Ajax request approach sounds like a good idea otherwise; each request could talk to a different table in the database and possibly a different URL entirely, and progress would be stored and recreated each time in the DB.

    As for your second question, I’d need to see some code to know what you’re trying to accomplish.

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

Sidebar

Related Questions

I've been using Heroku normally in the past few months. In the beginning, I
I have been using Grails for the past few months and I really like
I've been using Git for the past few months and love it. I looked
I've been developing a webapp using Linq to NHibernate for the past few months,
I have been using ASP.NET MVC for the past few months, after successfully ignoring
I've been learning about divs over the past few months, and am now able
I have just started learning NHibernate. Over the past few months I have been
For the past few years I have been using Gary Keith's browscap file to
I have been writing a userscript for the past few months, for my company,
My Delphi installation has been going downhill for the past few months. It seems

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.