Tuesday, December 9, 2008

The Prodigal Developer Returns to Rails

It has been two days since I posted an article on auditing data modifications using the Zend Framework. I have recently published a number of other articles on Zend in general. I noticed a recurring statement that forced me to rethink the pursuit of using alternative frameworks for openEPRS:

"X is easier with Ruby on Rails than it is with (insert language and/or framework)"

When I started openEPRS in 2007, Ruby on Rails was the chosen platform. I liked it because it was easy to learn, concise and held close DRY development principles. It really is an amazing framework, one that is truly a disruptive platform.

Sunday, December 7, 2008

Audit Data Modifications with Zend_DB

One of the requirements for my electronic medical record prototype is ability to track data modifications as users interact with the system. I wanted to see how difficult this would be to accomplish using the Zend Framework. This exercise ranged from being extremely trivial with Ruby on Rails to quite convoluted using the Java Persistence API (JPA). A quick web search landed me at zed23 where I found an example by Ryan Brooks that was pretty close to what I was looking for.

Sunday, November 9, 2008

Phing, PHPUnit and the Zend Framework

This article covers some of the issues I encountered trying to execute a unit test and create a coverage report using Phing. I was surprised at the number of patches and workarounds that I needed to get this to work, some being harder to track down than others.

Saturday, November 1, 2008

Saturday, October 18, 2008

Building PHP Projects with Phing

Now that I have NetBeans, Zend and XAMPP installed and configured (see this article), I moved on to find a build system for my project. I have used Ant for years and as luck would have it, there is an equivalent for PHP called Phing. The need for such a utility is multifold: document generation, unit testing, packaging your project for distribution, etc.

I decided to go ahead and install Phing using the version of Pear that came with XAMPP. I thought this approach would make it easier to keep my development environment synchronized. I like to copy my XAMPP installation to a USB drive to simplify setup on the other boxes that I use for development. This eliminates the need to remember what packages I have installed as well as having to mange multiple Apache configurations.

Friday, October 10, 2008

A Word on Knowledge Base Articles

I thought I would make a quick comment on the knowledge base articles I have posted over the last couple of years. Someone recently asked why I would post an article on setting the JAVA_HOME environment variable in Ubuntu.

Like many Linux distributions, each one can have a slightly different way of doing something simple such as globally setting an environment variable. When I found the answer, I was going to put it in Tomboy. I thought, why not share my answer by adding it to a special category in my blog instead. In the past, I have found answers to technical questions on the web by others willing to share their knowledge. I decided to return the favor.

Some of my KB articles can be a little on the terse side, verging on being half-baked brain dumps to more useful step by step instructions on how to accomplish something. I hope some of you find them useful nonetheless!

KB: XAMPP SSL Configuration on Ubuntu

XAMPP SSL Configuration on Ubuntu Linux.

KB: Recursively Remove .svn Directories

To recursively remove .svn directories from the current working directory directory (Unix only):
rm -rf `find . -name .svn`

Sunday, October 5, 2008

KB: NetBeans and Zend Framework on Ubuntu

Guide for setting up NetBeans with the Zend Framework on Ubuntu Linux.

Sunday, September 28, 2008

Back to WordPress

After playing around with BlogEngine.NET for the last couple of months, I have decided to retire it and go back to WordPress. The bottom line is the software is not quite ready for Mono and Linux. There always seemed to be some minor issue to overcome whether it was installing a plugin or figuring out why your session was expiring unexpectedly. Most of these problems were related to subtleties in Mono's implementation of .NET and while they were not show stoppers, they always seemed to get in the way of using the tool for its designed purpose.

I might have stuck with BE however, the project lacks any sort of unit or integration testing which would help with the quality of the releases. There appeared to be a number of bugs and discussion topics related to regression failures which confirmed this is a problem that could be mitigated through some sort of testing discipline.

I would like to thank the BlogEngine developers for creating a feature packed open source tool.  Please consider taking a test driven approach with future versions of BE and you will have a winner!

Monday, September 15, 2008

Mono Development on Ubuntu

The past month has been an in depth investigation of developing .NET applications on Ubuntu using Mono. The experiment was quite simple, use Mono and MonoDevelop to create a simple ASP.NET application. The test application was built using Mono 1.9.1 and MonoDevelop 2.0 from the SVN repository (trunk).

The application makes use of master pages and the membership API. I used the membership providers from the BlogEngine.NET project to save time. Putting the application together with MonoDevelop was not difficult however, it would have been nice to have a shortcut for adding page events to the code-behind instead of from memory or the API documentation. If this functionality exists, perhaps a reader could kindly point out how to use it.

After a couple of hours I have this little test application that serves pages to authenticated users with role based authorization. I am feeling pretty good at this point and I am ready to move to the next part of my evaluation, unit testing. This is where MonoDevelop’s warts start to surface and although I am using an alpha version of the IDE, the problem encountered has been reported in the past on the Mono mailing lists and Novell’s Bugzilla.

Monday, August 18, 2008

Recursive Stored Procedures

Here is a short example of a recursive stored procedure.  It returns the nth piece of a delimited text string using recursion.  There are better performing methods for doing this type of task, however, I found it an interesting exercise none the less.

Saturday, June 7, 2008

GlassFish and Cactus Unit Tests

I started creating Cactus unit tests for a number of servlet filters in openEPRS.  I didn't get far before encountering a number of strange problems.  For the life of me I could not get the cactifywar ant task to add a FilterRedirector to my project's web.xml.  I posted a number of questions to the Cactus user's mailing list and although I received excellent support from Petar Tahchiev, we could not determine what was causing the problem.  I decided to RTFM and to make a long story short...

Updated: Ubuntu 7.10 and Gateway 6400 Server Stability Issues

Since upgrading my ancient Gateway 6400 server to Ubuntu 7.10 (Gutsy), the system has experienced a number of random lockups. I have been working on trying to resolve the problem for a solid week with limited success. I hope this article may be of some use to those experiencing similar problems with the latest Ubuntu server distribution.

Saturday, May 24, 2008

openEPRS: Web Services Console

I decided to spruce up the default page for the openEPRS web services application.  The application is implemented using the Jersey RI for JSR-311 REST Web Services.  While Jersey provides a nice UI for testing your web services, trying to integrate it into the main application was more trouble than it was worth.  Since the framework is still under development, I don't want to redo all my modifications every time a new version is released.  I still wanted to find some way of displaying what services are available and document how they are used.

Saturday, May 3, 2008

Mingle 2.0 Upgrade

Last week I upgraded Mingle from 1.1 to 2.0. This time it looks like some of the memory and CPU issues have finally been tamed. Although ThoughtWorks recommends 2GB of memory for Mingle (it still boggles the mind that it needs this much RAM), I have been successful with 1GB on one of my servers with the application using roughly 385MB. Trying to run Mingle 1.1 on this same machine resulted in the server coming to a crawl after 2 days of operation. Both CPUs would be at 80% utilization with no free memory, all this with no one using the application!

I'll keep my fingers crossed with 2.0 hoping the memory gremlins don't return.

Friday, February 15, 2008