Monday, August 17, 2009

Event-Driven Solutions for Web applications

Introduction to Event Programming in Web Applications.
Web applications are popular event-driven programming softwares as they include prospectives like handling the web applications rather than looking at those applications architectural design from a traditinal object-oriented perspective. In earlier stages for managing the application we had to discard the OOP approach altogether to implement event handling. But now with maturity in PHP programming we use Event-driven solutions for web applications by building classes around the events relevant to the applications.

One can easily understand Event-driven programming beacause its pretty often visible in web applications like e-mail or write text. Event handling is at its zenith importance for Windows based programs and applications. Its because these applications are designed in such a manner that they are lurking aroubnd until the user does something and then react accordingly. Any application using GUI is likely to be event-driven programmes. The way we deal with web applications is more about how we "think" about designing an application rather than how we actually implement it.

What are Events?
Any occorrence to which an application can react is called an Event. Event handling can be explained as when something happens, some condition at a sudden, deciding what action to take in your code even when the situation is trivial.

For example: While implementing a database holding a number of records, the customers must be able to work on those records via a Web Interface, and the users would certainly need features where they can view and update records. And thus you will require to create functions to view and edit records.The decision of which function to call entirely depends on the input provided by the user. Accordingly the interface you develop will have to present the various options and let the users decide which one they want. After the user has decided, the applications need to respond accordingly bycalling the correct functions, which will handle the request.

This handling of application according to the needs of users and usability of the administrators is called Event handling. System generated events are best fitted for web applications running in softwares like outlook express.

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.

Conclusion.
The motive behind all this explaination is to make aware that any one can easily end up with a big mess if the web application changes or grows after a particular initial development run. A simple web application can grow to monstrous proportions, rendering any attempts to understand it in the future very difficult indeed. And so we prefer using simple methods only forvery simple requirements, where we are sure that the code at any time will not grow into a full - blown enetrprise application.

So for maintaining these unclutterd code use of classes and objects are the best solution which also allows you to create an easily extensible architecture.

Creating an event - driven web application is a problem - specific business and much attention should be apid to the environment in which the intended application is to run. All the above mentioned issues need to be carefully considered when designing a well architected enterprise level, event - driven web applications.



Related Links :
Internet Media Solutions l Superhostindo l Jababeka Business l Ayo Kencan l Kesaksian Kristen l Lirik Lagu Rohani Kristen

No comments: