From johan.tibell at gmail.com Thu Mar 29 13:48:33 2007 From: johan.tibell at gmail.com (Johan Tibell) Date: Thu Mar 29 13:47:45 2007 Subject: [web-devel] A light-weight web framework Message-ID: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> Inspired by the ease with which Joe Gregorio put together a framework in Python using some components [1] I'm inspired to create some components of my own so the same thing can be done in Haskell. I'm aiming for creating some thing /really/ simple and I want to start with writing a templating system or a database wrapper. But first, what has been done in this area already already? I'm aware of at least some template like efforts [2]. For the templating system I don't think I want a DSL like approach (ala Lisp with (body (h1 "Foo")) etc. but rather a solution where code and templates are kept separate. Here's a really simple interface. compileTemplate :: Stringable a => a -> Template renderTemplate :: (Show a, Stringable b) => Template -> Map Stringable a -> b Or something along those lines. Compiling the template makes subsequent rendering faster and ByteString adds even more speed. With some templating language like so: ...

{{ title }}

'title' is looked up in the Map when the template is rendered. The other option would be inline Haskell code: ...

<% postTitle title %>

Where 'title' is a record data type. There's also a middle ground like with Django's templates that supports restricted inline code. I guess the restriction is unnecessary in Haskell as we can disallow mutation of values quite easily (?). 1. http://bitworking.org/news/Why_so_many_Python_web_frameworks 2. http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem From rich.neswold at gmail.com Thu Mar 29 14:30:25 2007 From: rich.neswold at gmail.com (Rich Neswold) Date: Thu Mar 29 14:29:33 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> Message-ID: <14cf844b0703291130r744d09dp800600462bf737f0@mail.gmail.com> On 3/29/07, Johan Tibell wrote: > I want to start with writing a templating system or a database wrapper. But first, what has been done in this area already already? There was recent announcement on the Haskell lists about "Chunks". (http://www.wellquite.org/index.php/chunks/) This sounds like something you described. I've only played with the examples given, so I don't know how well it scales on a larger project. -- Rich AIM : rnezzy ICQ : 174908475 Jabber: rich@neswold.homeunix.net From chris at eidhof.nl Thu Mar 29 23:12:57 2007 From: chris at eidhof.nl (Chris Eidhof) Date: Thu Mar 29 23:12:16 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> Message-ID: <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> I'm interested in seeing something like this too. However, I am a big fan of DSL, especially if they're designed correctly. The crux to having a good DSL is thinking: "How do I *really* want to write this?", and starting from there on. I haven't really thought about those things for a web-framework yet. -chris On Mar 29, 2007, at 10:48 AM, Johan Tibell wrote: > Inspired by the ease with which Joe Gregorio put together a framework > in Python using some components [1] I'm inspired to create some > components of my own so the same thing can be done in Haskell. I'm > aiming for creating some thing /really/ simple and I want to start > with writing a templating system or a database wrapper. But first, > what has been done in this area already already? I'm aware of at least > some template like efforts [2]. For the templating system I don't > think I want a DSL like approach (ala Lisp with (body (h1 "Foo")) etc. > but rather a solution where code and templates are kept separate. > Here's a really simple interface. > > compileTemplate :: Stringable a => a -> Template > renderTemplate :: (Show a, Stringable b) => Template -> Map > Stringable a -> b > > Or something along those lines. Compiling the template makes > subsequent rendering faster and ByteString adds even more speed. > > With some templating language like so: > > > ... > >

{{ title }}

> > > > 'title' is looked up in the Map when the template is rendered. The > other option would be inline Haskell code: > > > ... > >

<% postTitle title %>

> > > > Where 'title' is a record data type. There's also a middle ground like > with Django's templates that supports restricted inline code. I guess > the restriction is unnecessary in Haskell as we can disallow mutation > of values quite easily (?). > > 1. http://bitworking.org/news/Why_so_many_Python_web_frameworks > 2. http://blog.moertel.com/articles/2006/10/18/a-type-based- > solution-to-the-strings-problem > _______________________________________________ > web-devel mailing list > web-devel@haskell.org > http://www.haskell.org/mailman/listinfo/web-devel From prstanley at ntlworld.com Mon Apr 2 01:42:36 2007 From: prstanley at ntlworld.com (PR Stanley) Date: Mon Apr 2 01:41:21 2007 Subject: [web-devel] Testing, please do not respond Message-ID: <7.0.1.0.0.20070402064129.01b5b110@ntlworld.com> Hello This is only a test. Please do not reply to this message. From prstanley at ntlworld.com Mon Apr 2 01:51:44 2007 From: prstanley at ntlworld.com (PR Stanley) Date: Mon Apr 2 01:50:26 2007 Subject: [web-devel] testing II Message-ID: <7.0.1.0.0.20070402065124.01b5d090@ntlworld.com> From wagner.andrew at gmail.com Tue Apr 3 09:37:03 2007 From: wagner.andrew at gmail.com (Andrew Wagner) Date: Tue Apr 3 09:35:56 2007 Subject: [web-devel] Re: [Haskell] The real Monad Transformer In-Reply-To: References: Message-ID: Henning, This link is broken for me... On 4/3/07, Henning Thielemann wrote: > > It was argued that people avoid Haskell because of terms from Category > theory like 'Monad'. This problem can now be solved by a wrapper which > presents all the WWW without monads! Start e.g. at > http://saxophone.jpberlin.de/MonadTransformer?source=http%3A%2F%2Fwww%2Ehaskell%2Eorg%2Fhaskellwiki%2FCategory%3AMonad&language=English > Of course the tool is written in Haskell, that is, Haskell helps solving > problems which only exist because of Haskell. > Bug reports and feature requests can be tracked at > https://sourceforge.net/projects/parallelweb > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell > From asandroq at gmail.com Tue Apr 3 09:42:10 2007 From: asandroq at gmail.com (Alex Queiroz) Date: Tue Apr 3 09:41:03 2007 Subject: [web-devel] Re: [Haskell] The real Monad Transformer In-Reply-To: References: Message-ID: <54e12800704030642t7f0818e8w5c0e9d230248d7c8@mail.gmail.com> Hallo, On 4/3/07, Andrew Wagner wrote: > On 4/3/07, Henning Thielemann wrote: > > > > It was argued that people avoid Haskell because of terms from Category > > theory like 'Monad'. This problem can now be solved by a wrapper which > > presents all the WWW without monads! Start e.g. at > > http://saxophone.jpberlin.de/MonadTransformer?source=http%3A%2F%2Fwww%2Ehaskell%2Eorg%2Fhaskellwiki%2FCategory%3AMonad&language=English > > Of course the tool is written in Haskell, that is, Haskell helps solving > > problems which only exist because of Haskell. > > Bug reports and feature requests can be tracked at > > https://sourceforge.net/projects/parallelweb Hahaha, cool! "This tutorial aims to explain the concept of a warm, fuzzy thing and its application to functional programming in a way that is easy to understand and useful to beginning and intermediate Haskell programmers. Familiarity with the Haskell language is assumed, but no prior experience with warm, fuzzy things is required. The tutorial covers a lot of material and the later sections require a thorough understanding of the earlier material. Many code examples are provided along the way to demonstrate warm, fuzzy programming. It is not advisable to attempt to absorb all of the material in a single reading." -- -alex From dmhouse at gmail.com Thu Apr 5 08:50:34 2007 From: dmhouse at gmail.com (David House) Date: Thu Apr 5 08:49:19 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> Message-ID: On 30/03/07, Chris Eidhof wrote: > I'm interested in seeing something like this too. However, I am a big > fan of DSL, especially if they're designed correctly. The crux to > having a good DSL is thinking: "How do I *really* want to write > this?", and starting from there on. I haven't really thought about > those things for a web-framework yet. I'd agree with this. Haskell is astonishingly expressive and can support all kinds of levels of EDSLs. I've been writing forum software in Haskell and came across this decision: do I write my templates in HTML + some code or in Haskell? I couldn't really see any disadvantages to the latter, and the advantages were obviously that I got all the traditional Haskell functions and features, and so on. I still maintain a fairly strict MVC structure within the application; the controllers compute the necessary parameters for the templates and pass them in. For reference, here's one of my templates: -- | The 'V' monad, in which our viewers execute. type V a = WriterT ViewOut (Reader ViewEnv) a type Viewer = V Html -- | View the public profile of a user. vUser :: User -> Viewer vUser u = do tell $ VO { voTitle = usrDisplay u, voBreadcrumbs = singleton indexLink } usr <- asks veUser let hdr = h2 << usrDisplay u dfns = [("Name: ", primHtml $ usrDisplay u), ("Registered at: ", primHtml $ renderCalTime (usrRegistered u)), ("Url: ", toHtml $ hotlink (usrUrl u) << usrUrl u), ("Blurb: ", primHtml $ usrBlurb u)] del = whenPermitted usr RmUser $ hotlink (userUrl u ++ "/delete") << "Delete user" return $ hdr +++ defList dfns +++ cappedOps [del] -- -David House, dmhouse@gmail.com From joelr1 at gmail.com Thu Apr 5 09:02:04 2007 From: joelr1 at gmail.com (Joel Reymont) Date: Thu Apr 5 09:00:45 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> Message-ID: <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> David, Why do you want to embed Haskell code in templates? Why not go with an approach like Zope TAL? Thanks, Joel -- http://wagerlabs.com/ From dmhouse at gmail.com Thu Apr 5 09:51:31 2007 From: dmhouse at gmail.com (David House) Date: Thu Apr 5 09:50:17 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> Message-ID: On 05/04/07, Joel Reymont wrote: > Why do you want to embed Haskell code in templates? Why add another dependency, force your coders to learn another language, restrict yourself to a language which isn't as expressive as Haskell, reduce your ability to reuse code from different areas of the project and decrease project-wide consistency when you could just write your templates in Haskell to begin with? Haskell is the king of EDSL. Let's take advantage of that. -- -David House, dmhouse@gmail.com From joelr1 at gmail.com Thu Apr 5 10:30:53 2007 From: joelr1 at gmail.com (Joel Reymont) Date: Thu Apr 5 10:29:37 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> Message-ID: On Apr 5, 2007, at 2:51 PM, David House wrote: > Why add another dependency, force your coders to learn another > language, restrict yourself to a language which isn't as expressive as > Haskell, reduce your ability to reuse code from different areas of the > project and decrease project-wide consistency when you could just > write your templates in Haskell to begin with? Embedding code in web templates doesn't work well when you have designers on board. Let me elaborate on my approach as it doesn't reduce or restrict anything! I'm suggesting that you make your templates look like this, which is parseable as XML. Note the "tal:" tags. Please scroll through to the bottom for more thoughts. Page title

Heading

Hello wo rld

Message

  • Hard-coded
  • Dummy

Back to index

The above expands into this: Demo page

Demo page

Hello Bruno

(c) 2006

  • Hard-coded
  • Xavier
  • Damien
  • Jacques
  • Didier
  • Jerome

Back to index

Note how
  • Hard-coded
  • Dummy
is expanded to
  • Hard-coded
  • Xavier
  • Damien
  • Jacques
  • Didier
  • Jerome
This is nice and _very_ clean and allows you to use any Haskell code you want to _process_ the template. You can, in fact, make template processing recursive and have tags produce more tags, i.e. make your components produce HTML instead of data for tags in the template. What do you think? -- http://wagerlabs.com/ From joelr1 at gmail.com Thu Apr 5 13:31:17 2007 From: joelr1 at gmail.com (Joel Reymont) Date: Thu Apr 5 13:30:00 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> Message-ID: Do you see anything wrong with the approach I suggested, though? On Apr 5, 2007, at 6:16 PM, Maurice Codik wrote: > That's not necesarily true. Templates where there is mostly markup, > but let you embed code into them using special tags (ex, <% code % > >) are extremely popular and work fairly well. They also keep the > template language simple because there is already a full-powered > programming language thats embedded into it. Good examples of this > method are ERB templates in Rails, JSPs, Perl Mason templates, etc. -- http://wagerlabs.com/ From maurice.codik at gmail.com Thu Apr 5 14:17:58 2007 From: maurice.codik at gmail.com (Maurice Codik) Date: Thu Apr 5 14:16:44 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> Message-ID: <2927e5d70704051117i14760c62y5aaa7a4ddf7113e@mail.gmail.com> A few things, some of which I sort of mentioned in my previous email: - If I'm already going to commit some time to learn a templating language, why dont I just spend that same amount of time learning the little bit of haskell I need to make the template work? If thats too much to ask, I can just spit out HTML, and have the programmer put in the dynamic parts for me. Both of these scenarios seem to be a more efficient use of time. - Who is the target audience? If its a big organization where there are multiple designers and multiple devs, then your approach may work just fine. If its the single developer, then something like what David suggested would work even better. If its a small team (which may or may not include a full-time designer), then something like what I suggested would work best. For a web framework for haskell, I would guess that the latter two are much more likely. - Embedding a real programming language in a template already gives you power to do what ever you need to do. What if you need to implement some logic that the template language doesnt support? In those cases, you're usually out of luck and have to move that logic into a controller, where it doesnt really belong (assuming its actual display logic, not business logic). - It's really just a matter of taste. Any web framework thats worth using should be flexible in its support of view technologies, but come with one thats a sensible default. Maurice On 4/5/07, Joel Reymont wrote: > > Do you see anything wrong with the approach I suggested, though? > > On Apr 5, 2007, at 6:16 PM, Maurice Codik wrote: > > > That's not necesarily true. Templates where there is mostly markup, > > but let you embed code into them using special tags (ex, <% code % > > >) are extremely popular and work fairly well. They also keep the > > template language simple because there is already a full-powered > > programming language thats embedded into it. Good examples of this > > method are ERB templates in Rails, JSPs, Perl Mason templates, etc. > > -- > http://wagerlabs.com/ > > > > > > -- http://blog.mauricecodik.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/web-devel/attachments/20070405/2cc8f947/attachment.htm From paulrbrown at gmail.com Thu Apr 5 14:39:07 2007 From: paulrbrown at gmail.com (Paul Brown) Date: Thu Apr 5 14:37:52 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <2927e5d70704051117i14760c62y5aaa7a4ddf7113e@mail.gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> <2927e5d70704051117i14760c62y5aaa7a4ddf7113e@mail.gmail.com> Message-ID: <4249453d0704051139h3028fe58vcb7e2504b7e358cb@mail.gmail.com> Let me through Avi Bryant's recent slides into the conversation: http://smallthought.com/avi/etech.pdf Some things that I think, some of which overlap with what Avi's saying: 1) Programmatic generation of content is good. Interaction with designers can be managed simply -- select CSS as the primary means of customizing display, settle on prototype HTML for the designers to work with, generate the HTML programmatically to that prototype as a spec. 2) Templating is ugly. Debugging and testing are difficult. Templating is antipodal to separation of concerns. I'd like us to brainstorm on a couple of topics: A) How do we leverage what is special about Haskell -- laziness, types, purity -- to create an effective and simple web framework? B) What's wrong with existing web frameworks (RoR, straight JSP, PHP, etc.)? For my money, the things that are wrong with RoR and friends is that they let you write really awful software -- even *force* you to do so by the decomposition into templates, controllers, etc. Which brings us back to question A. -- paulrbrown@gmail.com http://mult.ifario.us/ From maurice.codik at gmail.com Thu Apr 5 13:16:50 2007 From: maurice.codik at gmail.com (Maurice Codik) Date: Thu Apr 5 16:01:42 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> Message-ID: <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> > > Embedding code in web templates doesn't work well when you have > designers on board. > That's not necesarily true. Templates where there is mostly markup, but let you embed code into them using special tags (ex, <% code %>) are extremely popular and work fairly well. They also keep the template language simple because there is already a full-powered programming language thats embedded into it. Good examples of this method are ERB templates in Rails, JSPs, Perl Mason templates, etc. In these cases one of two things happen: either the designers learn enough of the programming language to embed the right things in, or they just hand off HTML to the developers, who can then replace the dynamic parts with <% %> tags. If I'm a designer and I have learn a new templating language anyway, I may as well just learn a little bit of Haskell/Ruby/Perl/Java/whatever. The best choice of templating technology really depends who the target audience of the web framework is. Has there been much thought given to that yet? Maurice On 4/5/07, Joel Reymont wrote: > > > On Apr 5, 2007, at 2:51 PM, David House wrote: > > > Why add another dependency, force your coders to learn another > > language, restrict yourself to a language which isn't as expressive as > > Haskell, reduce your ability to reuse code from different areas of the > > project and decrease project-wide consistency when you could just > > write your templates in Haskell to begin with? > > Embedding code in web templates doesn't work well when you have > designers on board. > > Let me elaborate on my approach as it doesn't reduce or restrict > anything! > > I'm suggesting that you make your templates look like this, which is > parseable as XML. Note the "tal:" tags. Please scroll through to the > bottom for more thoughts. > > > > > Page title > > >

Heading

>

> Hello tal:replace="visitor/name">wo > rld >

>

Message

>
    >
  • Hard-coded
  • >
  • tal:content="ite > m/name">Dummy
  • >
>

> Back to > index >

> > > > The above expands into this: > > > > Demo page > > >

Demo page

>

> Hello > Bruno >

>

(c) 2006

>
    >
  • Hard-coded
  • >
  • Xavier
  • >
  • Damien
  • >
  • Jacques
  • >
  • Didier
  • >
  • Jerome
  • >
>

> Back to > index >

> > > > Note how > >
    >
  • Hard-coded
  • >
  • tal:content="ite > m/name">Dummy
  • >
> > is expanded to > >
    >
  • Hard-coded
  • >
  • Xavier
  • >
  • Damien
  • >
  • Jacques
  • >
  • Didier
  • >
  • Jerome
  • >
> > This is nice and _very_ clean and allows you to use any Haskell code > you want to _process_ the template. You can, in fact, make template > processing recursive and have tags produce more tags, i.e. make your > components produce HTML instead of data for tags in the template. > > What do you think? > > -- > http://wagerlabs.com/ > > > > > > _______________________________________________ > web-devel mailing list > web-devel@haskell.org > http://www.haskell.org/mailman/listinfo/web-devel > -- http://blog.mauricecodik.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/web-devel/attachments/20070405/3a7d065f/attachment-0001.htm From lemming at henning-thielemann.de Thu Apr 5 11:23:53 2007 From: lemming at henning-thielemann.de (Henning Thielemann) Date: Thu Apr 5 16:02:08 2007 Subject: [web-devel] Parse HTTP headers Message-ID: First of all, I want to say that I like Network.HTTP.HeaderName being an enumeration like type because of the advantages that are listed in the HTTP module. HeaderName has a Show instance which shows the header name as the HTTP protocoll requires that. I don't find it good, since I like to copy output values in GHCi back to the GHCi prompt. I'm missing a Read instance or a parsing routine to convert String -> HeaderName. I want to do the following: I download HTML pages from the web which may contain META-HTTP-EQUIV tags. I want to merge the HTTP header, that I got from the web server, with the META information of the downloaded HTML page. I like to merge them in terms of HTTP.Header, not in terms of (String,String) and I also like to have a function like HTTP.findHeader to extract some information from this list. (Currently I'm mainly interested in Content-Type and Content-Language.) From alex at alexjacobson.com Mon Apr 9 17:20:49 2007 From: alex at alexjacobson.com (S. Alexander Jacobson) Date: Mon Apr 9 17:20:17 2007 Subject: [web-devel] A light-weight web framework In-Reply-To: <4249453d0704051139h3028fe58vcb7e2504b7e358cb@mail.gmail.com> References: <90889fe70703291048v1e628edbhb16b5d9c360adbc2@mail.gmail.com> <4EE09B9B-4F23-4895-9E59-A243B19A8B22@eidhof.nl> <4E655FB1-0B5C-47C8-A22E-0D0E51816661@gmail.com> <2927e5d70704051016v75be99b5t9a6d5cc0eb4bf4ad@mail.gmail.com> <2927e5d70704051117i14760c62y5aaa7a4ddf7113e@mail.gmail.com> <4249453d0704051139h3028fe58vcb7e2504b7e358cb@mail.gmail.com> Message-ID: My priorities: * Make storage and client stuff transparent to server side developer * Use in memory haskell data structures to represent state. + rely on MACID for persistence + no type errors from app/db inconsistency + isolate schema change risk to deserialization from disk + no need for extra mem-cache plumbing! * Atomatic conversion to/from wire format types to haskell data types in my app. Auto-parse/generate JSON/XML/URLEncode. * Scaling should be really really easy * easy integration of multi-protocol services e.g. IRC, SMTP, HTTP in one app. See HPaste and Pass.net. * develop in Haskell. -Alex- On Thu, 5 Apr 2007, Paul Brown wrote: > Let me through Avi Bryant's recent slides into the conversation: > > http://smallthought.com/avi/etech.pdf > > Some things that I think, some of which overlap with what Avi's saying: > > 1) Programmatic generation of content is good. Interaction with > designers can be managed simply -- select CSS as the primary means of > customizing display, settle on prototype HTML for the designers to > work with, generate the HTML programmatically to that prototype as a > spec. > > 2) Templating is ugly. Debugging and testing are difficult. > Templating is antipodal to separation of concerns. > > I'd like us to brainstorm on a couple of topics: > > A) How do we leverage what is special about Haskell -- laziness, > types, purity -- to create an effective and simple web framework? > > B) What's wrong with existing web frameworks (RoR, straight JSP, PHP, etc.)? > > For my money, the things that are wrong with RoR and friends is that > they let you write really awful software -- even *force* you to do so > by the decomposition into templates, controllers, etc. Which brings > us back to question A. > > -- > paulrbrown@gmail.com > http://mult.ifario.us/ > _______________________________________________ > web-devel mailing list > web-devel@haskell.org > http://www.haskell.org/mailman/listinfo/web-devel > From bringert at cs.chalmers.se Tue Apr 10 10:49:19 2007 From: bringert at cs.chalmers.se (=?ISO-8859-1?Q?Bj=F6rn_Bringert?=) Date: Tue Apr 10 10:46:01 2007 Subject: [web-devel] Parse HTTP headers In-Reply-To: References: Message-ID: <461BA3EF.1080402@cs.chalmers.se> Henning Thielemann wrote: > First of all, I want to say that I like Network.HTTP.HeaderName being an > enumeration like type because of the advantages that are listed in the > HTTP module. HeaderName has a Show instance which shows the header name as > the HTTP protocoll requires that. I don't find it good, since I like to > copy output values in GHCi back to the GHCi prompt. I'm missing a Read > instance or a parsing routine to convert String -> HeaderName. > I want to do the following: I download HTML pages from the web which may > contain META-HTTP-EQUIV tags. I want to merge the HTTP header, that I got > from the web server, with the META information of the downloaded HTML > page. I like to merge them in terms of HTTP.Header, not in terms of > (String,String) and I also like to have a function like HTTP.findHeader to > extract some information from this list. (Currently I'm mainly interested > in Content-Type and Content-Language.) Sounds good. You are welcome to implement it :-) The HTTP library could do with a new maintainer by the way... What happened to the HTTP strike force? /Bj?rn From list at phaedrusdeinus.org Mon May 7 16:33:39 2007 From: list at phaedrusdeinus.org (John Melesky) Date: Mon May 7 16:31:06 2007 Subject: [web-devel] Strange HAppS problem (tutorial) Message-ID: <97C23120-040A-449F-924B-86C07CF62A11@phaedrusdeinus.org> So, i'm working my way through the HAppS tutorial ( http:// www.haskell.org/haskellwiki/HAppS_tutorial ), and i get to section 3.2. I type in the code, it builds fine, but when i run it, i get the following error: hello: user error (decodeStringM: parsing length field failed @ "") However (and this is the strange part), if i just runghc the .hs file, it all works fine. This is running ghc 6.6, darwinports version, on intel OSX 10.4.9, however i've verified the same behavior on ghc, Audrey Tang's bundle, G4 OSX 10.4.9 (for whatever that's worth). Anyone have any ideas? Anyone run into this before? -johnnnnnnn From marco-oweber at gmx.de Mon May 7 21:45:16 2007 From: marco-oweber at gmx.de (Marc Weber) Date: Mon May 7 19:42:15 2007 Subject: [web-devel] Strange HAppS problem (tutorial) In-Reply-To: <97C23120-040A-449F-924B-86C07CF62A11@phaedrusdeinus.org> References: <97C23120-040A-449F-924B-86C07CF62A11@phaedrusdeinus.org> Message-ID: <20070508014516.GA11520@gmx.de> On Mon, May 07, 2007 at 03:33:39PM -0500, John Melesky wrote: > So, i'm working my way through the HAppS tutorial ( http:// > www.haskell.org/haskellwiki/HAppS_tutorial ), and i get to section 3.2. > > I type in the code, it builds fine, but when i run it, i get the > following error: > > hello: user error (decodeStringM: parsing length field failed @ "") > > However (and this is the strange part), if i just runghc the .hs > file, it all works fine. > > This is running ghc 6.6, darwinports version, on intel OSX 10.4.9, > however i've verified the same behavior on ghc, Audrey Tang's bundle, > G4 OSX 10.4.9 (for whatever that's worth). > > Anyone have any ideas? Anyone run into this before? > > -johnnnnnnn Hi John. I'm not sure what's happening in your case. The HAppS applications try to read some state when starting. If there is a syntax error (which shouldn't occur because read/ show isntances are fine in most cases).. you'll get a error message like that. You can try investigating wether this is the cause by getting to know which files are actually beeing read and parsed. This can be done by using strace ./yourexecutable &> out and some grepping. This may also help you getting to know wether there are some differences when invoking ghci/ghc.. The last time I did try HAppS those state files where located somewhere near the current directory. Thus I propose moving your executable to /tmp and try again ? You may also try the HAppS mailing list http://groups.google.com/group/happs Marc From list at phaedrusdeinus.org Mon May 7 20:36:05 2007 From: list at phaedrusdeinus.org (John Melesky) Date: Mon May 7 20:33:33 2007 Subject: [web-devel] Strange HAppS problem (tutorial) In-Reply-To: <20070508014516.GA11520@gmx.de> References: <97C23120-040A-449F-924B-86C07CF62A11@phaedrusdeinus.org> <20070508014516.GA11520@gmx.de> Message-ID: <83480431-AEA5-48B9-82E9-354D5CEA5438@phaedrusdeinus.org> On May 7, 2007, at 8:45 PM, Marc Weber wrote: >> hello: user error (decodeStringM: parsing length field failed >> @ "") > > The HAppS applications try to read some state when starting. If > there is > a syntax error (which shouldn't occur because read/ show isntances are > fine in most cases).. you'll get a error message like that. Marc, thanks. It turns out that removing the directories left over from the prior revision ([app]_state/ and [app]_error.log/) got rid of the error. Why i didn't think of that, i don't know. Thanks again. -johnnnnnnn From ndmitchell at gmail.com Mon Jun 18 10:11:15 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Mon Jun 18 10:05:59 2007 Subject: [web-devel] Scope of this mailing list Message-ID: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> Hi I've been developing the tagsoup library, which deals with parsing HTML, which is clearly a web-development task. I'm now wanting to use a mailing list to discuss the further development of tagsoup - I can either set up a separate mailing list, or use this one - which seems to overlap. So would the people in this mailing list rather I just set up a separate tagsoup mailing list (I'm not expecting massive amounts of traffic), or use this one? Thanks Neil [1] http://www-users.cs.york.ac.uk/~ndm/tagsoup/ From johan.tibell at gmail.com Mon Jun 18 10:36:00 2007 From: johan.tibell at gmail.com (Johan Tibell) Date: Mon Jun 18 10:30:44 2007 Subject: [web-devel] Scope of this mailing list In-Reply-To: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> References: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> Message-ID: <90889fe70706180736p41a475c0t99f264a3a1ab190c@mail.gmail.com> Hey! I wouldn't create yet another list and to me tagsoup is related enough. Was there ever any statement of intent for this list or was it more of a "for us who are interested in web development" statement? I was planning on posting my ideas for templating systems and a (Python) WSGI solution for Haskell here and I assumed discussing actual implementation of those would be okay here. Cheers Johan On 6/18/07, Neil Mitchell wrote: > Hi > > I've been developing the tagsoup library, which deals with parsing > HTML, which is clearly a web-development task. I'm now wanting to use > a mailing list to discuss the further development of tagsoup - I can > either set up a separate mailing list, or use this one - which seems > to overlap. > > So would the people in this mailing list rather I just set up a > separate tagsoup mailing list (I'm not expecting massive amounts of > traffic), or use this one? > > Thanks > > Neil > > [1] http://www-users.cs.york.ac.uk/~ndm/tagsoup/ > _______________________________________________ > web-devel mailing list > web-devel@haskell.org > http://www.haskell.org/mailman/listinfo/web-devel > From samgoldman at jhu.edu Mon Jun 18 10:46:11 2007 From: samgoldman at jhu.edu (Sam Goldman) Date: Mon Jun 18 10:43:56 2007 Subject: [web-devel] Scope of this mailing list In-Reply-To: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> References: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> Message-ID: <46769AB3.2040609@jhu.edu> Neil Mitchell wrote: > Hi > > I've been developing the tagsoup library, which deals with parsing > HTML, which is clearly a web-development task. I'm now wanting to use > a mailing list to discuss the further development of tagsoup - I can > either set up a separate mailing list, or use this one - which seems > to overlap. > > So would the people in this mailing list rather I just set up a > separate tagsoup mailing list (I'm not expecting massive amounts of > traffic), or use this one? > > Thanks > > Neil > > [1] http://www-users.cs.york.ac.uk/~ndm/tagsoup/ > _______________________________________________ > web-devel mailing list > web-devel@haskell.org > http://www.haskell.org/mailman/listinfo/web-devel Echoing support for any web-development-related discussion on this list. I do web development full time and I joined this list hoping to stumble across any information I can use to give myself an edge. :-) Sam From prstanley at ntlworld.com Mon Jun 18 10:51:40 2007 From: prstanley at ntlworld.com (PR Stanley) Date: Mon Jun 18 10:46:26 2007 Subject: [web-devel] Scope of this mailing list In-Reply-To: <90889fe70706180736p41a475c0t99f264a3a1ab190c@mail.gmail.co m> References: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> <90889fe70706180736p41a475c0t99f264a3a1ab190c@mail.gmail.com> Message-ID: <7.0.1.0.0.20070618154746.01b690d0@ntlworld.com> For any future queries regarding Web-Devel please feel free to drop me a line at prstanley at ntlworld.com Regards Paul (list owner/moderator) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/web-devel/attachments/20070618/c765dd93/attachment.htm From marco-oweber at gmx.de Tue Jun 19 06:01:47 2007 From: marco-oweber at gmx.de (Marc Weber) Date: Tue Jun 19 05:56:30 2007 Subject: [web-devel] Scope of this mailing list / my 2 cents about handling discussion requests In-Reply-To: <7.0.1.0.0.20070618154746.01b690d0@ntlworld.com> References: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> <90889fe70706180736p41a475c0t99f264a3a1ab190c@mail.gmail.com> <7.0.1.0.0.20070618154746.01b690d0@ntlworld.com> Message-ID: <20070619100147.GA962@gmx.de> On Mon, Jun 18, 2007 at 03:51:40PM +0100, Paul Stanley wrote: > For any future queries regarding Web-Devel please feel free to drop me > a line at prstanley at ntlworld.com > Regards > Paul (list owner/moderator) Hi Neil, Paul I don't know why I've missed this thread until now. Neil. Go on and start your discussion within a new thread. I like your library. (I've already used it as you know). It's a promising alternative to many other approaches. And thanks for joining ;-) Paul: I'd like to discuss issues like this in public. Why? This way the next person asking the same question can lookup the answer using the archive. Much more important is choosing an expressive subject so that everyone can decide in advance wether he wants to read the post or not. If you (Paul and all others) have a different attitute post your opinion so that we may change the topic of this list if it is no longer appropriate. Marc Weber From prstanley at ntlworld.com Tue Jun 19 06:35:55 2007 From: prstanley at ntlworld.com (PR Stanley) Date: Tue Jun 19 06:30:32 2007 Subject: [web-devel] Scope of this mailing list / my 2 cents about handling discussion requests In-Reply-To: <20070619100147.GA962@gmx.de> References: <404396ef0706180711g2cc10152of071af7d8e474fd6@mail.gmail.com> <90889fe70706180736p41a475c0t99f264a3a1ab190c@mail.gmail.com> <7.0.1.0.0.20070618154746.01b690d0@ntlworld.com> <20070619100147.GA962@gmx.de> Message-ID: <7.0.1.0.0.20070619111844.01b1d198@ntlworld.com> Well, to be fair, very few people bother to scower the archives in these situations. I can appreciate that in theory it's a good idea but I doubt if it'll ever be practically feasable. Moreover, if the topic is suitable for the list it will be discussed publically anyway. So it is imaterial whether or not the initial consultation takes place on the list. I have already contacted Neil and explained that as far as I'm concerned he can go ahead ... etc. Paul At 11:01 19/06/2007, you wrote: >On Mon, Jun 18, 2007 at 03:51:40PM +0100, Paul Stanley wrote: > > For any future queries regarding Web-Devel please feel free to drop me > > a line at prstanley at ntlworld.com > > Regards > > Paul (list owner/moderator) > >Hi Neil, Paul > >I don't know why I've missed this thread until now. > >Neil. Go on and start your discussion within a new thread. >I like your library. (I've already used it as you know). >It's a promising alternative to many other approaches. >And thanks for joining ;-) > >Paul: I'd like to discuss issues like this in public. Why? >This way the next person asking the same question can lookup the answer >using the archive. Much more important is choosing an expressive >subject so that everyone can decide in advance wether he wants to read >the post or not. > >If you (Paul and all others) have a different attitute post your >opinion so that we may change the topic of this list if it is no longer >appropriate. > >Marc Weber >_______________________________________________ >web-devel mailing list >web-devel@haskell.org >http://www.haskell.org/mailman/listinfo/web-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/web-devel/attachments/20070619/7112be2d/attachment.htm From marco-oweber at gmx.de Mon Nov 19 02:29:37 2007 From: marco-oweber at gmx.de (Marc Weber) Date: Mon Nov 19 02:26:13 2007 Subject: [web-devel] [farmand@linagora.com: [Ocsigen] Functional Web Frameworks groups] Message-ID: <20071119072937.GB32152@gmx.de> Perhaps you are intersted in this as well. Marc W. ----- Forwarded message from Francois Armand ----- Date: Mon, 19 Nov 2007 07:44:05 +0100 From: Francois Armand To: ocsigen@sympa.pps.jussieu.fr Subject: [Ocsigen] Functional Web Frameworks groups Hi Ocsigen, The world of functional web frameworks seems to be an hot place in these days ! David Pollak of Lift Web (Scala web framework : http://liftweb.net/) has just created a google group to exchange on this topic. It seems to already be some people from Erlyweb (Erlang) and HAppS (Haskel) there, so it really lacks for OCaml advocates ;) Hope to see you there, -- Francois Armand Etudes & D?veloppements J2EE Groupe Linagora - http://www.linagora.com T?l.: +33 (0)1 58 18 68 28 ----------- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation ----- End forwarded message -----