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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:39:09+00:00 2026-05-31T09:39:09+00:00

In web frameworks like ruby on rails, any database queries needed to handle a

  • 0

In web frameworks like ruby on rails, any database queries needed to handle a specific request happen before a page is passed to the client in a controller class, but there’s nothing like that for clojure. Where should database queries and stuff like that be handled in a clojure web app? My gut tells me to call a function within a hiccup page and generate the HTML within that function, but I’m not really sure. Thank you for your time and consideration.

  • 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-31T09:39:11+00:00Added an answer on May 31, 2026 at 9:39 am

    There aren’t that many “full stack” web frameworks in Clojure and as far as I know most Clojure web applications aren’t built with one. There is a collection of frameworks and tools that handle a variety of things, but you’ll likely develop your application using these components as building blocks. You have a choice of routing functions, authentication, view rendering, templating, RESTful web services and persistence.

    Where particular things should go in your application depends on your architecture – a typical, 3-tier MVC web application looks different from a full blown scalable app that’s using CQRS, CEP and other fancy patterns that help you build the next Facebook or Twitter.

    If you design your web app conceptually with a 3-tier MVC architecture in mind, you’ll have a clear separation between your view layer, business logic, and persistence layer. Like Alex said in his answer – it’s probably the Controller that ties these things together. If you don’t have complex business logic, your controller will likely call functions from your persistence layer directly before passing it on to the logic that builds your views.

    For some situations, it might be useful to pull in data from your persistence layer in a “middleware” — that is a function that gets called by Ring every time a request comes in. This could be the stored information about a logged in user for example.

    • A number of options for your building blocks: Mature Clojure web frameworks?
    • Most (all?) of Clojure’s routing/request handling frameworks are built on top of Ring. An overview of what that looks like is here: http://brehaut.net/blog/2011/ring_introduction
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any c# web framework like Django or Ruby on Rails? I know
When a Web framework ( like django, ruby on rails, zend, etc ) isn't
Several frameworks for writing web-based desktop-like applications have recently appeared. E.g. SproutCore and Cappuccino
Since Rails is not multithreaded (yet), it seems like a threaded web framework would
There seem to be many excellent web frameworks for Python. Has anyone used any
Do the major web application frameworks (Rails, Django, etc) have libraries that provide functionality
When finding web hosting for Rails apps, the hoster must have support for ruby
I am considering ditching Ruby on Rails for my web-development pet-project and using a
I looked at Haskell web frameworks like Snap and Yesod. Most seem to implement
I'm looking for a way to handle integer ordinalization in Ruby/Rails, ie. st, nd,

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.