4 ms·
I think many people who defend Common Lisp in this thread never actually deployed web applications written in CL. I have. I had to seriously hack on Weblocks
by jwr 16y ago
I think many people who defend Common Lisp in this thread never actually deployed web applications written in CL.
I have.
I had to seriously hack on Weblocks just to get things to work they way they should. I had to work around various bugs and omissions. And worst of all, every once in a while I discovered that I am clearly the only user of said software.
A good example is when I discovered that the database interface (to CLSQL) isn't thread-safe. It was a quick hack intended for a single thread only. Obviously you'd never notice it in a demo setup. Turns out I noticed it just when somebody else had that problem and wrote CLSQL-FLUID.
But there is more — after running the application for several months I discovered two things:
a) there are obscure bugs related to caching in CLSQL, which I don't have time to hunt down (stale content is being served),
b) there are bugs somewhere either in CLSQL or Weblocks that blocked part of my admin interface and they are obscure enough that I don't even know where to start looking,
c) every once in a while SBCL will crash on me and land me in the LDB.
Don't get me wrong — I like CL and I invested a significant amount of work in to Weblocks — but I agree with Brian here: I don't want to discovere somewhere along the way that I'm the first real user. At least not when I am on a deadline.
I do most of my work in Clojure now, but when there is a simple web application to write — hey, we get our hands dirty and we do it using PHP. Because life is too short.
- Ixiaus 16y agoPHP works well as a DSL for web applications; I recently switched from PHP to Python + Pylons and am noticing significant differences in workflow. So significant that I can see, precisely, why PHP is so dominant. Python's features as a language completely overthrow those of PHP, though - I have no reason to go back. I've had my eye on Scheme as a potential web application environment for a year now. Maybe I'll make the jump soon, Racket (PLT-Scheme) looks like it would beat CL + Weblocks in maturity.
- jacquesm 16y ago> I recently switched from PHP to Python + Pylons and am noticing significant differences in workflow. Can you elaborate ?
- Ixiaus 16y agoI'm noticing that the idiom for WSGI based frameworks, is to "layer" applications (middleware), a lot like an onion. Certain actions/functionality is only available within specific layers of that onion. I quickly found out you can't just call redirect(url('some_route')) from within your helpers (or any module outside of the callable controller); the exception will be caught, but instead of redirecting it will display it as an error. In PHP, unless headers have already been sent, you can call this: header("Location: blablablabl") from wherever. That's just one example of the difference in workflow, it took me some getting used to before I could appreciate it. There are many other "little" things such as above, that are different. I'm loving Python + Pylons, the more I use it the more I get used to the workflow too...
- code_duck 16y agoI did the same, and the only difference in workflow I've observed that isn't positive is how I have to constantly restart Apache. If a project is absolutely tiny, like 10 lines, or utterly disposable, I'll still do it in PHP. Otherwise, I'd sooner quit coding and take up nude karaoke than do a new project in PHP.
- felideon 16y agoBefore jumping ship to Scheme, consider CL + Uncommon Web. It has a steep learning curve and documentation is no where near the level of Hunchentoot + CL-WHO, but UCW is a great framework for developing web applications and is used extensively by the Tech Co-op for real-world apps.
- oconnore 16y agoIt's rock solid for us, although we are using Elephant for disk storage, so I have no knowledge of the fluid library. http://groups.google.com/group/weblocks/browse_thread/thread/d50d6bebb88a1ddd/e21a1592901e90d9?lnk=gst&q=oddsknockout#e21a1592901e90d9 http://groups.google.com/group/weblocks/browse_thread/thread...
- tsally 16y agoAs Mahmud mentioned, you still have to know where things are, who is working on what, what's maintained and what's obsoleted by what. Sure.. Based on your choice of packages, you aren't current with these things and consequently had a bad experience. I'd be really interested in a pointer to a production web application deployed on Weblocks, because I'm pretty sure there isn't one (or very few). The choice of CLSQL as the back-end is dubious as well. In any case, I'm not a fan of using CL as the end to end solution for a web application. It performs far better as the middleware between the web front-end and dbase back-end. From my understanding, this is what ITA does (details in this thread: http://news.ycombinator.com/item?id=1479107 http://news.ycombinator.com/item?id=1479107). Who cares that you can't throw up a shiny front end right away if the code that does your business logic is an order of magnitude more shorter/powerful?
- hga 16y agoEspecially this item ^_^: http://news.ycombinator.com/item?id=1479272 http://news.ycombinator.com/item?id=1479272
- sedachv 16y agoI'm convinced that Weblocks is one of the worst things to have happened to web programming in Common Lisp. There are lots of very good CL libraries you can put together for developing web applications. Weblocks is a half-baked framework that adds needless constraints and complexity. I have seen (and had my hand in building a couple) technically (I'm not rich yet) successful CL web apps from these common libraries (Hunchentoot, CLSQL, etc). I have not seen any real-world Weblocks application, and the only one I've ever worked on is a mess. I'm not sure what Slava's goal was when he started Weblocks (he never intended to start a web startup at that time as far as I know), and neither do most of the developers that came after him (Slava stopped working on Weblocks long before RethinkDB) do full-time commercial Lisp web work. And that's the problem. Also, there is nothing about CLSQL that prevents writing race-free code. Sharing connections across threads without locks won't be race free (duh).
- coffeemug 16y agoI'm not sure what Slava's goal was when he started Weblocks. I had a lot of ideas about web development I wanted to try out because I believed (and still do) that given the right development environment we could make web applications responsive and interactive in a way that isn't manageable now because of complexity. I wanted a language that could support these ideas, and I picked Common Lisp. I think in practice Weblocks failed to make any of these ideas a reality because the design didn't account for a lot of complexity I didn't realize existed. I am still convinced that the original ideas were solid, and that someone, some day, will make them work in some form or another. I actually think Ruby on Rails is the worst thing that happened to web development, because it convinced almost everyone that web development is now a solved problem and this is as far we go. It isn't - we've only scratched the surface of what's possible. In terms of Weblocks though, Lisp is well known for insane expectations and few real world applications that satisfy them, so I think blaming it all on Weblocks is giving it too much credit :)
- cageface 16y agoI actually think Ruby on Rails is the worst thing that happened to web development, because it convinced almost everyone that web development is now a solved problem and this is as far we go. I don't know any Rails devs that think this. I constantly get the feeling when building Rails apps that there are still plenty of opportunities for making things easier and simpler. However, none of the alternatives are any better and most are far worse, particularly the current crop of half-hearted lisp & functional approaches. I'm still open to the idea that functional languages can be used as the basis of a superior framework but nobody's come close to demonstrating that yet. Redoing Sinatra in Clojure/Scala/Lisp/Haskell isn't going to get you even close.
- sedachv 16y agoTo follow up, I took a look at clsql-fluid. Weblocks uses CLSQL wrong: http://lists.b9.com/pipermail/clsql-help/2005-April/000416.html http://lists.b9.com/pipermail/clsql-help/2005-April/000416.h... Although it's not at all obvious from the documentation that you should use the with-database macro: http://clsql.b9.com/manual/with-database.html http://clsql.b9.com/manual/with-database.html I actually remember this tripped me up the first time I used CLSQL.