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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:23:14+00:00 2026-05-29T05:23:14+00:00

This questions is conceptual, around the MVC pattern in OOP. Here is the plot:

  • 0

This questions is conceptual, around the MVC pattern in OOP. Here is the plot: We are in an rich client application which works with a REST webservice. We do a GET request to a ressource on the server, the server return a response formatted in XML. The response look like an RSS feed.
The client application need to parse and display this XML into a readable mod.

I’ve made a model object, which basically reflect a server database table, I also have a parser and a view controller (and obviously a view).

Here is how it works today.
The view controller tell the parser to start parsing, the parser (SAX type) read the XML, and instantiate a model object and load detail in it properties. Each time the parser is done with an item it notify the view controller troughs delegate method. It send the parsed item (the type is the model object) to the view controller. THe view controller add this item into a collection .

When the parser finished parsing the XML, it notify the view controller, then the view controller read each item if the collection and build the view.

Here are my questions.

  1. Is this a good implementation ?
  2. I think that the collection owner should be the model directly, so
    the view controller ask the model to start parsing, the parser
    notify the model instead of the view controller, and finally the model send back the collection to the view controller. Is this better ?
  3. Should I merge the model and the parser ?
  • 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-29T05:23:15+00:00Added an answer on May 29, 2026 at 5:23 am

    Here are some points about your question:

    1. MVC comes in variations. There is no strict rule as to whether the Model or Controller should notify the view about the state change, or an event. It all depends on specifics of application.
    2. Communication between Parser and View, the way you described it first, is probably not the right way to do it. It is better that the view gets a populated collection, instead of communicating back and forth with the Parser to build it. This is not the job of the View. And also, to spread a single function (like building the collection) across multiple components is not a good practice.
    3. Whether to include the Parsing in the model, or have a separate component, a Parser? I suggest you think of the Model in isolation from other parts of the application (for example that the view needs to display it etc). In that isolation, see if parsing is something that naturally belongs to the Model. If so, then include it in the model. Else, make it a separate component. My guess is that it does not belong to the Model and should be a separate component.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen this questions here . I'm wondering if there exists an official name
I have an interesting situation here this time. This more of a conceptual question,
This is related conceptually to my question here . However, I've been playing around
This questions is a follow up on an answer by Paul Alexander to the
This questions involves 2 different implementations of essentially the same code. First, using delegate
I know this questions has come up in various guises before, but this is
This is homework, and this questions Extends this one So there is a button
Hi I found this questions How to manipulate WPF GUI based on user roles
I believe this questions has been asked in some or the other way but
I feel a bit embarrassed asking this questions, but how the heck can I

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.