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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:19:49+00:00 2026-05-12T19:19:49+00:00

I’m trying to get my head around Cappuccino. I’d like my StackOverview peers to

  • 0

I’m trying to get my head around Cappuccino. I’d like my StackOverview peers to review the architecture below and see if it makes sense – the aim is to utilize the unique benefits of Django and Cappuccino without doubling up where the technologies overlap…

When the web browser requests a ‘friendly’ URL (eg, /, /articles, etc):

  • DJango’s urls.py matches this to a
    view.
  • The view, rather than doing
    DJangos typical work of filling in a
    template with the locals dict,
    returns the small ‘stub’ HTML used in
    a Cappuccino app directly.
  • The client receives the Cappuccino HTML
  • The client requests the Objective J JS
    URLs mentioned in the stub HTML
  • The end-user app is executed and
    displayed in the browser

The browser now has a working app. When the user does something that
requests something from the server:

  • The browser sends an XMLHTTPRequest to a URL.
  • Django’s URLs.py matches this to a
    view.
  • The view does it work, perhaps interacting with the DB model. But instead of returning a template, Django returns some JSON.
  • The client recieves the JSON, and
    does whatever it needs to do.

Does this make sense? We still have the benefit of friendly URLs, and the database being created for us to model our code. However rather than using templates, we’re providing Cappuccino stub pages and JSON responses, in order to give users something more like a real app and less like an HTML templating engine.

Is there perhaps a better way of doing things? What do other Pythonistas use? Thanks for your feedback.

  • 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-12T19:19:49+00:00Added an answer on May 12, 2026 at 7:19 pm

    For a low traffic site, using Django’s routing layer would be fine, but if you plan on getting a significant amount of traffic, you might consider having your proxying webserver handle the stubs.

    As for the rest, it works and the TurboGears community has been doing it for years (I was a TG committer so that’s what I normally use). The TG architecture of returning a dictionary to a template makes this trivial since you just set ‘json’ as your template engine.

    Doing the same thing in Django isn’t much more complicated. Just use the serialization tools to write the result to the response rather than using the templating calls.

    Note that when you do an architecture like this, it’s considerably easier to manage if you keep all the application logic in one place. Putting some app logic in Django and some in the browser causes things to start getting messy fairly quickly. If you treat your server as a dumb persistence layer (with the exception of validation/authentication/authorization), life is easier.

    FWIW, I find Sproutcore to be easier to work with than Cappuccino if you’re interested in heavier non-progressive enhancement frameworks.

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to render a haml file in a javascript response like so:
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.