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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:53:59+00:00 2026-05-23T21:53:59+00:00

I am an experienced programmer and have used OOP a lot, so I’m very

  • 0

I am an experienced programmer and have used OOP a lot, so I’m very familiar with the concept. I’m also experienced in web development. What I’m not familiar with is how they go together. For example, say I am writing some forum software. I create a class that will handle and represent a “Post” by the user. I’ll create methods that load it from the database, methods that display it on the screen to read, and methods to allow the user to edit the content.

This is where my confusion comes it. I’ll instruct the Post object to load the content from the database then display it in a form for the user to edit. Where will the form submit its information? How do I send the information back to the Post object if it no longer exists on the server? Do I have to recreate the post object, feed it the form data, then execute the update method? Is there some way to make objects persistent on the server until they’re no longer needed?

I apologize if my questions don’t make a lot of sense. If I knew what to ask Google would have already answered my questions.

  • 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-23T21:54:00+00:00Added an answer on May 23, 2026 at 9:54 pm

    To deal with that problem, there is a popular pattern in OOP that’s called MVC (Model View Controller). Give it some reads for the theory and read some of the implementations around.


    This is where my confusion comes it. I’ll instruct the Post object to load the content from the database then display it in a form for the user to edit. Where will the form submit its information?

    To your webserver via HTTP.

    How do I send the information back to the Post object if it no longer exists on the server?

    From a persistent store, often this is a database.

    Do I have to recreate the post object, feed it the form data, then execute the update method?

    Yes, because of the stateless nature of a HTTP request that commands your application as the toplevel request.

    Is there some way to make objects persistent on the server until they’re no longer needed?

    Sure. There are object “freezers” that allow you to store objects persistently and if you don’t need them any longer, you remove them from the fridge.


    A PHP framework that has a MVC to offer is symfony2. It has some explanation how that MVC works in this article: Symfony2 versus Flat PHP which explains pretty well how MVC can work with any HTTP based PHP script/application.

    The sourcecode is located on github if you prefer reading code.

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

Sidebar

Related Questions

I'm pretty new to web design (but a very experienced programmer) and I'm creating
Most of experienced programmer knows data alignment is important for program's performance. I have
I have recently programmed a console application and I've experienced a lot of pain
I'm not an experienced C++ programmer and I'm having problems compiling. I've got a
I am not the most experienced GUI programmer, so bear with me here. I
This question is not coming from a programmer. (obviously) I currently have a programmer
I'm an experienced Java programmer that for the last two years have programmed for
I'm an experienced C++/.NET/Java Windows/web programmer trying to learn (Common) Lisp. I'm reading Practical
As a C programmer, I don't have much experience with exceptions. I'm rather used
Let me begin by saying I am not an extremely experienced programmer and would

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.