compojure

webjure vs compojure?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 17:31:31
问题 I've heard of two Clojure based web application frameworks: Webjure and Compojure. Can someone let me know which is better? 回答1: Now you can add Ring to the list. All of these frameworks are very new and likely to evolve (or die) quickly, but Compojure does seem to be the most actively developed based on the past 6 months or so. "Better" is too subjective a question to get a definitive answer to. Try them all and see what works. 回答2: Compojure has been working very well for me so far. I like

Use Friend for authentication and authorisation in a single page Clojure web application

烂漫一生 提交于 2019-12-04 12:21:05
问题 I am trying to integrate Friend authentication and authorisation into a Clojure/Compojure single-page web application. I have a login form backed by an Angular controller, and this controller uses AJAX to authenticate username and password against the web application and obtain an authenticated user record. Because of this, I do not want the default behaviour provided by the Friend form-based login - I basically want to rely on HTTP status codes and I do not want any of the Friend page

noir vs compojure?

你说的曾经没有我的故事 提交于 2019-12-04 09:01:29
问题 I'm having trouble understanding the point of clojure's Noir library. It seems to be a framework written on top of compojure that renames defroute to defpage and calls it a day. Obviously an unfair simplification, but what exactly does Noir bring to the table? Why would I use Noir instead of plain compojure+hiccup? EDIT/UPDATE: Noir is deprecated, interesting write up here: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/. 回答1: Compojure is a small framework that generates Ring

Local dependencies in Leiningen without creating a Maven repo?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 04:25:14
I'm building a Compojure web application, and I'd like it to use functions from another Clojure project I wrote. I'm not at all familiar with Maven, and from what I've heard, it has a very steep learning curve. Unfortunately, everything I've seen suggests using a private Maven repo as a dependency and doesn't suggest an alternative. I'd really like to avoid struggling with Maven if possible. Does anyone know of an alternative? I'm currently using the latest version of Leiningen. If the other project is also a lein project, you just need to do a "lein install" and that will take care of

Jar produced with lein uberjar fails on NoClassDefFoundError

烂漫一生 提交于 2019-12-04 03:23:26
问题 I have a simple web app with this project.clj: (defproject squirrel-money "1.0.0-SNAPSHOT" :description "Squirrel Money" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [compojure "0.5.3"] [ring/ring-jetty-adapter "0.3.5"] [hiccup "0.3.1"] [postgresql "8.4-701.jdbc4"] [clj-time "0.2.0-SNAPSHOT"]] :dev-dependencies [[lein-eclipse "1.0.0"]] :main squirrel-money.main :repl-init-script "src/squirrel_money/init_repl.clj") My main looks like this: (ns squirrel

Using Clojure with Vaadin

对着背影说爱祢 提交于 2019-12-03 22:49:57
Has anyone tried implementing a web application with Clojure ( using Compojure ) and Vaadin ? I had seen an article on using Clojure with JWT for creating web apps. Vaadin is based on GWT so you get a lot of the advantages of GWT ( though Vaadin is completely Server-centric). And Clojure gives the advantage that you can use any Java Based Framework, so what thoughts on the Clojure + Vaadin based web application ? I've created an article in Vaadin Trac wiki describing such integration: http://dev.vaadin.com/wiki/Articles/ClojureScripting Yes, created youcaneatat.com entirely in Clojure and

Serving app and api routes with different middleware using Ring and Compojure

我们两清 提交于 2019-12-03 16:16:52
问题 I have a ring+compojure application and I want to apply different middleware depending on whether the route is part of the web application or part of the api (which is json based). I found some answers to this question on stack overflow and other forums, but these answers seem more complicated than the solution I've been using. I wanted to know if there are drawbacks with how I'm doing it and what I may be missing in my solution. A very simplified version of what I'm doing is (defroutes app

How to deploy a clojure web application to Amazon EC2 (AWS Elastic Beanstalk + Leiningen + Compojure + Ring + Tomcat)

ⅰ亾dé卋堺 提交于 2019-12-03 13:03:53
问题 AS title, My IDE is intellij idea 12.1.4 , What toolkit or plugin do I need to be able to deploy clojure web application to Amazon EC2? Are there any link or reference or step by step solution ? thank you 回答1: If you are just deploying a war file with no other custom infrastructure then using EC2 directly is overkill and elastic beanstalk will do what you need far more easily. If you are growing something bigger, and want one click deployment then pallet is a great tool. There is a lot to

how does one _model_ data from relational databases in clojure?

☆樱花仙子☆ 提交于 2019-12-03 08:35:39
问题 I have asked this question on twitter as well the #clojure IRC channel, yet got no responses. There have been several articles about Clojure-for-Ruby-programmers, Clojure-for-lisp-programmers.. but what is the missing part is Clojure for ActiveRecord programmers . There have been articles about interacting with MongoDB, Redis, etc. - but these are key value stores at the end of the day. However, coming from a Rails background, we are used to thinking about databases in terms of inheritance -

Serving app and api routes with different middleware using Ring and Compojure

可紊 提交于 2019-12-03 06:18:25
I have a ring+compojure application and I want to apply different middleware depending on whether the route is part of the web application or part of the api (which is json based). I found some answers to this question on stack overflow and other forums, but these answers seem more complicated than the solution I've been using. I wanted to know if there are drawbacks with how I'm doing it and what I may be missing in my solution. A very simplified version of what I'm doing is (defroutes app-routes (GET "/" [req] dump-req) (route/not-found "Not Found")) (defroutes api-routes (GET "/api" [req]