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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:15:00+00:00 2026-05-12T20:15:00+00:00

I am torn between to DRY and loose coupling :( I have two sites

  • 0

I am torn between to DRY and loose coupling 🙁

I have two sites which you can link your account and then the sites can share data (via a RESTful api…)

one site is a media aggregation site and the other is a media store where people can buy digital media (music/photo/video).

My boss wants to emulate the itunes store and have a built-in store in the aggregation site where people can buy the stuff they like and have it added to their account automatically.

I have 99% of the templates and views (django) written for the store site, that I would need to display the content on the media site.

Should I just render the templates and deliver pre-rendered html (via api) to the media (aggregation) site, (and obey DRY) or should I deliver json to avoid tightly coupled custom templates on the store side?

Or maybe a hybrid design would work better? deliver pre-rendered chunks of html (like a top 10 products in a <ol>) and let the media site request the chunks it needs?

The hybrid design seems most promising to me (right now), but will probably result is a lot more api calls (and therefore more database queries)

What do you think?

edit – A new idea: (as seen in the comment) What do you think of having the store site loaded up with some custom css into an iframe?

I think that should eliminate confusion, reduce the amount of tightly coupled code to 2 of 3 dozen lines or so, and save me the massive headache of maintaining two sets of templates that are almost identical.

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

    The web designers are going to kill you when you spread the HTML over two sites, so one site should deliver (raw) data and the other site should decide how to render that data. Also, this is going to become a maintenance nightmare. Just imagine you have to fix a bug by staring at some HTML: How often are you going to ask yourself which of the two sites generated which part of the HTML?

    So let the store render the data structures it gets from the media site. The media site should send whole data structures (i.e. a list of the top 10, only the description, maybe as JSON, without formatting). This avoids unnecessary round trips.

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

Sidebar

Related Questions

I'm torn between two worlds, I have this very intuitive (but intricate) mechanism in
I'm kind of torn between these two error-handling models: Create a boolean Error and
I am torn in between two ways of structuring my database for processing orders.
I have a program that executes for 24 hours, then restarts. How can I
I am torn between PostgreSQL and MySQL. I am forced to install the chosen
Okay, so I have torn what I had down and am rebuilding it, here's
I'm kinda torn on this one... It could be a feature, because then if
I have been using Turbogears 1 for prototyping small sites for the last couple
I want to create a schema for a ACL; however, I'm torn between a
I am torn between the idea of using Html.RenderAction vs. Html.RenderPartial for partial views.

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.