Using OOP to Handle Events in Web applications.
An effective event driven solution is possible when
the application is implemented with full discussions
and understandings, visualizing high level perpespevtivesfor
the future and how these applications should behave.
To control these applications behaviour according
to your wish, yourequire a sophisticated approach
for implementing events.
In PHP application terms we can say that creating
an object - oriented solution is exactly Event-Driven
programming. Considering an OO approach which has
become mature in the market, extensibility in web
applications development is all the rage.
Designing an Event-Driven solution for web applications.
Designng an event-driven web application includes
three main steps.
In first step you need to determine as how you will
go about capturing the events which the web applications
need to handle. On the other side, determining depends
upon what type of events you're trying to capture.
In the second step you need to decide on handling
the captured events as mentioned above. In this stage
you shall come up with numbe of questions depending
on the specific application.
After determining the events applicable to your web
applications and deciding their event handling method,
the third step includes designing the handlers necessary
to carry out whatever tasks the web applications require
in response to ach event. Examplesof responses are
directing a user to a new page updating a record,
firing more events.
For example: Let us assume that a user of our web
application will want to edit or view records of some
form or another. We could expect a URL such as the
following to be requested as a result of a susers
input returned from a form:
http://myserver/interface.php?event=edit
Its very clear from the URL that the event being
triggered is an edit event whatever that may mean.
the designing of an event - driven web application
ends with implementing the solution and the security. |