[Simpleweb-Support] first impressions and RFEs for simple
Brought to you by:
niallg
|
From: David F. <da...@da...> - 2004-12-18 00:55:42
|
Hi,
Thanks for Simple. I've just discovered it, and it looks like it will
meet my needs quite nicely.
My initial impressions are positive, but it was hard to begin to use
Simple. The tutorial on the website doesn't actually have a chunk of
basic working code that I could play with. The home page links to a
blog entry that uses LoaderEngine to load a simple service, so that is
what I started with.
I got something up and running right away using LoaderEngine, but I
immediately ran into a wall. My application (like most, I'd imagine)
generates some of its content dynamically (using a subclass of
BasicService) but also relies on some static files, such as CSS and
image files. So I spent a couple of hours trying to figure out how to
get LoaderEngine to work with FileEngine. It seems like this is
something that ought to be really easy to do.
But finally I realized that it is not. So here is my first RFE: if
LoaderEngine is a preferred way of creating simple servers with Simple,
then please provide a pre-build FileService subclass of BasicService
that can be loaded and linked with LoaderService.
Or, if you don't want to encourage newbies to use LoaderService when
they first start out wiht Simple, then please provide an easy-to-find
example that creates a server without using LoaderService!
For my server, I first created my own ResourceEngine that mapped the URL
itself and would dispatch to my own BasicResource subclass or to a
Resource returned by a FileEngine. Then I realized that ProtocolHandler
was just a single-line interface and I just implemented this directly
and skipped the ResourceEngine step altogether.
RFE #2: I was also really surprised that the LoaderEngine API requires
all service classes to be loaded dynamically. For classes that are
statically loaded, why not have a method to map a name to a Class
object?
Thats all for now. Thanks for a nice piece of software!
David Flanagan
|