"Oliver Wong" wrote:
>> Do you plan on using this framework for application development or web
>> development? I ask, because Prado is a web framework.
> Web development. Is it good choice (event-driven programming)?
IMHO event-driven programming is a useful technique, but the term does not
encompass all there is to programming.
Like many other techniques, it has a place and it is a good orientation for an
application framework, but it is not the final answer to all programming
questions.
Think of the furniture maker. Is a hammer a good tool? Is a saw? That
depends in part on whether you are putting things together or taking them apart.
Another framework that supports an event-driven approach for web apps is Java
Server Faces (JSF) from Sun.
All good frameworks require study.
I am slowly learning JSF myself.

Signature
Lew
>> Do you plan on using this framework for application development or
>> web
>> development? I ask, because Prado is a web framework.
>
> Web development. Is it good choice (event-driven programming)?
I don't even know what "event-driven" means, in the context of a web
application.
Are the events the HTTP requests? If so, then how is "event-driven web
app" different from "normal web app"? If not, then what are the events?
- Oliver
Tom Hawtin - 29 May 2007 15:15 GMT
> I don't even know what "event-driven" means, in the context of a web
> application.
>
> Are the events the HTTP requests? If so, then how is "event-driven web
> app" different from "normal web app"? If not, then what are the events?
A POST (or I guess PUT, DELETE, etc) would be an input event. Generally,
then have some standard code that updates some state associated with the
form (persisted in some random way). That change of state would then
fire state change events.
Tom Hawtin
Arne Vajhøj - 03 Jun 2007 02:41 GMT
>> I don't even know what "event-driven" means, in the context of a
>> web application.
[quoted text clipped - 7 lines]
> form (persisted in some random way). That change of state would then
> fire state change events.
That sounds a lot like JSF with a JSP and a backing bean.
Arne
Daniel Pitts - 29 May 2007 15:29 GMT
> >> Do you plan on using this framework for application development or
> >> web
[quoted text clipped - 9 lines]
>
> - Oliver
Often, a event-driven webapp might use Ajax, or Cometd to push/poll
events between the server/client. Also, Spring Web Flow is considered
event-oriented. The actual HTTP request isn't the event, but instead
describes the event (the user clicked on button A, or the user clicked
on button B).
Event-driven is often just a way to explain the information flow
within an application. If you get down to it, all programs are finite-
state Turing machines.
Oliver Wong - 29 May 2007 17:01 GMT
>> I don't even know what "event-driven" means, in the context of a
>> web
[quoted text clipped - 13 lines]
> within an application. If you get down to it, all programs are finite-
> state Turing machines.
To me, the main difference between event-driven applications and
non-event-driven applications are that with event-driven applications,
when someone asks you to point at the line of code that's currently
executing, it's possible for you to say that there isn't any such line,
that the system is waiting for an event to occur to trigger some
behaviour. E.g. contrast these two pseudocode listings:
Begin Program
Print "What is your name?"
Input $NAME
Print "Hello " + $NAME
End Program
Begin Program
On Key Down $KEY_ID
Begin Subprocedure
Print "You pressed key: " + $KEY_ID
End Subprocedure
On Key Up $KEY_ID
Begin Subprocedure
Print "You released key: " + $KEY_ID
End Subprocedure
End Program
With the first program, even if the program is idly waiting for input,
you can point to the "Input $NAME" line and say "This is the line that's
currently executing", whereas you can't really do the same with the second
program.
Almost every web app I've seen is, in this sense, event-driven. Code
usually runs in response to a visitor requesting some web page. When
there's no visitors, there's no requests, and thus none of your code is
running (the server's code may be running, but I consider the server to be
a distinct application form your web app).
- Oliver