[Mono-list] Mono vs. ASP.NET Design
Gaurav Vaish
gvaish@iitk.ac.in
Sat, 12 Jan 2002 22:29:34 +0530
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C19BB8.9CC68C30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Mono vs. ASP.NET DesignHi,
I am right now involved in Web.UI.Webcontrols - that does not =
require much of Validation to control on its own - depends largely on =
Control and Page objects for these. With about half of the work done by =
now, I think I should be in a position to soon switch over to some other =
namespace in the Web-universe.
Though "soon" is not very precise right now - it may be as soon as 3 =
months (this is the minimum I can think of).
Cheers,
Gaurav Vaish
http://mastergaurav.virtualave.net
http://calendar.yahoo.com/mastergaurav
---------------------------------
----- Original Message -----=20
From: Patrik Torstensson=20
To: mono-list@ximian.com=20
Sent: Saturday, January 12, 2002 22:05
Subject: [Mono-list] Mono vs. ASP.NET Design
Hi All,=20
I have been looking into how to fix the ASP.NET support in Mono, my =
focus has been on getting the runtime to work and I haven't look at the =
parsing and everything that gets executed during a request. My first =
goal is to get the runtime to work and make a good abstraction model =
that also will make it possible to implement the Mono.WEB runtime on any =
web server and still be compatible with existing ASP.Net applications =
(without doing a complete reverse enginering of MS platform and the =
current ASP.Net implementation). My suggestion is that we remove a =
number of existing MS classes (both public and internal) that we have =
done up to this point, the only classes we need to support are the one's =
used by developers outside (and maybee inside) MS and not the ISAPI =
implementation classes. There is a number of reasons for this but the =
main one is of course that MS has not developed the framework to support =
any other Web server.=20
This is my notes about Mono vs ASP.NET implementation (to become Mono =
implementation I would say). I'm currently have developed the =
HttpResponse, HttpRequest classes and also a number of the support =
classes but they are not yet commited to Mono due to that need to fix =
the startup and request flow first.
ASP.NET Startup flow=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
Interfaces:=20
IAppDomainFactory is exposed via COM interopt=20
IISAPIRuntime interface is exposed via COM interopt (may be used to =
ProccessRequest)=20
ASP.Net (Unmanaged code) uses the AppDomainFactory that it uses to =
create the ISAPIRuntime class and from there aspnet_isapi.dll can then =
use the IISAPIRuntime::ProcessRequest to execute a request, from that =
point everything is in managed code (I think).
All the HTTP classes then uses a special unsafe managed class to talk =
to the aspnet_isapi.dll, there also exists a safe managed class that =
uses interopt for functions that don't need to be unsafe.
Mono Impl Aspects=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
I think all of the above interfaces and functions (all interfaces and =
classes under Hosting) are not needed in the Mono implementation and I =
think Microsoft should have made them Internal but probably other MS =
projects are using the Worker implementations and therefore they are =
public. They are not used by any developer right now and no developer =
(outside MS) can really use them).
I think the Mono project should almost make the same implementation =
except a few classes that we need to make more abstract to make it =
possible to easy change web server implementation. I'm can implement =
this if everyone agree's that we don't need to reverse engineer (or =
should I say Copy) the undocumented MS way. This also includes the =
internal of HttpRuntime (we only need to keep the public methods).
I would like to have a TCP/IP unmanged C code to kick of Mono runtime =
and use a class (AppFactory) to get the IHttpRuntime interface that then =
the unmanaged code can use to post requests. The AppFactory can then =
provide different implementations depending on parameters (web server =
type etc) and this is like the MS implementation but they have named the =
interfaces like IISAPIRuntime with is not a good name.
ASP.NET Execution vs Mono impl=20
=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=20
This is not that complex, it executes a request via the =
HttpRuntime::ProcessRequest(HttpWorkerRequest) and we should use the =
same public methods here, we need to look at the security implementation =
and the unmanaged callbacks (like mappath etc) but in the begining they =
could be a managed class created via the same AppFactory as the =
unmanaged code uses (and then different web servers can register =
different unmanaged callback classes).
From there we need to implement the support for the IHttpHandler and =
IHttpModule interfaces and all of the context classes (I have almost =
implemented all of them except the App class).
Comments? I would like to kick this of, we need to have a number of =
people also working on the System.Web.UI parser and executor that is the =
next step. I'm planning of using a own web server (in C#) as test bed =
for the classes. If I draw up the architecture and implement the basics =
then the rest of the System.Web contributors can start doing the extra =
functions ( a lot is still to be implemented) like the session handling, =
caching, tracing and of course the the .ASPX execution (Page object in =
System.Web.UI)
Best Regards=20
Patrik Torstensson=20
------=_NextPart_000_0008_01C19BB8.9CC68C30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Mono vs. ASP.NET Design</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV><FONT size=3D2> I am right now involved in=20
Web.UI.Webcontrols - that does not require much of Validation to control =
on its=20
own - depends largely on Control and Page objects for these. With about =
half of=20
the work done by now, I think I should be in a position to soon switch =
over to=20
some other namespace in the Web-universe.</FONT></DIV>
<DIV><FONT size=3D2> Though "soon" is not very precise =
right now=20
- it may be as soon as 3 months (this is the minimum I can think=20
of).</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR>Cheers,<BR>Gaurav Vaish<BR><A=20
href=3D"http://mastergaurav.virtualave.net">http://mastergaurav.virtualav=
e.net</A><BR><A=20
href=3D"http://calendar.yahoo.com/mastergaurav">http://calendar.yahoo.com=
/mastergaurav</A><BR>---------------------------------</DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:totte@labs2.com" title=3Dtotte@labs2.com>Patrik =
Torstensson</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:mono-list@ximian.com"=20
title=3Dmono-list@ximian.com>mono-list@ximian.com</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Saturday, January 12, =
2002=20
22:05</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Mono-list] Mono vs. =
ASP.NET=20
Design</DIV>
<DIV><BR></DIV><!-- Converted from text/rtf format -->
<P><FONT face=3DVerdana size=3D2>Hi All,</FONT> </P>
<P><FONT face=3DVerdana size=3D2>I have been looking into how to fix =
the ASP.NET=20
support in Mono, my focus has been on getting the runtime to work and =
I=20
haven't look at the parsing and everything that gets executed during a =
request. My first goal is to get the runtime to work and make a good=20
abstraction model that also will make it possible to implement the =
Mono.WEB=20
runtime on any web server and still be compatible with existing =
ASP.Net=20
applications (without doing a complete reverse enginering of MS =
platform and=20
the current ASP.Net implementation). My suggestion is that we remove a =
number=20
of existing MS classes (both public and internal) that we have done up =
to this=20
point, the only classes we need to support are the one's used by =
developers=20
outside (and maybee inside) MS and not the ISAPI implementation =
classes. There=20
is a number of reasons for this but the main one is of course that MS =
has not=20
developed the framework to support any other Web server. </FONT></P>
<P><FONT face=3DVerdana size=3D2>This is my notes about Mono vs =
ASP.NET=20
implementation (to become Mono implementation I would say). I'm =
currently have=20
developed the HttpResponse, HttpRequest classes and also a number of =
the=20
support classes but they are not yet commited to Mono due to that need =
to fix=20
the startup and request flow first.</FONT></P>
<P><FONT face=3DVerdana size=3D2>ASP.NET Startup flow</FONT> <BR><FONT =
face=3DVerdana =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT> </P>
<P><FONT face=3DVerdana size=3D2>Interfaces:</FONT> <BR><FONT =
face=3DVerdana=20
size=3D2> IAppDomainFactory is exposed via COM interopt</FONT> =
<BR><FONT=20
face=3DVerdana size=3D2> IISAPIRuntime interface is exposed via =
COM interopt=20
(may be used to ProccessRequest)</FONT> </P>
<P><FONT face=3DVerdana size=3D2>ASP.Net (Unmanaged code) uses the=20
AppDomainFactory that it uses to create the ISAPIRuntime class and =
from there=20
aspnet_isapi.dll can then use the IISAPIRuntime::ProcessRequest to =
execute a=20
request, from that point everything is in managed code (I =
think).</FONT></P>
<P><FONT face=3DVerdana size=3D2>All the HTTP classes then uses a =
special unsafe=20
managed class to talk to the aspnet_isapi.dll, there also exists a =
safe=20
managed class that uses interopt for functions that don't need to be=20
unsafe.</FONT></P>
<P><FONT face=3DVerdana size=3D2>Mono Impl Aspects</FONT> <BR><FONT =
face=3DVerdana=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT> <BR><FONT =
face=3DVerdana size=3D2>I think all of the=20
above interfaces and functions (all interfaces and classes under =
Hosting) are=20
not needed in the Mono implementation and I think Microsoft should =
have made=20
them Internal but probably other MS projects are using the Worker=20
implementations and therefore they are public. They are not used by =
any=20
developer right now and no developer (outside MS) can really use=20
them).</FONT></P>
<P><FONT face=3DVerdana size=3D2>I think the Mono project should =
almost make the=20
same implementation except a few classes that we need to make more =
abstract to=20
make it possible to easy change web server implementation. I'm can =
implement=20
this if everyone agree's that we don't need to reverse engineer (or =
should I=20
say Copy) the undocumented MS way. This also includes the internal of=20
HttpRuntime (we only need to keep the public methods).</FONT></P><BR>
<P><FONT face=3DVerdana size=3D2>I would like to have a TCP/IP =
unmanged C code to=20
kick of Mono runtime and use a class (AppFactory) to get the =
IHttpRuntime=20
interface that then the unmanaged code can use to post requests. The=20
AppFactory can then provide different implementations depending on =
parameters=20
(web server type etc) and this is like the MS implementation but they =
have=20
named the interfaces like IISAPIRuntime with is not a good=20
name.</FONT></P><BR>
<P><FONT face=3DVerdana size=3D2>ASP.NET Execution vs Mono impl</FONT> =
<BR><FONT=20
face=3DVerdana =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D</FONT> <BR><FONT face=3DVerdana=20
size=3D2>This is not that complex, it executes a request via the=20
HttpRuntime::ProcessRequest(HttpWorkerRequest) and we should use the =
same=20
public methods here, we need to look at the security implementation =
and the=20
unmanaged callbacks (like mappath etc) but in the begining they could =
be a=20
managed class created via the same AppFactory as the unmanaged code =
uses (and=20
then different web servers can register different unmanaged callback=20
classes).</FONT></P>
<P><FONT face=3DVerdana size=3D2>From there we need to implement the =
support for=20
the IHttpHandler and IHttpModule interfaces and all of the context =
classes (I=20
have almost implemented all of them except the App class).</FONT></P>
<P><FONT face=3DVerdana size=3D2>Comments? I would like to kick this =
of, we need=20
to have a number of people also working on the System.Web.UI parser =
and=20
executor that is the next step. I'm planning of using a own web server =
(in C#)=20
as test bed for the classes. If I draw up the architecture and =
implement the=20
basics then the rest of the System.Web contributors can start doing =
the extra=20
functions ( a lot is still to be implemented) like the session =
handling,=20
caching, tracing and of course the the .ASPX execution (Page object in =
System.Web.UI)</FONT></P>
<P><FONT face=3DVerdana size=3D2>Best Regards</FONT> <BR><FONT =
face=3DVerdana=20
size=3D2> Patrik Torstensson</FONT> =
</P></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0008_01C19BB8.9CC68C30--