Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Huh. 45 LOC for templating, routing, and form processing and you don't need to configure a different webserver since jetty is production quality. Do you have links to something that takes less effort than what is being illustrated here that can be deployed immediately into production and perform well?


Not to mention: middlewares, logging, stack traces, exception handling, testing, production/dev environments, e.t.c. in a similarly succinct manner.


Agreed. This strikes me as a more robust walk-through than traditional Hello World-esque tutorials; as such, there is a little more to do than you'd expect. I'd rather have the details provided here, and I suspect many other hackers would too.


It's interesting. I read your comment through the "backtype version" below the article, and, because it was out of context, I interpreted your meaning to be exactly the opposite of what I see it is now.


http://pastebin.com/PsecNBvB

(To be honest, I think clojure has its purposes, but a one-off calculator page isn't one of them. Use the right tool for the right job and all that.)


What point are you trying to make? That one can write less code if one does less stuff?


The parent asked for a link to something that takes less effort, I obliged. I don't think the amount of code is a particularly useful metric in most cases, but I would argue that the PHP+HTML solution is much clearer and easier to deploy, and taking into account everything you wish about such a simple web page (readability, maintainability, cross-server, security, etc.), takes less effort in the end. (I don't have any big issues with jetty or tomcat, since I use one or the other almost daily.) I'm sure there are larger use cases where clojure is simpler than raw PHP, but that's why PHP has frameworks.


why are some people so lazy and short sighted.

"time to make trivial webapp" is NOT a good reason to choose anything.


Are you serious? 45 LOC is not a good metric btw, why are you omitting all that boilerplate configuration. Any reasonable tutorial on PHP/python/RoR would build something more sophisticated more concisely. Here is a python tutorial: http://www.turbogears.org/2.0/docs/main/ToscaWidgets/forms.h...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: