Jump to content

PHP applets (without having the interpreter installed on the client).


zuhair

Recommended Posts

PHP is my first love. However one of the biggest drawback with PHP is that it is impractical to implement client side functionality since you need to have the PHP interpreter installed on the client machine which is seldom available in case of laymen users.

Java has the advantage of having JVM running on most of the machines which allows Java to implement stuff  like applets. Now, is there a way of having something like PHP applets without the hassle of having the PHP interpreter installed on the client machine?

I have an idea that can make PHP applets possible. To begin with, a mini-php interpreter as a firefox extention that can have adhoc communication with server-side PHP in the conventional applet fashion.

I have a lot of ideas in this direction, you guys wanna join?
[quote]is there a way of having something like PHP applets without the hassle of having the PHP interpreter installed on the client machine?[/quote]

No there wouldn't be. Of course you could develope slimmed down php interpreter without the extensions enabled, but really, I dont see much use for such a tool.

Whats wrong with using Javascript on the client? You would have all sorts of security issues trying to use PHP.
[quote]No there wouldn't be. Of course you could develop slimmed down php interpreter without the extensions enabled, but really, I dont see much use for such a tool.[/quote]

If you intend to use PHP only for typical web development then Javascript is definitely the way to go.
But when your requirements exceed the scope and ability of javascript, you are forced to introduce a third platform.

Consider a scenario where you need to create a chatroom with video conferencing feature, there is no way to access the webcam device through javascript directly. You either need a Java applet or an activeX object. Where as you could comfortably write a video-conferencing desktop application in PHP using DIO or a C extention.

I see a lot of power in porting PHP's IO capabilities to its web environment.

[quote]Whats wrong with using Javascript on the client? You would have all sorts of security issues trying to use PHP.[/quote]

The design of the proposed mechanism shall be identical to applets or activex, the user would have the ability to allow the object to be loaded into the browser or simply deny it. As far as new security issues are concerned, with great power comes greater responsibility, it is up to the community to design a secure solution as they always have.
Both good points, but as you've said yourself...

[quote]The design of the proposed mechanism shall be indentical to applets or activex[/quote]

So why not just use them? Im just not sure I really see a huge place for such a tool, though Im sure if it did exist I would probably like to try it out.

So.... where do we start?
[quote author=thorpe link=topic=119779.msg491015#msg491015 date=1166945477]
Both good points, but as you've said yourself...

[quote]The design of the proposed mechanism shall be indentical to applets or activex[/quote]

So why not just use them? Im just not sure I really see a huge place for such a tool, though Im sure if it did exist I would probably like to try it out.

So.... where do we start?
[/quote]

It doesn't take more than a few minutes for me to have this done in a java applet, but the question is why should I? Why am I using PHP if it isn't complete or has very limited scope?
From an architectural perspective and as a policy issue it is important to adhere to a single platform i.e either LAMP (Linux Apache MySQL and PHP) or JAVA or .NET

If the community wants LAMP to be an end to end platform then we must fill the gaps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.