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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:33:01+00:00 2026-05-28T07:33:01+00:00

In my app I have, for example, 3 logical blocks, created by user in

  • 0

In my app I have, for example, 3 logical blocks, created by user in such order:

FirstBlock -> SecondBlock -> ThirdBlock

This is no class-inheritance between them (each of them doesn’t extends any other), but logical-inheritance exists (for example Image contains Area contains Message). Sorry, I’m not strong in terms – hope you’ll understand me.

Each of blocks sends requests to server (to create infromation about it on server side) and then handles responses independently (but using same implementation of http client). Just like at that image (red lines are responses, black – requests).

http://s2.ipicture.ru/uploads/20120121/z56Sr62E.png

Question
Is it good model? Or it’s better to create a some controller-class, that will send requests by it’s own, and then handle responses end redirect results to my blocks? Or should implementation of http client be controller itself?

P.S. If I forgot to provide some information – please, tell me. Also if there a errors in my English – please, edit question.

  • 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-28T07:33:02+00:00Added an answer on May 28, 2026 at 7:33 am

    Here’s why I would go with a separate controller class to handle the HTTP requests and responses:

    • Reduce code duplication (do you really need three separate HTTP implementations?)
    • If/when the communication protocol between your app and server changes, you have to rewrite all your classes. Say for example you add another field to your response payload and your app isn’t built to handle it, you now have to rewrite FirstBlock, SecondBlock, and ThirdBlock. Not ideal.

    Modify your Implementation of HTTP client controller class such that:

    • All HTTP requests/responses go through it
    • It is responsible for routing the responses to the appropriate class.

    Advantages?

    • If/when you change the communication protocol, all the relevant code is in this controller class and you don’t have to touch FirstBlock, SecondBlock, or ThirdBlock
    • Debugging your HTTP requests!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

for example: I have app A, which references library A and library B. in
I have an app based on the CoreDataBooks example that uses an addingManagedObjectContext to
For example: First, say I have a Silverlight app with Windowless=true so that I
I am making an example app of a game. I have a folder i
This is a continuation of the question here: JBoss - does app have to
I have based my app upon the Core Data Books example project Apple provide
Ok this is going to sound strange, but I have inherited an app that
I have an example class book : public class Book { [Key] public int
How can I prevent a user from accessing my app at example.appspot.com and force
In my app, I have [for example] three controllers: groups , forums , and

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.