473,698 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event driven handler in PHP

I am fairly new to PHP. I started creating a variety of classes
(calendars, input forms, combo boxes, etc. ) but I am running into code
overhead when I integrate these objects (testing for POST, GETS,
Cookies etc.).

I am looking for an interrupt driven approach to handle event
processing (akin to VB's GUI) to simplify interactions. Basically, I
would like to create the objects to be displayed on the pages and then
activate a page event handler to process ithe inputs. Currently I am
using a mix of js, php and session cookies. But I don't like this
hybrid approach.

AFIK, PHP does not natively support event interrupt handling. Is there
somewhere an add-on or a more elegant work-around to handle such
situations?

I read about Ajax, XML and related technologies. Is this the path to
go? Thanks for any pointers and/or advice.

Mark

Jun 19 '06 #1
3 2580
ms******@bluewi n.ch wrote:
I am fairly new to PHP. I started creating a variety of classes
(calendars, input forms, combo boxes, etc. ) but I am running into code
overhead when I integrate these objects (testing for POST, GETS,
Cookies etc.).

I am looking for an interrupt driven approach to handle event
processing (akin to VB's GUI) to simplify interactions. Basically, I
would like to create the objects to be displayed on the pages and then
activate a page event handler to process ithe inputs. Currently I am
using a mix of js, php and session cookies. But I don't like this
hybrid approach.

AFIK, PHP does not natively support event interrupt handling. Is there
somewhere an add-on or a more elegant work-around to handle such
situations?

I read about Ajax, XML and related technologies. Is this the path to
go? Thanks for any pointers and/or advice.

Mark


No, PHP doesn't support interrupt handling - but there's no need to.

The php runs and builds the page. The code then sends the page to the browser
and terminates. When you send input from the browser, a new process or thread
is started to handle the input.

One problem you will have is you can't "display an object" on a page. You can
only write attributes to the page. So you have no object to return to the script.

You could store the object in the $_SESSION and retrieve it later.

But you really need to think in a different way. This is not VB, where you have
one program running all the time. This is transactional - and is handled
differently.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jun 20 '06 #2

ms******@bluewi n.ch wrote:
I am fairly new to PHP. I started creating a variety of classes
(calendars, input forms, combo boxes, etc. ) but I am running into code
overhead when I integrate these objects (testing for POST, GETS,
Cookies etc.).

I am looking for an interrupt driven approach to handle event
processing (akin to VB's GUI) to simplify interactions. Basically, I
would like to create the objects to be displayed on the pages and then
activate a page event handler to process ithe inputs. Currently I am
using a mix of js, php and session cookies. But I don't like this
hybrid approach.

AFIK, PHP does not natively support event interrupt handling. Is there
somewhere an add-on or a more elegant work-around to handle such
situations?

I read about Ajax, XML and related technologies. Is this the path to
go? Thanks for any pointers and/or advice.

Mark


The Prado framework might be what you're looking for
http://www.pradosoft.com/. Haven't use it myself--I just saw the
periodic announcements here.

Since you're more comfortable with the event-driven approach, I suspect
you'll be happier programming in ASP.Net.

Jun 20 '06 #3
Also look at AJAX

ms******@bluewi n.ch wrote:
I am fairly new to PHP. I started creating a variety of classes
(calendars, input forms, combo boxes, etc. ) but I am running into code
overhead when I integrate these objects (testing for POST, GETS,
Cookies etc.).

I am looking for an interrupt driven approach to handle event
processing (akin to VB's GUI) to simplify interactions. Basically, I
would like to create the objects to be displayed on the pages and then
activate a page event handler to process ithe inputs. Currently I am
using a mix of js, php and session cookies. But I don't like this
hybrid approach.

AFIK, PHP does not natively support event interrupt handling. Is there
somewhere an add-on or a more elegant work-around to handle such
situations?

I read about Ajax, XML and related technologies. Is this the path to
go? Thanks for any pointers and/or advice.

Mark


Jun 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3726
by: alanrn | last post by:
For all you seasoned VB programmers this is going to be a no brainer. However, as a C programmer learning VB I'm having trouble getting my arms around the event-driven nature of VB. Suppose I have a form with a single command button (cmdPush). The form's code (including the cmdPush_Click() sub is between the dashed lines. --------------------------------------------------------------------
1
3429
by: Daniel Bass | last post by:
hey guys. overview --------- I'm designing a messaging system that works on the principle of late binding to the I/O objects, depending on the .Net class libraries present in the local folder. I may have an output File.DLL, and ODBC.DLL, that instantiate an abstract parent to stream data i receive... an input .DLL allows data to be streamed
1
1424
by: Philip Townsend | last post by:
I have a user control that displays the contents of a shopping cart. I want this control to update its contents whenever an item is added to the cart. Currently, the cart only updates if it is forced to do so through a page reload or clicking a button within the user control itself (thereby reloading the user control). I want to raise an event in the user control whenever an item is added to the cart. This event should cause the current...
3
1914
by: Pavils Jurjans | last post by:
Hello, I am looking for solution to assign the Session.onEnd event handler dynamically, at runtime, without using global.asax file. I am a bit sceptic wether that is possible, however I thought maybe it is possible to have a global.asax file with Session_onEnd method, that merely calls some delegate, and that delegate is assigned by my web application at runtime. Maybe there is some example ready?
6
2267
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to the same method (aka delegate?). I use the Tag property within this method to determine what user action is taking place. Very simple: When adding toolbar button: tbButton.Click += new...
14
2114
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven server. I've been told time and time again that I should use an event driven server design (that is, use twisted). There is a lot of interaction between the clients and they would often need to write to the same list of values, which of course...
4
6695
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and implement an Event based program and Message system. I have a very basic event engine that I'm feeling works a bit backwards. I'm looking for documents, source code, and books that may help me better understand how to implement this type of code. I am...
2
3919
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever possible to make the app more efficient and less resource demanding. On one page there are 2...
2
2720
by: ZBINContact | last post by:
I am creating a self-checking set of usercontrols. They tend to call their self-checking functionally in the "Load" event. I have run into a problem with my TextBox usercontrol, however, as the base component does NOT have a Load event as far as i can ascertain. What I need is to have a self-check function called when the component loads. I am currently using the "Layout" event but that can fire multiple times, and I can't just call...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.