--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
We’re a Python / Django shop, and some folks are getting excited about using Clojure for building web apps. Certainly there are numerous open-source options to assist us (Pedastal, Ring, Compojure, Caribou, etc), but I think it begs a larger question: as a rule, do web applications need the power that Clojure brings to the table?
Hi. I'm part of the Caribou team, which started as an in-house tool (and continues to serve that purpose).A few advantages of clojure in the webapp space, off the top of my head:
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Clojure provides execution efficiency that Ruby or Python cannot match. This translates to lowered hosting costs.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Clojure provides execution efficiency that Ruby or Python cannot match. This translates to lowered hosting costs.
The lein tool provides very clean and isolated dependency management, that makes setting up dev environments and deployment very straightforward.
Targeting the JVM means that each deploy can be a single jar or war file that you upload to the server.
The ring middleware system is a very clean way of including functionality in an app.
Working with immutable data structures and threadsafe bindings as a pervasive default does a lot for stability, and rules out many of the round about ways one of heisenbugs end up in the system.
I've also used Python extensively (and we still have some projects in it), but there is a lot of complexity in just dealing with the environments and dependencies (virtualenv is a standard practice now?) Once people have lein installed, they can download one of our Clojure projects and we know everyone is using the same version of everything without any hassle. It just works.
Framework vs. ecosystem of interoperable libraries. The monolithic framework (see Rails and Django) is not the way web development is done in Clojure. Instead imagine the Clojure world as a set of legos. You get to build whatever you want with your legos, selecting just the blocks you need, in the colors and sizes you want, and they all snap together [1]. The benefit to this approach is simplicity. There is a LOT to know about the Rails and Django frameworks, as they are big, mature things that have grown to solve all the common web development needs, and you start your development with ALL of that framework. Your starting point with Clojure on the other hand is much simpler. It will seem too simple... at first you'll be wondering... where is all the "stuff"? You start with maybe just ring and compojure (web middleware and routing) and a few lines of your code and your first couple of stories are already complete. You add libraries as you find you need them as you build out your app over time, but at all times your app is as simple as it can be, and only has the "stuff" it needs. It's therefore much easier to understand and less a "big ball of mud".
--
I don't believe the legos analogy is very accurate for clojure. Or, rather, it's more of a vision than a reality. I'm unaware of any libraries in clojure that you can piece together to give you the features of django-south, django admin, and the forms/validation/db layers, for example. Today, clojure web libraries are more like an auto parts store: your chance of putting together a complete car from the inventory is slim indeed, and your chance of doing it in a timely fashion is exactly zero.
Also, the overwhelming majority of db and web work is boilerplate. That's what django provides: all the mindless boilerplate that is completely uninteresting to your problem domain, but necessary to launch a web site.
On 14 November 2013 16:22, Brian Craft <craft...@gmail.com> wrote:I don't believe the legos analogy is very accurate for clojure. Or, rather, it's more of a vision than a reality. I'm unaware of any libraries in clojure that you can piece together to give you the features of django-south, django admin, and the forms/validation/db layers, for example. Today, clojure web libraries are more like an auto parts store: your chance of putting together a complete car from the inventory is slim indeed, and your chance of doing it in a timely fashion is exactly zero.Except people are developing web applications in Clojure, so clearly this isn't an accurate statement.
Also, the overwhelming majority of db and web work is boilerplate. That's what django provides: all the mindless boilerplate that is completely uninteresting to your problem domain, but necessary to launch a web site.This certainly hasn't been my experience.Can you be certain this isn't a symptom of the tool you're using? Frameworks like Django and Rails are designed to build web applications in a very specific way, and this involves generating a lot of database and HTML boilerplate.I can't say for sure whether it's because of Clojure, or because I'm working on different problems these days, but I don't tend to deal with the same issues I did when I used Rails. Nowadays I find myself building systems out of small, isolated components, which seem to eliminate a lot of issues Rails was designed to work around.For instance, database migrations. This was something I thought about a lot a few years ago, until I gradually realised that I wasn't finding myself in any situations where I needed them.
I agree with much of what you write James - I'm paid to write rails and
node.js code, and I'm finding that node is encouraging me to compose
small components and basically sidestep a lot of the issues that rails
is designed to address.
3) General lack of decent tools. The only jvm debugger, jdb,
while nice, does not allow you to attach to an already running
process like gdb would. Profiling tools are pretty much GUI
only so won't allow you to collect profiled data in an automated
way.
{:timestamp #inst "..."
:subject/id #uuid "..."
:subject/heart-rate 80}
{:timestamp #inst "..."
:subject/id #uuid "..."
:subject/hr-rest 80}
{:timestamp #inst "..."
:subject/id #uuid "..."
:subject/hr-max 180}
* Brian Craft <craft...@gmail.com> [2013-11-14 10:24 -0800]:
> On Thursday, November 14, 2013 9:42:52 AM UTC-8, Jonathan Irving wrote:
> >
> > I agree with much of what you write James - I'm paid to write rails and
> > node.js code, and I'm finding that node is encouraging me to compose
> > small components and basically sidestep a lot of the issues that rails
> > is designed to address.
> >
>
> Can you give a concrete example?
Tricky, because my work doesn't belong to me.
I have a component which collects weather forecasts from a public API
for all of the US. This is isolated from other parts of the app. It
acquires the data in one form, transcodes and strips it down, and puts
it into a mongodb.
Another component runs async map reduce ops on the data, creates
aggregated and otherwise reduced data.
Finally, there is a service endpoint which serves the product to another
component, which (irrelevantly) is a rails app.
Managing the data model for these components is trivial, because they
only touch one kind of data, and they are each very small. What the
rails app sees is a service endpoint with a well defined API. I use no
ODM or ORM, just mongodb queries.
On Thursday, November 14, 2013 10:50:48 AM UTC-8, Jonathan Irving wrote:
* Brian Craft <craft...@gmail.com> [2013-11-14 10:24 -0800]:> On Thursday, November 14, 2013 9:42:52 AM UTC-8, Jonathan Irving wrote:
> >
> > I agree with much of what you write James - I'm paid to write rails and
> > node.js code, and I'm finding that node is encouraging me to compose
> > small components and basically sidestep a lot of the issues that rails
> > is designed to address.
> >
>
> Can you give a concrete example?
Tricky, because my work doesn't belong to me.
I have a component which collects weather forecasts from a public API
for all of the US. This is isolated from other parts of the app. It
acquires the data in one form, transcodes and strips it down, and puts
it into a mongodb.
Another component runs async map reduce ops on the data, creates
aggregated and otherwise reduced data.
Finally, there is a service endpoint which serves the product to another
component, which (irrelevantly) is a rails app.
Managing the data model for these components is trivial, because they
only touch one kind of data, and they are each very small. What the
rails app sees is a service endpoint with a well defined API. I use no
ODM or ORM, just mongodb queries.Doesn't this reflect more on your problem domain than on your choice of tools? The first two components are roughly ETL, and the last is data API? How would this have been different in rails? I've done this in django, and it's the same as you describe here.But more to the point, the pieces you've mentioned can't be composed to build a web app with a UI,
and you can't decompose a web app with a UI into just the service layer bits. You also need the UI bits: the forms layer, the validation layer, the admin, etc., etc. To be maintainable, those layers should be common for different components in the application: it does not scale to require devs to learn multiple template languages, multiple migration tools, multiple admin interfaces, etc.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Folks,We’re a Python / Django shop, and some folks are getting excited about using Clojure for building web apps. Certainly there are numerous open-source options to assist us (Pedastal, Ring, Compojure, Caribou, etc), but I think it begs a larger question: as a rule, do web applications need the power that Clojure brings to the table?Other folks on my team are telling me that solutions built with Python / Django (or even RubyOnRails) fully satisfy the needs of 99% of the web apps we have built, and that Clojure offers nothing new to this problem space.So, here’s the question: How are you are actually using Clojure, and why did you choose to use it, particularly in the “web application” space?Thanks,Marcus
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/ZxUUBlYf1ck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For me it's about 1 thing: Data.
A web application is about taking data from the user, transform it and store it on the database and take data from the database, transform it and show it to the user.
Clojure is the best language I used to work with data, it just gives you a composable set of tools and then get out of your way, and there's always macros for the more complex use cases.
We have a web application that serves edn data to our clojurescript frontend, our webdevelopers created a new site for mobile in backbone.js that used json, I had just to create a function (ring middleware) that transformed my edn data to json based on the accept header.
My 2¢
On Thursday, November 14, 2013 9:11:04 AM UTC+1, Bastien Guerry wrote:Marcus Blankenship <mar...@creoagency.com> writes:
> Brian, that’s really interesting. I think we’re seeing something
> similar, and are going to look at Pedestal and Caribou as options for
> a project we’re working on. Are their others we should consider?
Perhaps you should consider starting from scratch, in parallel.
Maybe that's because I'm a beginner in both the language and in web
development, but so far I've found it's the best way to understand the
choices behind framaworks. Otherwise I would confuse "web development"
with those choices, and I feel the richness of the Clojure ecosystem
is precisely to open your mind about "web development".
2 cents,
--
Bastien