

I seem to be writing a web-app framework. Any advice? - Zak

I didn't mean to do it - I really didn't! I'm using Hunchentoot and CL-WHO to create a fairly simple web app that has to handle file uploads, file management, a simple database, user logins and the like. I had to modify a bunch of utility functions from previous projects and write a few new ones. They're almost general enough to be used in any web app and it quickly became obvious that I should modify them so they are and extract them to a library. Here are some general features:<p>- Not opinionated - this isn't Rails. Not every web-app consists of creating, maintaining and displaying lists. Users should be free to structure their apps however is most appropriate.<p>- Nested component architecture - pages are made from re-usable components, which can contain other components. A component should contain the data-structures, logic and presentation details for given type of operation. This is a bit ad-hoc right now, but my attempt to write about it has convinced me to formalize it.<p>- Modular - the various  parts of the framework will talk to each other in clearly-defined ways, so they can be replaced when they're not appropriate.<p>Do any of the things I've mentioned sound like especially good ideas or bad mistakes? What kinds of features would you like to see in a framework? What kinds of misfeatures would you like to never see again?
======
bootload
_"... What kinds of features would you like to see in a framework? ..."_

explain to me how you intend to let users get to the data? Not pages but raw
data (xml, rss, microformats etc). Oh that and _cool-uri's_. URI's created in
a lot of frameworks suck. How are you going to create cool uri's? ~
<http://www.w3.org/Provider/Style/URI>

~~~
Zak
Right now, it doesn't create URIs - you write the dispatch table yourself
(like web.py). I might keep it that way, or I might make them optional
attributes of components (not all components will have URIs, some might use
more than one).

As for raw data, right now, I'm only outputting HTML, but JSON, XML and RSS
are on my to-do list. Making a component that spits out something other than
HTML won't require anything special.

------
gwenhwyfaer
Wait until you write the second webapp, and see which bits of the first one
you really do reuse without modification?

~~~
Zak
This post is based on my experiences writing my fourth web app with this tool
set. I've found quite a few bits that I reuse with little modification.
Noticing this is what made me realize I was unintentionally writing an almost-
framework.

------
mrevelle
Nested components sounds like Weblocks, <http://common-lisp.net/project/cl-
weblocks/>, but I'm guessing you're already aware of it.

I just started working on a site using Hunchentoot and CL-WHO as well, send me
a note if you're interested in collaborating.

~~~
Zak
I'm aware of it, and I've been meaning to try it out. I may drop my project if
I like Weblocks enough. Note sent.

------
carter
Zak, that sounds vague. So I don't understand what you've done. And Rails can
be much flexible. What are benefits from your framework for a particular types
of web apps?

------
Phaserblast
Have you seen UCW?

