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.

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