3 ms·
This looks exactly like Perl's CGI.pm or CGI::Simple to me. That's not a bad thing. Most folks working other languages would do well to pick the most popula
by SwellJoe 20y ago
This looks exactly like Perl's CGI.pm or CGI::Simple to me.
That's not a bad thing. Most folks working other languages would do well to pick the most popular CPAN module for a given area and re-implement it in their preferred language as a way to get a jump on development. As some folks have done with Template::Toolkit for other languages.
But, I'm not sure I see what's interesting about UCW, other than being written in Lisp.
- joseph 20y agoUCW is based on continuations and allows you to code your web apps in a manner more like a desktop app. It was originally like a Lisp verison of Seaside, although I think it has evolved into its own personality. It's nothing like CGI.pm.
- henning 20y agoThis is much closer to the truth. AFAIK it uses some heavy-duty macrology and such-like to mechanically transform a subset of Lisp to continuation-passing style. It also has the obligatory HTML/Javascript generation stuff. It has been used for real-life client work but nothing high-traffic.
- SwellJoe 20y agoI didn't see any continuations in the first couple of pages of the docs. They merely looked like lisp versions of the examples for CGI.pm. If those first few examples aren't representative of UCW, then I'll happily retract my assertion.
- vikram 20y agoIt's an unnecessary detail (the continuation I mean) there is no need to bother the user of the framework with that detail. It's hidden in code like this... (call 'componentname :param1 value1 :param2 value2) and (defaction are-you-sure ((q question) answer) (if (string= answer "y") (call 'excellent) (call 'tobad))) Question excellent tobad represent pages/widgets. Here question probably has a form which has a field called answer and the submit binds to the action are-you-sure. Thing to note: The workflow is defined easily and is very clear. [sorry I couldn't get this to indent]
- mike_organon 20y agoContinuation-style webapps are supposed to make programming easier, but doesn't that contradict REST principles for webapps? I think it would be preferable to have a good framework (for lisp!) that supported REST-style. I would expect the continuations-style holding session state would lead to problems once you get past prototyping. Also, can you make cool urls for bookmarking?
- papersmith 20y agoAFAIK the continuation-passing style is designed to write desktop-like web apps with interactions too complex to model on plain HTTP. But if you have to use static URLs, you can still explicitly specify them.
- vikram 19y agoActually bookmarking is an issue with what I am doing so for now I'm using a redirect to get the url cleaned up. For example if you want to get timetable from London to Brighton then you search and the results are on a url like /timetable/london/brighton. There is a way to change the url but that only half works for me. I still get urls like timetable/?from=london&to=brighton
- lupin_sansei 20y ago"UnCommon Web provides developers with the illusion that web pages are nothing more than function calls" This sounds more like CGI::Application to me.
- SwellJoe 20y agoOK. So I should read deeper into the docs. But the first few pages of examples are straight out of CGI.pm.