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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:25:04+00:00 2026-05-28T20:25:04+00:00

Aspx page. many fields in the form we are representing all the fields in

  • 0

Aspx page.

many fields in the form

we are representing all the fields in a JS object.

we are only changing the status of the record in the UI to “0”. ( in the ui)

we need to save the new status in DB.


question :

should we

1) populate all the fields to the objects , send the whole object to server via ajax and walkthrough his fields in the server to see which has changed ?

or

2) generate a special command for changing status only , and send the command with ajax to the server ?

the first one is more OOP’ed but I dont find any logic at sending all the fields to the server – just to change the status…

p.s.

this is coming from an argue between me and a colleague

I suggested the second one. he , the first one

  • 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-28T20:25:05+00:00Added an answer on May 28, 2026 at 8:25 pm

    If you think of it from a CQS/CQRS perspective (command query separation / command query responsibility segregation), you’d go for the second approach (your approach) because what you’re describing is a specific command that you’re issuing and handling in your code. Your command that you’re sending up contains all the information needed to tell your system to do something (imperative tone). This way, you have code performing single responsibilities, which leads to more readable and more maintainable code.

    I’d side with you in your argument.

    Good luck!

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

Sidebar

Related Questions

I have many aspx page includes in my web form. I want to convert
I have many links in my page. For example <a href=/promotions/download/schools/australia.aspx>Australia</a> Now I want
I have many div in my aspx page. how to update the content of
I've created an .aspx page that consists of many custom .ascx controls and I'd
I am counting how many seconds it takes to go from aspx page 1
I have a TextBox in a Panel on an aspx page. I need to
I have an aspx page with many buttons and i have a search button
I have an aspx page with many buttons and i have a search button
Good Afternoon, I have a html aspx page that has many many div elements.
i have an aspx page which contains script references to many javascript and css

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.