Synchronized Web development workflow

It’s been six years since I switched from HomeSite to Eclipse+CFEclipse as my primary ColdFusion development environment. At the time, my switch was primarily driven by my switch to Mac for development, but the desire for integrated support for version control (e.g. Subversion) directly within in the IDE helped with that as well.

One of the things that has long bugged me about developing ColdFusion apps locally on a dev box (i.e. not on a shared network server) is the need to place project files directly in a Web root somewhere – for example, C:\InetPub\wwwroot on Windows/IIS or in C:\ColdFusion9\wwwroot if you use ColdFusion’s built-in Web server. This throws off my game in two ways:

  1. Browsing to where your files live (in Finder/Explorer, or via the command line) inevitably adds an extra step to every task
  2. Placing the project home outside your user space on the OS makes it more likely you’ll lose the files when upgrading/uninstalling/migrating.

Pain point one could be tackled by sprinkling my system with aliases, shortcuts and/or symbolic links. This reeks of configuration, and would be something I’d need to duplicate on any system I use.

Pain point two there is really the kicker. Sure, using version control keeps you from losing your work, but rebuilding the workspace after a system migration can take a long time. I rarely migrate applications when I get a new system; I prefer to just move the user files and reinstall the apps manually. This periodically cleanses the system and keeps me up to date on patches, even on apps I don’t use often.

I tried keeping my actual project files in a workspace somewhere convenient, such as in my home directory or in the root of the drive (e.g. C:\workspace\MyColdFusionApp)  and then copy the files to the server root to test them. I tried both manual copying and even Subversion commands, but I couldn’t keep that up for long. Part of the benefit of developing anything locally on your system is removing the step of uploading your code to a server to test it, and I was basically backsliding towards that kind of process.

But the idea was sound, and I looked around for something that would painlessly synchronize two folders in different parts of the drive – the project files in my workspace, and the files in a folder under the Web root. My last resort would be to use something like rsync, but I looked around for some sort of plugin for Eclipse – something that could keep the preferences as part of the Eclipse project and/or workspace and be easy to migrate and hard to lose.

With a little digging I found FileSync – a plugin which really fit the bill. It’s open source, and if you can look past the, ah, unpolished Web site of its creator the plugin works pretty well. When I save a file in my workspace, it painlessly gets pushed out to the Web server root for testing.

The plugin also appears to work with network drive targets, so you may be able to use it to publish changes out to a preview or QA server automatically, but you should probably be using some sort of version control for that. :)

April 14, 2010Permalink

WordPress Plugins for the Personal Web

The first thing I looked for after successfully migrating my old blog content to WordPress was some new plugins. The plugin ecosystem for WordPress has always impressed me with it’s diversity and range. The first two plugins I installed have actually changed the way I think a little bit about what it means to have a personal identity on the Web.

My first task was to find a plugin to embed my “Friend of a Friend” (FOAF) profile into my blog pages. FOAF is a Semantic Web standard for describing personal information and social networking links in a way that is open and distributed.

Facebook is a fine system, but they’ve made it clear that the information you post about yourself and your friends is their intellectual property. I don’t begrudge them this – they’ve spent millions of dollars building a system that (for the most part) just works. But the real pain comes when Yet Another Social Networking Site comes on the scene. You sign up to join in on the fun, and immediately start building your social network up again in a different silo, a different walled garden.

The designers of the FOAF standard aimed to provide an open way of defining your social network using the tools of the Semantic Web: URIs and RDF. I hope that some future Facebook or Twitter will import and export a social network graph in this form. In the mean time, we can still build our own individual applications using the FOAF vocabulary. Addmittedly a stupid name, but a very powerful idea.

The wp-rdfa plugin adds support for FOAF to WordPress. It generates a very basic FOAF profile for the blog owner based on your already-defined user profile. This is the case where the Semantic Web shines. RDF and OWL are not going to replace (X)HTML over night – they’re too complex and arcane to be readily adopted by Web designers and developers who code by hand. But Content Management Systems, for example, can be modified to generate Semantic Web representations of the data it manages. Drupal 7 is a great example of this – they implemented RDFa as a standard part of the system.

With a bit of hacking to the plugin, I now include a reference to my (rudimentary) FOAF profile in the pages of this blog. It’s nothing fancy, but I can add additional information as I go, eventually building up a description of my interests, projects, friends, etc. that is independent of Facebook and LinkedIn, and is wholly mine. As more blogging packages add support for FOAF, we can begin to build a semantic distributed social network, with blog posts and comments replacing Newsfeeds and Wall posts.

I’m working on some modifications to the wp-rdfa plugin to make it a little more flexible. The first mod makes linking to an external FOAF file possible. I wanted to be able to put any sort of information into the FOAF file that it allowed without being limited to the profile boxes in WordPress. The second mod will make sure all additional FOAF data generated by the plugin (such as comments on posts) link back to the appropriate parts of the FOAF file.

Want to be FOAF? Use the FOAF-a-matic profile generator and follow the instructions shown on how to link this profile into your blog theme – it’s no more difficult than linking in a stylesheet or JavaScript library.

Speaking tonight on the Semantic Web

The Semantic Web has been a strong interest of mine over the last two years. When I came across RDF and OWL through a research project at IST back in 2008, a Web Standard no less, I’d somehow been completely oblivious to its existence.

If you’ve never heard of the Semantic Web, here’s a quick intro video. I’ll wait here.

Everybody back? Okay! The concepts behind OWL seemed to solve a few thorny design issues I’d come across in a decade of building relational databases-backed Web 1.0 apps, and do so in a really elegant way. Working with OWL fuses aspects of relational database modeling, information architecture, and object oriented design into a new set of technologies and techniques.

As I started talking to members of the developer community at Penn State about the Semantic Web, I got a lot of blank stares and misunderstandings (“Isn’t that just XML?”). And yet, every graduate student in IST was exposed to ontologies and semantic modelling as a routine part of the curriculum. The research community had been working with ontologies for years. Clearly there was a large academic-practitioner gap here to be bridged.

So as I’ve done many times in the past with a new technology or concept, I started talking about the Semantic Web at user group meetings and conferences, and looking for ways to apply these technologies in low-risk venues.

Tonight is the latest in this series of speaking engagements, and possibly the most challenging thus far. I’ll be presenting my talk “An Argument For Semantics” at the Portland Java User Group. I’ve been really impressed by the quality of home grown presenters at PJUG since I started attending. My talk will be very different – less code, more conceptual – than usual PJUG speakers, but I’m hoping the technical experience in the room can generate a good discussion on how and when it makes sense to employ Semantic Web technologies in real world applications.

A Cloak of Accessibility

If you regularly run your browser with JavaScript support disabled like I do, you’ll occasionally run into a Web site that completely fails to operate, especially among so-called Web 2.0 sites.

I don’t know if you’ve ever noticed, but is not the most accessible site on the Web. I find that somewhat odd, given the relative simplicity of the user interface. This has improved a bit in the 18 months or so that I’ve been using the service, but I wouldn’t say it’s perfect yet. At least the site functionality gracefully degrades when you don’t have JavaScript.

Enter Dennis Embree. Seeing a need, or at least an opportunity, he created a more accessible Web-based Twitter interface:

The site contains a short list of some of the things the developers fixed:

  • All links are keyboard accessible.
  • Simple, consistent layout and navigation.
  • Works with or without JavaScript.
  • Large default text size and high color contrast.
  • Looks great in high or low resolution.
  • Forms are marked up for optimal accessibility.
  • Code is semantic, light, and adheres to best practices in Web Standards.

I wonder if there is a niche here for accessibility-aware Web developers: find Web 2.0 sites that brush off demands for accessibility affordances and wrap them in a “cloak of accessibility” spun from their own APIs.

I think this is a really interesting idea. I wonder what other sites could benefit from such a technique?

Building an RIA through Collaborative Design and Prototyping : Preamble

We’re in the midst of building an interesting Rich Internet Application for educational assessment using Flex. We’ve had a lot of success with our process thus far, so I thought it would be helpful to document it as a means of discussing it and maybe improving it for our next project.

One of the great aspects of this particular project is that we’ve done the design collaboratively with an interdisciplinary team, including technologists, instructional designers, and even a faculty member or two.

Here’s a pic of our screen designs and the application state diagram:

Rubricator Application States

I’ll break this down into detail in upcoming posts.

Next up: Iterative design.

Unit Testing and Subversion – Where should I put the test classes?

I’m starting a strong push to institute Unit Testing in a relatively new project; I figure it will be easier to really get into the habits in a new project from the start, rather than trying to steer some of our ancient existing projects in that direction right away. But I’ve hit a snag… where should I keep the test classes?

We’ve been using Subversion to manage our project files since shortly after I started here… getting us into source control was one of my first imperatives. So our code is laid out nicely in folders:

Project A
|____ src
|____ lib
|____ docs
|____ db

Project B
|____ src
|____ lib
|____ docs
|____ db

In the src folder, I have things organized in packages like


So where do I put the test cases? I could put them in a test package at the root of the project:


But what I’m really leaning toward is mirroring the main folder structure of the package in a test package in the root of the repository, at the same level as the src folder:


My thinking is that the classes in the test package would not get deployed with my actual project code, so they shouldn’t be in the real source package tree. But I’m still not sure.

Advice for jumping into Java Web Services?

So I’ve landed on a new project. We’ve been asked to port a well-studied
scientific algorithm into a Web Service, hoping to link the calculated
results into a networked client for visualization (likely Google Earth).

Now, porting the algorithm (from MATLAB) should be relatively
straightforward. What I’m unsure about is where to start building the Web
Service! I’ve previously just used ColdFusion for anything that needed to serve a
data feed (like sending RSS or feeding a Flash or Flex app), but the requirements from the
contracting agency really point to something more portable like Java, Python or Ruby. Since I’m most familiar with Java, and there have been a few articles here and there on Java Web Services, that seemed to be a likely path.

I’ve read about SOAP, REST, and XML-RPC, and the Apache Axis library. Then I found Axis2, and heard about CXF from a colleague. Can anyone
offer any advice as to where to start? Does anyone even build Web Services by hand anymore?

Oh, and Barry… I know I still owe you those 8 things you asked about.

A day of software best practices

Dating back to my days as a consultant in the waning hours of the dotcom era, there were two truths I came to view as fundamental:

1) Once you get to a certain point in your development as a programmer, the actual functioning of software ceases to be a mystery. The only mystery that remains is what to do next. You can pretty much build anything you can imagine, but how do you choose *what* to build next?

2) You can only do so much as an individual developer. To create something really meaningful, you need to work with a team. The whole is *truly* greater than the some of its parts.

These two beliefs fuel my interest in the software development process – tools, methodologies, processes and practices – particularly those that deal with development teams and collaboration. I’m always on the lookout for ideas that will help me choose my next project, and help me go about building it through collaboration and teamwork with my colleagues.

To that end, when I heard about the Software Best Practices Conference, I was intrigued. The title is actually a bit misleading… it’s more of a roadshow, with different speakers scheduled to be at different cities on different days.

I went ahead and registered for the Pittsburgh conference, which takes place tomorrow. I’m going to try to summarize some of the more interesting ideas here throughout the day.

If the conference lives up to my imagination, I may see about attending some of the dates in other cities… several of the upcoming conference dates are in cities within a reasonable driving distance.