From edi at agharta.de Wed Apr 1 10:23:58 2009 From: edi at agharta.de (Edi Weitz) Date: Wed, 1 Apr 2009 12:23:58 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090331161200.GA22421@cupid.theclapp.org> References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: For this kind of cooperation, people usually use templating systems like, for example, my HTML-TEMPLATE. My experience is that this works quite well, at least to a certain extent. Edi. On Tue, Mar 31, 2009 at 6:12 PM, Larry Clapp wrote: > Hi, list, > > I am developing my first web app of any kind. ?I've no experience with > other web app frameworks (like RoR or what have you). ?I am working > with a friend, who knows Dreamweaver and other fairly high level > web-design tools, but can't code at all. ?On the other hand, I don't > know web-design at all, using tools or not, so we're pretty > complementary. > > So I'm seeking guidance on how I can continue to develop using > Hunchentoot and cl-who, and yet integrate machine-generated html or > css or what have you from Dreamweaver or other tools? > > As I understand it, this is a known difficulty that other teams and > tool designers have faced, and if I'd ever worked with any other teams > or tools then it might be a no-brainer, but given my lack of > experience in this respect I'm not even sure what to Google to find > answers for myself. > > I'd appreciate any advice, links, pointers, etc, that users of > Hunchentoot and/or cl-who could provide. ?Thanks! > > -- Larry Clapp > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > From mail at chaitanyagupta.com Wed Apr 1 10:14:39 2009 From: mail at chaitanyagupta.com (Chaitanya Gupta) Date: Wed, 01 Apr 2009 15:44:39 +0530 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090331161200.GA22421@cupid.theclapp.org> References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: <49D33E8F.7000903@chaitanyagupta.com> Hi Larry, If you are working with a web designer -- who can do HTML/CSS, or, as in your case, you use HTML generated by some web-design tool -- I don't believe cl-who works out very well in this setup. But if you really want it, you can try using cl-who with cl-emb: http://common-lisp.net/project/cl-emb/examples.html Personally, I would prefer to use a simple templating language like html-template. Cheers, Chaitanya Larry Clapp wrote: > Hi, list, > > I am developing my first web app of any kind. I've no experience with > other web app frameworks (like RoR or what have you). I am working > with a friend, who knows Dreamweaver and other fairly high level > web-design tools, but can't code at all. On the other hand, I don't > know web-design at all, using tools or not, so we're pretty > complementary. > > So I'm seeking guidance on how I can continue to develop using > Hunchentoot and cl-who, and yet integrate machine-generated html or > css or what have you from Dreamweaver or other tools? > > As I understand it, this is a known difficulty that other teams and > tool designers have faced, and if I'd ever worked with any other teams > or tools then it might be a no-brainer, but given my lack of > experience in this respect I'm not even sure what to Google to find > answers for myself. > > I'd appreciate any advice, links, pointers, etc, that users of > Hunchentoot and/or cl-who could provide. Thanks! > > -- Larry Clapp > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > -- http://chaitanyagupta.com/blog/ From achambers.home at googlemail.com Wed Apr 1 10:34:37 2009 From: achambers.home at googlemail.com (Andy Chambers) Date: Wed, 1 Apr 2009 11:34:37 +0100 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090331161200.GA22421@cupid.theclapp.org> References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: On Tue, Mar 31, 2009 at 5:12 PM, Larry Clapp wrote: > Hi, list, > > I am developing my first web app of any kind. ?I've no experience with > other web app frameworks (like RoR or what have you). ?I am working > with a friend, who knows Dreamweaver and other fairly high level > web-design tools, but can't code at all. ?On the other hand, I don't > know web-design at all, using tools or not, so we're pretty > complementary. > > So I'm seeking guidance on how I can continue to develop using > Hunchentoot and cl-who, and yet integrate machine-generated html or > css or what have you from Dreamweaver or other tools? > > As I understand it, this is a known difficulty that other teams and > tool designers have faced, and if I'd ever worked with any other teams > or tools then it might be a no-brainer, but given my lack of > experience in this respect I'm not even sure what to Google to find > answers for myself. > > I'd appreciate any advice, links, pointers, etc, that users of > Hunchentoot and/or cl-who could provide. ?Thanks! It would be fairly simple to write an XSLT stylesheet that converts the output of Dreamweaver (or whatever) into cl-who style forms. You take those forms, manually strip out the "Lorum Ipsum ...." content and replace it with forms that generate the actual data. I haven't actually done this myself (not fortunate enough to know a graphics person to help me) but given your constraints, that's how I'd probably do it. Another approach would be to turn the process on it's head. Have cl-who generate a static page with no style information at all and give that to the graphics guy. He then has to figure out the correct CSS incantations to make the page look equally pretty on all browsers. -- Andy From rohan.nicholls at googlemail.com Wed Apr 1 13:39:32 2009 From: rohan.nicholls at googlemail.com (Rohan Nicholls) Date: Wed, 1 Apr 2009 15:39:32 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: On Wed, Apr 1, 2009 at 3:37 PM, Rohan Nicholls wrote: > cl-emb might be able to handle the <% %> tags as a recent version Oops, that was supposed to say "Dreamweaver might be able to handle ...". Sorry. Rohan From rohan.nicholls at googlemail.com Wed Apr 1 13:37:50 2009 From: rohan.nicholls at googlemail.com (Rohan Nicholls) Date: Wed, 1 Apr 2009 15:37:50 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: Having looked around at the options listed so far, I would have to say HTML-TEMPLATE is looking like your best bet, as it is not going to make a horrible mess in dreamweaver. It looks a little verbose, but that should help keep as much of the logic out of the html and in the code as possible. cl-emb might be able to handle the <% %> tags as a recent version seems familiar with server-side tags, but the thing I hate about these systems is that you end up with a big fat mess that cannot be seen properly, and embedding the language in the html leads to madness, I have been down that road, and have never been the same. :) cl-who is definitely NOT what you want to be working with, it will not allow for an easy back and forth between the two of you. I like cl-who for my own stuff but it is completely unfriendly to projects where you have a division of skills. I have never found the ideal way to handle this, plone templates come close, because they embed everything in tags, and extend the xhtml namespace, very nice, but you pay with a sacrifice if power. Personally I like cl-who but would never want to work with a visual/web designer with it. My 2 cents, I hope it helps. ;) Rohan P.S. I think the xslt idea is neat (despite my aversion to xslt itself), but will not help your situation. On Wed, Apr 1, 2009 at 12:23 PM, Edi Weitz wrote: > For this kind of cooperation, people usually use templating systems > like, for example, my HTML-TEMPLATE. ?My experience is that this works > quite well, at least to a certain extent. > > Edi. > > On Tue, Mar 31, 2009 at 6:12 PM, Larry Clapp wrote: >> Hi, list, >> >> I am developing my first web app of any kind. ?I've no experience with >> other web app frameworks (like RoR or what have you). ?I am working >> with a friend, who knows Dreamweaver and other fairly high level >> web-design tools, but can't code at all. ?On the other hand, I don't >> know web-design at all, using tools or not, so we're pretty >> complementary. >> >> So I'm seeking guidance on how I can continue to develop using >> Hunchentoot and cl-who, and yet integrate machine-generated html or >> css or what have you from Dreamweaver or other tools? >> >> As I understand it, this is a known difficulty that other teams and >> tool designers have faced, and if I'd ever worked with any other teams >> or tools then it might be a no-brainer, but given my lack of >> experience in this respect I'm not even sure what to Google to find >> answers for myself. >> >> I'd appreciate any advice, links, pointers, etc, that users of >> Hunchentoot and/or cl-who could provide. ?Thanks! >> >> -- Larry Clapp >> >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel >> >> > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From stesch at no-spoon.de Wed Apr 1 13:59:45 2009 From: stesch at no-spoon.de (Stefan Scholl) Date: Wed, 1 Apr 2009 15:59:45 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: <20090401135945.GC32689@parsec.no-spoon.de> On 2009-04-01 15:37:50, Rohan Nicholls wrote: > Having looked around at the options listed so far, I would have to say > HTML-TEMPLATE is looking like your best bet, as it is not going to > make a horrible mess in dreamweaver. It looks a little verbose, but > that should help keep as much of the logic out of the html and in the > code as possible. > > cl-emb might be able to handle the <% %> tags as a recent version > seems familiar with server-side tags, but the thing I hate about these > systems is that you end up with a big fat mess that cannot be seen > properly, and embedding the language in the html leads to madness, I > have been down that road, and have never been the same. :) Just because it is possible to embed Common Lisp with CL-EMB doesn't mean you have to. -- Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/ From rohan.nicholls at googlemail.com Wed Apr 1 14:24:54 2009 From: rohan.nicholls at googlemail.com (Rohan Nicholls) Date: Wed, 1 Apr 2009 16:24:54 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090401135945.GC32689@parsec.no-spoon.de> References: <20090331161200.GA22421@cupid.theclapp.org> <20090401135945.GC32689@parsec.no-spoon.de> Message-ID: On Wed, Apr 1, 2009 at 3:59 PM, Stefan Scholl wrote: > On 2009-04-01 15:37:50, Rohan Nicholls wrote: >> Having looked around at the options listed so far, I would have to say >> HTML-TEMPLATE is looking like your best bet, as it is not going to >> make a horrible mess in dreamweaver. ?It looks a little verbose, but >> that should help keep as much of the logic out of the html and in the >> code as possible. >> >> cl-emb might be able to handle the <% %> tags as a recent version >> seems familiar with server-side tags, but the thing I hate about these >> systems is that you end up with a big fat mess that cannot be seen >> properly, and embedding the language in the html leads to madness, I >> have been down that road, and have never been the same. :) > > Just because it is possible to embed Common Lisp with CL-EMB > doesn't mean you have to. I agree, however it is a very slippery slope. The way to hell and all that. I am sure most of the projects I have worked on started with the best of intentions. :) Rohan From rflug05 at gmail.com Wed Apr 1 22:00:52 2009 From: rflug05 at gmail.com (Nick Allen) Date: Wed, 1 Apr 2009 15:00:52 -0700 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: Hello Larry I emphatically second everyone else's advice: If you want to work with a designer you need to use a templating system. As someone who has actually journeyed down the other path and worked with a designer to engineer a reasonably complex web app using an embedded lisp approach (http://github.com/nallen05/watershed) I can tell you that it was without a doubt the worst technical decision of my life and it resulted in much wailing and gnashing of the teeth from everyone involved, including myself... Thankfully, for the next iteration of the same project, I had a chance to port of the Django templating language to Common Lisp: http://cloud.github.com/downloads/nallen05/djula/generated-documentation-djula-v0.2.html http://github.com/nallen05/djula and it was very much well received by both the designer and programmers involved until the project was finally ported to Python sometime after I left. Anyways, good luck with your project Take care Nick On Wed, Apr 1, 2009 at 3:23 AM, Edi Weitz wrote: > For this kind of cooperation, people usually use templating systems > like, for example, my HTML-TEMPLATE. ?My experience is that this works > quite well, at least to a certain extent. > > Edi. > > On Tue, Mar 31, 2009 at 6:12 PM, Larry Clapp wrote: >> Hi, list, >> >> I am developing my first web app of any kind. ?I've no experience with >> other web app frameworks (like RoR or what have you). ?I am working >> with a friend, who knows Dreamweaver and other fairly high level >> web-design tools, but can't code at all. ?On the other hand, I don't >> know web-design at all, using tools or not, so we're pretty >> complementary. >> >> So I'm seeking guidance on how I can continue to develop using >> Hunchentoot and cl-who, and yet integrate machine-generated html or >> css or what have you from Dreamweaver or other tools? >> >> As I understand it, this is a known difficulty that other teams and >> tool designers have faced, and if I'd ever worked with any other teams >> or tools then it might be a no-brainer, but given my lack of >> experience in this respect I'm not even sure what to Google to find >> answers for myself. >> >> I'd appreciate any advice, links, pointers, etc, that users of >> Hunchentoot and/or cl-who could provide. ?Thanks! >> >> -- Larry Clapp >> >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel >> >> > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From larry at theclapp.org Thu Apr 2 11:59:05 2009 From: larry at theclapp.org (Larry Clapp) Date: Thu, 2 Apr 2009 07:59:05 -0400 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090331161200.GA22421@cupid.theclapp.org> References: <20090331161200.GA22421@cupid.theclapp.org> Message-ID: <20090402115905.GF22421@cupid.theclapp.org> On Tue, Mar 31, 2009 at 12:12:00PM -0400, Larry Clapp wrote: > I am developing my first web app of any kind. [snip] > I'd appreciate any advice, links, pointers, etc, that users of > Hunchentoot and/or cl-who could provide. Thanks! Thanks to all who replied! I'll definitely look into templating mechanisms. -- Larry From zaries at global.co.za Thu Apr 2 14:46:02 2009 From: zaries at global.co.za (Phil Marneweck) Date: Thu, 02 Apr 2009 16:46:02 +0200 Subject: [hunchentoot-devel] Using Hunchentoot and cl-who with other people (non-coders) In-Reply-To: <20090402115905.GF22421@cupid.theclapp.org> References: <20090331161200.GA22421@cupid.theclapp.org> <20090402115905.GF22421@cupid.theclapp.org> Message-ID: <1238683562.22603.3.camel@scatha> I taught my web designer how to use cl-who in in an hour, because it looks very close to the actual html I think. On Thu, 2009-04-02 at 07:59 -0400, Larry Clapp wrote: > On Tue, Mar 31, 2009 at 12:12:00PM -0400, Larry Clapp wrote: > > I am developing my first web app of any kind. > [snip] > > I'd appreciate any advice, links, pointers, etc, that users of > > Hunchentoot and/or cl-who could provide. Thanks! > > Thanks to all who replied! I'll definitely look into templating > mechanisms. > > -- Larry > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From bvds at asu.edu Thu Apr 9 00:16:47 2009 From: bvds at asu.edu (Brett van de Sande) Date: Wed, 8 Apr 2009 17:16:47 -0700 (MST) Subject: [hunchentoot-devel] Using json-rpc and Hunchentoot Message-ID: <20090409001647.52BF48B80E6@gideon.eas.asu.edu> I am developing a Hunchentoot server that communicates using json-rpc 2.0. The default Hunchentoot error messages are html formatted and I need to make a json-rpc version of these messages. I see that I can use *http-error-handler* to make a custom error message for a given error code in whatever format I like. That works just fine. However, the default Hunchentoot error messages have additional (important) information, such as the actual lisp error message for a lisp error. (This is given in the "content" argument of the function "start-output" in headers.lisp.) I need to be able to include this additional information in my json-rpc formatted error messages. How would I do this? Brett van de Sande From sky at viridian-project.de Thu Apr 9 07:45:46 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Thu, 9 Apr 2009 09:45:46 +0200 Subject: [hunchentoot-devel] Using json-rpc and Hunchentoot In-Reply-To: <20090409001647.52BF48B80E6@gideon.eas.asu.edu> References: <20090409001647.52BF48B80E6@gideon.eas.asu.edu> Message-ID: <20090409074546.GC25655@viridian-project.de> On Wed, Apr 08, 2009 at 05:16:47PM -0700, Brett van de Sande wrote: > However, the default Hunchentoot error messages have additional (important) > information, such as the actual lisp error message for a lisp error. > (This is given in the "content" argument of the function "start-output" > in headers.lisp.) I need to be able to include this additional information > in my json-rpc formatted error messages. > > How would I do this? In Weblocks we have put a HANDLER-CASE around our request handler to catch internal errors outselves and then display the appropriate error message. From hans.huebner at gmail.com Thu Apr 9 08:01:00 2009 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Thu, 9 Apr 2009 10:01:00 +0200 Subject: [hunchentoot-devel] Using json-rpc and Hunchentoot In-Reply-To: <20090409074546.GC25655@viridian-project.de> References: <20090409001647.52BF48B80E6@gideon.eas.asu.edu> <20090409074546.GC25655@viridian-project.de> Message-ID: On Thu, Apr 9, 2009 at 09:45, Leslie P. Polzer wrote: > On Wed, Apr 08, 2009 at 05:16:47PM -0700, Brett van de Sande wrote: >> However, the default Hunchentoot error messages have additional (important) >> information, such as the actual lisp error message for a lisp error. >> (This is given in the "content" argument of the function "start-output" >> in headers.lisp.) ?I need to be able to include this additional information >> in my json-rpc formatted error messages. >> >> How would I do this? > > In Weblocks we have put a HANDLER-CASE around our request handler > to catch internal errors outselves and then display the appropriate > error message. If you want to deliver a 500 HTTP status code, put 500 to the HUNCHENTOOT:*APPROVED-RETURN-CODES* list in order to prevent Hunchentoot's error handling mechanism intercept and mess with the response. Edi and I discussed that topic yesterday and we think that there are some improvements to be made in how Hunchentoot handles errors. Expect changes in that area. -Hans From asf at boinkor.net Thu Apr 9 10:30:49 2009 From: asf at boinkor.net (Andreas Fuchs) Date: Thu, 9 Apr 2009 12:30:49 +0200 Subject: [hunchentoot-devel] New releases of Hunchentoot, Drakma, and Chunga In-Reply-To: <9514BC01-E900-40EE-A393-31C63E2E9BDA@crispylogics.com> References: <61169.88.73.252.233.1235074162.squirrel@mail.stardawn.org> <89dc7c5b0902191516p3bf140ccp2c11d0cc210e02cf@mail.gmail.com> <9514BC01-E900-40EE-A393-31C63E2E9BDA@crispylogics.com> Message-ID: On Fri, Feb 20, 2009 at 12:34, Jochen Schmidt wrote: >> *BREAK-ON-SIGNALS* is better than what Hunchentoot previously had - >> You're sent to a the debugger, making actual analysis possible, and >> the technique works everywhere, not just in Hunchentoot. > > Thats actually not a feature. With *catch-errors-p* you ended up > within an debugger too and it was actually a good thing that it was > restricted to hunchentoot. *break-on-signals* is definitely the wrong > tool to do that! Following the dev-tree for some time now I have just > setup my own error handling using handler-bind in a custom dispatcher > - similar to what Edi outlined in his answer. It should at least be > documented how to properly install such a hunchentoot specific error- > handler, because it might not be obvious to everyone. The new > hunchentoot is meant to be more customizable - it actually is, because > of fantastic the merits of CL like handler-bind - It would have been > nicer (from a library designer perspective) to have this integrated > within the protocols though. So, I just spent a few hours (successfully) hemming and haw-ing about how to put these suggestions into real code, and this is what I came up with: ;;; An acceptor that invokes the debugger on errors: (defclass debuggable-acceptor (hunchentoot:acceptor) ()) (defmethod process-connection ((*acceptor* debuggable-acceptor) (socket t)) (declare (ignore socket)) (handler-bind ((error #'invoke-debugger)) (call-next-method))) (defmethod acceptor-request-dispatcher ((*acceptor* debuggable-acceptor)) (let ((dispatcher (call-next-method))) (lambda (request) (handler-bind ((error #'invoke-debugger)) (funcall dispatcher request))))) In my development system, I then do (make-instance 'debuggable-acceptor :port 4242) instead of 'hunchentoot:acceptor, and error conditions pop up a swank debugger again. Hope this is useful for everyone else, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs From bvds at asu.edu Thu Apr 9 16:09:03 2009 From: bvds at asu.edu (Brett van de Sande) Date: Thu, 9 Apr 2009 09:09:03 -0700 (MST) Subject: [hunchentoot-devel] Using json-rpc and Hunchentoot In-Reply-To: (message from =?ISO-8859-1?Q?Hans_H=FCbner?= on Thu, 9 Apr 2009 10:01:00 +0200) References: <20090409001647.52BF48B80E6@gideon.eas.asu.edu> <20090409074546.GC25655@viridian-project.de> Message-ID: <20090409160903.8BD0D8114A@gideon.eas.asu.edu> >> >> In Weblocks we have put a HANDLER-CASE around our request handler >> to catch internal errors outselves and then display the appropriate >> error message. > >If you want to deliver a 500 HTTP status code, put 500 to the >HUNCHENTOOT:*APPROVED-RETURN-CODES* list in order to prevent >Hunchentoot's error handling mechanism intercept and mess with the >response. Edi and I discussed that topic yesterday and we think that >there are some improvements to be made in how Hunchentoot handles >errors. Expect changes in that area. Just to make things clear: I am not particularly interested in lisp errors in my own code: I already have a handler-case for that. Brett