file under misc.

stuff which doesn't fit anywhere else 
Filed under

work

 

Building Desktop Applications

It's been a long time since I had to build GUI applications for desktop users. Recently, the subject of desktop applications has come back at work with some questions about 4GL tools for rapid application development.

I think I've found a better path: Python + wxPython + py2exe + Nullsoft Scriptable Install System

I can build wxPython applications on my Linux box, create Windows executables with py2exe and provide a nice installer with NSIS. This allows me to be productive in a powerful language I love and not make any unreasonable demands of my non-technical user base.

The relevant links are:

http://www.py2exe.org/

http://nsis.sourceforge.net/Main_Page

http://hmne.sourceforge.net/

Loading mentions Retweet
Filed under  //   code   work  

Comments [0]

Migrating a Centralized Repository Team to Git

A useful how-to on using Git as a centralized repository.

http://toroid.org/ams/git-central-repo-howto

This a model we'll likely follow this summer at work to migrate from the current centralized version control system over to DVCS.

I think we'll still follow our current model of using feature branches to develop/refactor code while keeping the trunk consistent with the current production codebase. However, using these feature branches will become much less expensive and easier with Git. I've been using Mercurial to do the same types of tasks for almost a year and been totally happy with it.

Loading mentions Retweet
Filed under  //   code   work  

Comments [0]

Using Variables in Velocity Method Parameter Lists

I just had to troubleshoot some problems with Velocity. The issue was related to a method in a template like this:

${messages.getMessage("thank.you", null, locale)}

In this case, the messages variable is a class implementing Spring's MessageSource interface and used for localization in the Velocity template (which is used for generating emails).

The problem was that the "locale" parameter was always null even though I was setting it in the Velocity model Map. A quick review of the Velocity User Guide and VTL Reference didn't yield any help.

I finally figured it out, though. The proper syntax for using a variable in the parameter list is:

${messages.getMessage("thank.you", null, $locale)}

You still need the dollar sign in front of the variable name. I had assumed the initial dollar sign created a variable-friendly scope to the text inside the brackets but I was wrong. My frustrations were compounded by the lack of examples on the Velocity site which used variables in parameter lists - they all have either static String parameters or no parameters at all. Meh.

Loading mentions Retweet
Filed under  //   code   work  

Comments [0]