Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

Event-driven programming

Thread view: 
sebek - 27 May 2007 23:37 GMT
Hi,
I have a look for framework like Prado (event-driven programming) for
Java.  Do you know something?

Thanx!
Daniel Pitts - 28 May 2007 05:22 GMT
> 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.
sebek - 28 May 2007 09:49 GMT
> 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?
Oliver Wong - 28 May 2007 19:34 GMT
> 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
sebek - 28 May 2007 22:27 GMT
>     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)?
Lew - 29 May 2007 02:32 GMT
"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

Oliver Wong - 29 May 2007 14:28 GMT
>>     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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.