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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:41:21+00:00 2026-05-15T17:41:21+00:00

I having trouble figuring out the correct architecture for this kind of application: it’s

  • 0

I having trouble figuring out the correct architecture for this kind of application: it’s a diagramming application, which resembles MS Visio. The diagrams are used to generated data which is passed to another application.

When designing applications, I’ve always tried to used layering, but now I can’t decide how to do this when the data is so tightly coupled with the presentation. For example, a certain object in my canvas has a (X,Y) data, which is used for presentation purposes only, but has to be stored like domain data.

Where I’m getting things wrong? I’m pretty sure I’m looking at this from the wrong angle, but I can’t figure out the right one.

Thanks again!

UPDATE:

I’m also aware that maybe I shouldn’t be separating UI from domain in this case. If that is so, please provide me with some rational of when to apply separation and when not to.

  • 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-15T17:41:21+00:00Added an answer on May 15, 2026 at 5:41 pm

    In a diagramming tool the x/y position of a shape is part of the domain data (the location of the shapes is part of the diagram – you cant draw the diagram without it), the code that use those x/y coordinates and draw a shape on the screen is part of the presentation tier.

    I know some people think that data that is only used for display should be saved separately, but in every project I’ve ever worked on that saved data separately this turned up to be a huge maintenance and support nightmare.

    In a simple diagramming tool (if the tool just draws and edit the diagram without any fancy processing based on the diagram) there is no business logic, there’s only the code that draws and edit the diagram (that belongs in the presentation tier) and the diagram data (that is the domain model).

    If there is no business logic, by using a separate set of objects for domain and presentation you’ll have to duplicate all your model data twice (once in the model objects and once in the presentation objects) and you won’t get any advantages from separating the business logic from the presentation (because there isn’t any).

    On the other hand, if you do have some algorithms you run on the data you do have something to gain by separating the graph data from the drawing code – you can run the algorithm outside the tool, you can have better automated tests, etc.

    also if you write another system that operates on the same data you can at least share the model definition and save/load code if you separate it from the drawing code.

    So, let’s summarize:

    • All the diagram data is part of the model (including data only used for presentation purposes).

    • Anything that draws to the screen or handles user input is in the presentation tier (obviously).

    • If those two cover all your code and data than your application don’t have any “business logic” and the tier separation is probably overkill.

    • If you have any code that doesn’t fit into those two categories and you think it should be part of the model than you should build the two separate tiers.

    • If there’s any chance for code sharing between systems you should make sure the shared code is not mixed in with the presentation code.

    • And one last “bonus” point – if this is a project that’s likely to be in active development for a long time with new features added in the future – you may want to separate the UI/data anyway just to make future work easier – you have to decide if this future saving is worth the extra time now and if this separation is really likely to help in the future.

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

Sidebar

Related Questions

I'm having trouble figuring out how to exclude /public/bin from this rewrite rule RewriteCond
I'm having some trouble figuring out the best/Djangoic way to do this. I'm creating
I am having trouble figuring out how to implement this. I am returning user
I'm having trouble figuring out where I'm going wrong with this date formatting on
I'm having trouble figuring out a clean way to do this. Let's take for
I'm having trouble figuring out the correct syntax to integrate an emdash into a
I'm having trouble figuring out this query. I'm using PHP and postgresql 9.1. I
I'm working on my homework and am having trouble figuring out the correct syntax
I didn't write this code and I'm having trouble figuring out why I'm getting
I'm having some trouble figuring out the right selector syntax for this problem 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.