Event-driven programming

S

sebek

Hi,
I have a look for framework like Prado (event-driven programming) for
Java. Do you know something?

Thanx!
 
D

Daniel Pitts

Hi,
I have a look for framework like Prado (event-driven programming) for
Java. Do you know something?

Thanx!

I know lots of things. Many of them about Java, some of them about
event-driven programming, and none of them about Prado.

Did you have any other questions? Preferable more specific.
 
S

sebek

Did you have any other questions? Preferable more specific.

I`m searching something like Prado in Java. My question, is framework
that allow event-driven programming?
 
O

Oliver Wong

sebek said:
I`m searching something like Prado in Java. My question, is framework
that allow event-driven programming?

Swing is pretty event-driven, I think.

Do you plan on using this framework for application development or web
development? I ask, because Prado is a web framework.

- Oliver
 
S

sebek

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)?
 
L

Lew

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.
 
O

Oliver Wong

sebek said:
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
 
T

Tom Hawtin

Oliver said:
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
 
D

Daniel Pitts

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

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.
 
O

Oliver Wong

Daniel Pitts said:
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.

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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Tom said:
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.

That sounds a lot like JSF with a JSP and a backing bean.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top