 |
| What is Japha?!? |
| What: | Japha is an attempt to bring the main classes in the Java 1.4.1 (soon to be 1.4.2, time allowing) to PHP for use in everyday programs. We do this using the syntax that has been made common with the new releases of PHP 5. This allows us to easily implement interface, abstract classes, and more inheritance capabilities, not to mention excellent error handling and the ability to better conform with user-created data types. |
| Why: | There is no standardized set of classes to use in php programs. There are essentially three options for people who want to create easily expandable and easy to read code. Write your own classes, which can be tedious. Writing your own classes would also be made nearly pointless for common tasks with a standardized library. Use the PEAR classes, which can be frustrating because they aren't available to all users of php -- If you are willing to package PEAR classes with your project then it is an acceptale choice, however, you want to be able to get the best updates for the classes. Download a class library, such as Eclipse or Japha. This allows you to package only the classes that you need with your project, and gives easy implementation for common tasks such as collections, iteration, and database abstraction -- not to mention an easy transition for Java to programmers to the PHP language. |
| Limitations: | Although we have been able to create a reusable set of classes for use in everyday programs, there are several things that we are unable to do with php that Japha's native Java counterpart can do easily. These include: Polymorphism/Overloading: PHP is loosely typed, and is compiled at runtime, which means that there are no dynamic options for passing information to methods as there would be in a language such as Java. There are ways around this in PHP, which include the option to use default parameter values for methods, and abstract data types.Abstract windowing. This is expressed in the Java AWT (Abstract Windowing Toolkit) and Swing packages, where users can create standardized GUI-based applications that will run on any platform that supports the Java environment. We obviously can't do this with PHP (although we (we being the author(s) of Japha) are considering trying something along the same lines using GTK), so we've decided to port the swing classes to what their equivalents in HTML would be. For instance, a JTextField converts into a simple text field on a form. |
|  | |
|