[Mono-list] Would mono support this kind of application?
Lawrence Pit
loz@cable.a2000.nl
Mon, 6 May 2002 01:04:13 +0300
> To familiarize myself with C#, I'm thinking about creating a wiki/blogger
> application using C#. While I'm working on XP, our servers here run Linux
> and I want to keep it that way. So, using C# for this application does
only
> make sense to me if I can use mono to eventually host the applicaion on a
> Linux box.
As the creator of OpenWiki I wanted to port my ASP software to a .Net
implementation (oh, and I want it to run on my OpenBSD box :). To get there
I find myself now completely distracted and implementing stuff for mono that
at first look have nothing to do with wikis. :)
The regular expression support is there, but lacking is all the HTTP stuff
and if your architecture needs ASP.NET, then that's missing too, and if you
need to talk to databases, that's currently work in progress. So you could
start developing your wiki for .Net on an xp box, by the time you're
finished it may run on mono on a *nix box. ;)
> On .NET I'm probably suppost to use ASP to create web applications.
According to MS yes, you're supposed to, but there are other ways. ;-)
ASP is something you should compare to JSP.
The System.Web namespace of .Net is what you should compare to the Servlet
APIs.
> So I'm thinking about using CGI here.
I wouldn't go there.
> and parsing a query string isn't that difficult. FileUpload would be,
> however. So is there any class from System.Web, I could use? HttpRequest
> and friends all look like there're just for ASP usage.
See the HttpRequest.Files property, too easy. ;-)
> I think, I'd keep pages as XML files, removing the need for a database.
I would reconsider that. Most wikis out there are files based, I'm one of
the very few who isn't and the advantages are clear. I know of a few file
based wiki developers who are wanting to convert and/or thinkng about
reimplementing their engine to work with a database instead of the file
system, mostly because of performance and scalability issues and ease of
implementing advanced features. It all depends on how large you expect your
wiki will become though, if it's only for you and you don't have too many
advanced features, not too many pages, etc. then files are fine.
> FileIO and XML processing is part of mono already, isn't it? Instead of
> using XSLT to translate XML data into HTML applications, I think about
using
> a template macro system similar to jakarta Velocity. This is probably
> something I have to create myself.
Yep, that's the way to go. No need for ASP.
> In C#, I don't have anonymous classes (aka poor man's closures). Am I
> suppost to use delegates here?
Yes, see System.Text.RegularExpressions.Regex.Replace, where you pass a
delegate to the method. It's very nice.
Greets,
Lawrence