Welcome to TheGillis.net

Consider this site a collection of random notes about a variety of topics. I hope this information helps you in some way.

17 January 2005 - 23:30PHPTAL and PHP 5

I was going to post an article about how to upgrade to PHP 5, but after removing the PHP 4 port and installing the PHP 5 port all I needed to do was install the corresponding PHP 5 extensions. All of my sites, test code, everything worked. I was truly surprised. The only thing that did not work was my PHPTAL installation. It turns out that due to the differences in how objects and references are handled, PHPTAL version 0.7 no longer works with PHP 5. There is a new version specifically for PHP 5 which is the development version 1.0.0dev7. So I removed the last version and added the new version. It turns out that some stuff is different. This should explain some of the issues that I had to do in order to convert over.

No Comments | Tags: Programming

12 October 2004 - 20:38Intro to CVS

I use CVS as my source control system for essentially everything. Although some of the tools that interface with CVS such as Eclipse, there are a whole lot of tricky, painful CVS details that can sneak up on you. Not only that but using the command line version of CVS can be even more daunting since the one cvs executable handles all the 31 commands. Information references such as ‘man cvs‘ and ‘info cvs‘ are helpful, but the length of both is extreme. I’ll try to go over some of the benefits, setup, and use in this article and more to follow.

No Comments | Tags: Programming Tools

29 September 2004 - 23:51PHPTAL And Outputting Variables With HTML

On thing that I had no idea about when designing my first site using PHPTAL was it’s curious feature where it automatically escapes all HTML output. I can see how this would be quite helpful, since there could be situations where harmful code could be injected into one of the variables and bad things would occur. Not only that it forces the content to adhere to the XHTML standards on it’s own. This did not work for me. I had a TON of data in HTML out of a database that needed to get dumped into a table, and I couldn’t change the format. It was NOT in the documentation on the Sourceforge site, or in the SGML documentation distributed with the software. Well, it took a ton of searching, but I’ve found it. The structure keyword. Read on for usage.

No Comments | Tags: Programming

24 September 2004 - 19:45PHP Irritation

I was researching the possible use of a piece of software that required network connections to access the data from it. My first idea was to create a single instance connection pool object that would remove the connection overhead and provide a locking mechanism to keep track of the items in the pool. The downside is that I was trying to write this in PHP and after finishing all of the code I discovered that no matter what I did to persist the pool object, it would still get destroyed and re-created. I attempted to use the $GLOBAL superglobal, a static class member, and even a static function object. Nothing would stop the object from getting destroyed. After days of searching, I have come across several people that hint at the fact that there is no way to achieve this. Most of them are connecting to databases so they suggest using one of the persistent connection functions. This does not work in my case. I have abandoned the idea unless someone can figure out if this can be done. PHP goes down another notch in my book :(

No Comments | Tags: Programming

12 September 2004 - 18:24PHPTAL

When comparing PHP to JSP, I believe that JSP’s are the better solution in most situations. Although some may disagree, JSP and Servlets make it easier to scale your project vertically. With PHP you can add more pages to scale horizontally, but when scaling vertically, the crazy web of includes and the data types that are carried through all the files make a project quickly unruly. Since I am forced to develop in PHP on some system setups, I have recently learned about a new project PHPTAL. This allows your PHP project to get one more leg up on the vertical scalability pole by separating all of the business logic from the web interface. It also keeps the web interface tag-free and fully XML compliant.

No Comments | Tags: Programming

2 September 2004 - 17:00A Discussion on Java Style Standards

Today I read the Sun Java Coding Standards paper, and I agreed with everything except one point. I’m a big fan of coding standards. Although sometimes I run into small issues with them, I find that they make things easier to read and understand. The biggest issue that I find most people have with coding standards is that it doesn’t match their way of coding. I can understand their complaints to some extent but in general I think it works best if a project is in one format. Usually coding standards are fairly strict and cut down on a lot of the “fun” things that you can do: assignments inside statements, goto’s, multiple statement lines. Now, on to Sun’s surprise.

No Comments | Tags: Programming

21 August 2004 - 15:23Java Application Logging With Log4J

One problem that I have always faced with creating robust Java Applications has been logging the state of the program. In some cases it’s important to know about debug information, while other times it can get in the way. Even solutions that initially appear simple, can turn out to cause problems. One example is using System.out.println statements. This can cause problems when the application is no longer attached to a console such as in a Servlet. Other times having a console open with a Swing application can be difficult. Then to remove the output, it is necessary to comment out all of the print lines in a final release, taking even more time. One very good solution I’ve run across is using the Jakarta Log4J project.

No Comments | Tags: Programming

25 June 2004 - 20:19Apache, Tomcat, and JK2. Install/Configure

I needed a servlet container to start learning about JSP’s and Servlets, and the only two that I had heard of at the time were Bea WebLogic and Apache Tomcat. Since I run FreeBSD and trust Apache, I decided to go with Tomcat.

No Comments | Tags: Java