[Mono-list] ASP

Matt Liotta mliotta@iname.com
Sat, 09 Feb 2002 22:33:20 -0800

Well if we are looking to start small and only define a simple API than let
me throw out some ideas.

1. What would are basic web server need to do?
    Parse HTTP requests for GET or POST
    Parse request parameters from URL query string or form encoded in the
case of a POST
    Parse requested URI

2. What would the API look like?
    In the most basic sense we would have an abstract class named HTTPServer
that looked something like this

    abstract public class HTTPServer
        protected Request request = null;
        protected Response response = null;

        public HTTPServer()
            // somehow this would create the request and response objects
            // switch on request type
            // case GET: this.doGet();
            // case POST: this.doPost();

        abstract private void doGet();
        abstract private void doPost();

    The Request class would put the URL or form parameters into a hashtable
for easy access as well as the header directives like maybe this

    public class Request
        public Hashtable header = new Hashtable();
        public Hashtable parameters = new Hashtable();
        public Hashtable CGI = new Hashtable();

        public Request(String buffer)


On 2/9/02 8:44 PM, "Miguel de Icaza" <miguel@ximian.com> wrote:

>> Just joined the list hours ago to see where I could contribute and this
>> caught my eye. If you would like I would be happy to write a simple web
>> server for the project. I would imagine that a web server interface would be
>> ideal, so that others could offer their own implementation as time went on.
>> The interface would need to not only abstract a web server built with .NET,
>> but also allow for out of framework servers via stubs for NSAPI, ISAPI, and
>> Apache mod.
> It is a good idea, I would like to start small, because if we start
> small, we can always evaluate the design or adapt other technologies as
> we go rather than have an all-encompassing, all-doing class and set of
> interfaces.
> My request is to first get an API defined for how the Web Server class
> would be defined/launched from the .NET universe, post that to the list,
> and do a few iterations over it before we implement.
> Miguel
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list