 | News Feed |
Sections
|
| feed this: |  |
PHPImpact Blog: Building Web Applications Using PHP and Java
by Chris Cornutt June 03, 2008 @ 13:42:39
This recent post on the PHP::Impact blog spotlights a useful little tool for those developers needing to span the gap between PHP and Java in their applications - the PHP/Java Bridge.
The PHP/Java bridge allows you to quickly access Java classes from within your PHP classes without having to know Java and vice versa. Because of this two-way flexibility, you can access hundreds of pre-built Java classes from PHP, and hundreds of pre-built PHP classes from Java opening up your applications to greater flexibility and enhanced functionality.
The post includes an introduction to the bridge's functionality - its functions/methods, how to make a new instance of it, catching exceptions and the type conversion it automatically does (like lang.java.String directly to the PHP String type).
They also mention the Zend Platform bridge functionality for a more commercial solution.
voice your opinion now!
application build java bridge phpjavabridge zendplatform
Wez Furlong's Blog: PHP Objective-C Bridge
by Chris Cornutt November 05, 2007 @ 12:04:00
Wez Furlong has posted an example showing a cool little tool that he's whipped up that looks to bridge the gap between PHP and the Objective-C runtime:
I've had some code hanging around on my laptop for the better part of a year (feels like two, but I don't think I've had my MBP that long), that implements a bridge between PHP and the Objective-C runtime.
Yesterday I debugged the last portion that I regarded as a total showstopper for anyone else that might want to use it, and added a script that pulls in your PHP installation and dependent libraries (such as Fink or Mac Ports libraries) and generates a "Bundle" and optionally a DMG containing the Bundle.
He had a fellow developer try it out on Leopard too (things broke, but most are fixed) who also created a simple ping example to show off this project in its (very early) alpha stages. He mentions in the post how to get to the code, but if you can't locate it, just wait a bit - he'll have it posted up soon enough.
Also check out Sean Coates' and Joseph Crawford's comments on the project too.
voice your opinion now!
objectivec bridge project ping example leopard objectivec bridge project ping example leopard
Ivo Jansch's Blog: System.out.print in PHP
by Chris Cornutt March 09, 2007 @ 07:12:44
Ivo Jansch discovered something interesting by way of an applicant's resume - a hidden "trick" that PHP pulls on the user when they try to use a Java-like syntax with System.
So yesterday I was reviewing a code sample that a job applicant had written during a test and I encountered the following line of code: It's not hard to guess what his background was :), but I was initially stunned that this actually works in php.
After a little investigating (and ruling out the Java Bridge), Ivo found that the line was being interpreted literally and was just being handled as a string instead of a constant. He gives two other examples to help with clarification.
voice your opinion now!
constant string java bridge notice constant string java bridge notice
DevShed: Decoupling the Validation of Data with Bridge Classes in PHP 5
by Chris Cornutt January 10, 2007 @ 14:03:00
DevShed has posted part two of their look at working with bridge classes in PHP5, looking in detail at the decoupling of the data validation from an input form.
In the course of this second tutorial, I'm going to show you how to create a bridge class which will come in handy for decoupling the validation of user-supplied data. There will be a class that defines generically how certain data must be verified, while others will implement different validation methods.
They start with building a simple bridge class, a validator class that defines methods to check strings, numbers, alphabetic, and email values. For each of these types, they create the corresponding bridge class that validates the input. Finally, they tie it all together, validating an example of each, handled inside of try/catch blocks to watch for the errors that might be thrown.
voice your opinion now!
php5 bridge class decouple tutorial validation form php5 bridge class decouple tutorial validation form
|
Community Events
Don't see your event here? Let us know!
|