Gentoo Archives: gentoo-user

From: "Boyd Stephen Smith Jr." <bss03@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Web mail
Date: Wed, 03 May 2006 05:53:38
Message-Id: 200605030037.11547.bss03@volumehost.net
In Reply to: Re: [gentoo-user] Web mail by JimD
1 On Tuesday 02 May 2006 23:37, JimD <Jim@×××××××××××××××××.org> wrote
2 about 'Re: [gentoo-user] Web mail':
3 > Michael Sullivan wrote:
4 > > What other style is there besides procedural?
5 >
6 > A much better way IMO is to separate the presentation from the code like
7 > you can do with ASP.Net with Mono/MS. ASP.Net makes web app development
8 > *event* oriented. You write event handlers to handle certain events
9 > like a page loading or a button being clicked, just as you would do with
10 > a GUI app, and you don't have to have all the markup spewed about in the
11 > code.
12
13 The output of ASP.Net is trash. Most notably it doesn't gracefully degrade
14 as the browser loses features, and generates unnecessary round-trips to
15 the server.
16
17 I agree that event-driven programming generally a better fit for GUIs,
18 however it's not really a good fit for HTTP. I prefer a middle ground
19 that removes the spew of markup (which is bad) but doesn't work against
20 HTTP/HTML. In general, the goal is for php/java/vb/c#/<your language
21 here> to not generate much markup, but to generate the content inside the
22 markup.
23
24 > With an
25 > event-driven web app, the code would have been separated and it would
26 > have been real easy to make changes to.
27
28 Code separation is easily done without writing event-driven code. You can
29 define procedure libraries and/or Class (and object) hierarchies that
30 don't deal with markup but use their results in the markup.
31
32 Code separation is easily broken even in event-driven code -- there's
33 nothing preventing event driven code from outputting or manipulating
34 markup in ugly ways.
35
36 Writing an event-driven dynamic webpage is a little questionable to begin
37 with since the underlying protocol is request-driven. If your
38 applications are request driven, you'll find they are much easier to
39 debug. Work *with* the tools you are given, not against them. On top of
40 that, you have very little control over the other side of the protocol,
41 most of the time. This is basically a requirement for layer another
42 framework on a protocol and changing how it works. E.g. TCP
43 [stream-oriented with delivery guarantees] over IP [packet-oriented with
44 no delivery guarantees] has fairly specific behavior for both sides of the
45 TCP connection.
46
47 All this said (and bringing the message full-circle), if your example is
48 indicative of the larger code base:
49
50 The SquirrelMail source code is trash.
51
52 --
53 "If there's one thing we've established over the years,
54 it's that the vast majority of our users don't have the slightest
55 clue what's best for them in terms of package stability."
56 -- Gentoo Developer Ciaran McCreesh

Replies

Subject Author
Re: [gentoo-user] Web mail JimD <Jim@×××××××××××××××××.org>