All Unkept
Posted in: Django, Haskell, Web development  —  4 November 2008

Ella

I have been continuing very slowly with my Haskell blog. Yesterday I properly pulled out the Django-inspired framework I am writing alongside it, and called it Ella, after another jazz genuis (though a vocalist -- I much prefer vocal jazz).

There were a number of reasons I didn't like the existing Haskell CGI package, but one of the biggest was the lack of explicit request and response objects. Instead of that it did everything inside a CGI monad, which makes it impossible to do things like reusable pre-processing of the request and post-processing of the response, both of which I will want to be able to do. I wanted something much more in the style of Django, with explicit request and response objects, something, ironically, much more functional instead of imperative -- it is a surprise that I got this from a Python web framework. There were also things about the CGI API itself I really didn't like (e.g. didn't differentiate between GET and POST inputs). Plus, I wanted to have a go at some real Haskell, so I rolled my own.

It is very early days at the moment, and many big things are missing from the API (like proper access to GET and POST parameters, handlers for file uploads, any kind of HTML helpers for form handling etc). I realised that the API for all of that should only be implemented as I needed it in my actual software, otherwise I would just get it wrong. What is implemented so far is a strongly-typed routing mechanism, and not much more. It is enough, though, to implement a useful app -- I wrote a very simple 80-line script that handles (via clickable URLs in emails) subscription to a personal mailing list I'm organising for myself. It also acts as an example at the moment -- see ConfirmCgi.hs.

Currently there is no home page, though there is some good documentation, and you can get the source. All of the API is subject to change at any time, but I think what I've done so far is a reasonable basis.

Comments §

§ On 5 November 2008, Anonymous Coward wrote:
369 Curious why you rolled your own rather than use HAppS?

§ On 5 November 2008, luke wrote:
370 My reasons are here:

http://lukeplant.me.uk/blog.php?id=1107301667

My motivation is pretty similar to this guys: http://mult.ifario.us/p/perpubplat-0-9-you-re-looking-at-it

I also wanted to see how Haskell competes in the real world i.e. when it has to use existing systems like CGI and external relational databases, rather than use a system designed specifically for Haskell.

§ On 6 November 2008, falken wrote:
371 ... one of really already used django projects is named Ella too :-) use google ...

§ On 6 November 2008, luke wrote:
372 @falken: A simple search for 'Ella' doesn't bring it up, I missed it -- thanks for the pointer.

Since no-one is likely to use my code, though, and since it won't interfere with a Python project, I probably won't bother changing it. I mainly gave it a name just to avoid calling it 'Web', which seemed a bit arrogant.

§ On 19 November 2008, luke wrote:
374 Home page (FWIW): http://lukeplant.me.uk/resources/ella/

The framework has been updated a bit, and the example script is significantly more capable now (I use it to manage my mailing list).

§ On 18 December 2008, ella wrote:
386 im called ella yay

§ On 18 December 2008, ella wrote:
387 i think that ella is a very beautiful name and it reminds me of the fairies that are helping me through life!
i dont know what this website is about but its really ,really FUN!

§ On 19 December 2008, luke wrote:
388 Thank you Ella! I think I enjoyed your comment more than all the others on everything I've posted put together!

:-)

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.