6.02.2006
Brake lights with 5 bars
I've been stuck in traffic while driving a lot lately. Why don't car brake lights show how hard someone is braking? It seems to me if we standardized on a size of brake light that could go on the back of every vehicle, that we could have 5 bars on it. When the driver is braking hard, all 5 bars would be lit, when breaking moderately, only 3 bars would be lit, and when just tapping the brakes, only one bar would be lit.
Maybe I'm just a sucker for standards like this.... but this idea would save everyone from having to evaluate the distance and speed of multiple cars while in stop and go traffic and would probably prevent a lot of minor accidents. Somebody should start working on this.
6.01.2006
PHP Zend Studio 5.2 Released with license for Zend Platform
From the email:
I've already downloaded the update and installed. However, it's not clear how you actually get the license for the platform. Hopefully they straighten that out so I can start playing with it.
UPDATE: How to get the Zend Studio Platform and get it licensed.
Zend is pleased to announce the release of Zend Studio 5.2 - now including a free developer license for Zend Platform allowing you to increase the reliability and maximize the performance of your application before deployment.
I've already downloaded the update and installed. However, it's not clear how you actually get the license for the platform. Hopefully they straighten that out so I can start playing with it.
UPDATE: How to get the Zend Studio Platform and get it licensed.
5.08.2006
JSP to PHP and Back Again (with Netbeans)
Several years ago, I worked at a dotcom start-up working on JSP templates for an ATG system. I’ve dabbled in Java on and off for a few years, but I’ve mostly worked with PHP. Well, now I have a few projects at work coming up that require me to do some Java / JSP web development so I’ve been diving into everything there is that world.
Needless to say, the Java / JSP landscape has changed quite a bit since the year 2000.
I’ve mainly been concentrating my efforts right now on Tomcat. So I’ve started using Netbeans which has a bundled version of Tomcat. Pretty cool stuff. However, there’s quite a few things missing from the Netbeans tutorials.
When I launched a basic JSP page, I kept receiving the message: “Starting of tomcat failed, the server port 8084 is already in use”
I thought maybe it was Apache so I shut that down. Then I shutdown Mysql, Postgresql and Oracle express (I like databases). Still nothing. Hmm… it worked at the office, but now not at home. What’s the difference? Ahh… the Norton firewall stuff. Once I disabled that, we were good to go. So, instead of leaving Norton off, I finally added the Tomcat ports (8084, 8081, and 8025) to the Norton rules.
When running the “Getting Started” Netbeans tutorial… about the second thing they have you do is to run a simple JSP page, but one that uses JSTL 1.1. When creating a new web app project, Netbeans creates an index.jsp file with some JSTL stuff in it. It's commented out but it's just begging to be played with. I thought this was kind of like going to med school and performing brain surgery your first day. But anyway, I uncommented the lines.
When attempting this, I received two main errors:
org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved
After several minutes of searching, I realized, that you have to add the Tag Library within Netbeans to get this tutorial to work. You’d think they would just tell you that… and tell you how. Big strike agains Sun right there for me.
Anyway, you add the library like this:
Now to work up some basic CRUD functionality with MySQL. More notes as I discover and untangle my frustrations.
Needless to say, the Java / JSP landscape has changed quite a bit since the year 2000.
I’ve mainly been concentrating my efforts right now on Tomcat. So I’ve started using Netbeans which has a bundled version of Tomcat. Pretty cool stuff. However, there’s quite a few things missing from the Netbeans tutorials.
Frustration # 1
When I launched a basic JSP page, I kept receiving the message: “Starting of tomcat failed, the server port 8084 is already in use”
I thought maybe it was Apache so I shut that down. Then I shutdown Mysql, Postgresql and Oracle express (I like databases). Still nothing. Hmm… it worked at the office, but now not at home. What’s the difference? Ahh… the Norton firewall stuff. Once I disabled that, we were good to go. So, instead of leaving Norton off, I finally added the Tomcat ports (8084, 8081, and 8025) to the Norton rules.
Frustration # 2
When attempting this, I received two main errors:
org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved
After several minutes of searching, I realized, that you have to add the Tag Library within Netbeans to get this tutorial to work. You’d think they would just tell you that… and tell you how. Big strike agains Sun right there for me.
Anyway, you add the library like this:
- Go to the properties of your project
- go to library
- add library
- jstl 1.1
- save
- then run
Now to work up some basic CRUD functionality with MySQL. More notes as I discover and untangle my frustrations.
4.09.2006
Zend Inspectors Window
NOTE: Having recently started using Zend at work and at home for projects, I think it's a great product that has sped up my PHP development time quite a bit. I will therefore be posting some tips and tricks on its use in the following weeks.
The Inspectors Window displays the methods/functions and any included/required files for the PHP program that you are currently working on. For PHP class files, it will also show all the class variables (properties) and any other inherited methods.
To display the Inspectors Window in Zend, you can either go to the View menu and select Show/Hide Inspectors or click on the "Inspectors" area in the side navigation. Then you can click on the "File" button at the top of the window. You can also inspect all the files for a given "Project" but that's beyond the scope of this tip.
To test it out, bring up a PHP file that has functions in it, and look in the Inspectors area. It will show you all the functions available. It also shows the parameters that need to be sent for each function. If the function returns a value, the Inspectors window attempts to figure what data type the returned value is (that's why there's a lot of "unknowns" listed. The return value needs to be specified in comments using PHPDoc code (which will be a future tip).
Clicking on the function name in the Inspectors window takes you right to the code where the function is declared... kind of a function bookmarket. Pretty nifty.
When working with objects/class files, the Inspectors window is even more helpful. If you have any object inheritance, it will drill up into each parent object and show you those inherited methods as well. This means theres' hardly ever a need to do a print_r(get_class_methods($this));
If you have any questions on this, please feel free to ask. Until next time, happy inspecting!!
The Inspectors Window displays the methods/functions and any included/required files for the PHP program that you are currently working on. For PHP class files, it will also show all the class variables (properties) and any other inherited methods.
To display the Inspectors Window in Zend, you can either go to the View menu and select Show/Hide Inspectors or click on the "Inspectors" area in the side navigation. Then you can click on the "File" button at the top of the window. You can also inspect all the files for a given "Project" but that's beyond the scope of this tip.
To test it out, bring up a PHP file that has functions in it, and look in the Inspectors area. It will show you all the functions available. It also shows the parameters that need to be sent for each function. If the function returns a value, the Inspectors window attempts to figure what data type the returned value is (that's why there's a lot of "unknowns" listed. The return value needs to be specified in comments using PHPDoc code (which will be a future tip).
Clicking on the function name in the Inspectors window takes you right to the code where the function is declared... kind of a function bookmarket. Pretty nifty.
When working with objects/class files, the Inspectors window is even more helpful. If you have any object inheritance, it will drill up into each parent object and show you those inherited methods as well. This means theres' hardly ever a need to do a print_r(get_class_methods($this));
If you have any questions on this, please feel free to ask. Until next time, happy inspecting!!
Subscribe to:
Posts (Atom)