Syndication and blogs

I’ve tried to avoid self-referential blogging, if only becuase I’m not huge into navel staring. But, I just ran across an interesting blog: Wendyopolis, which is apparently associated with a Canadian magazine. Now, according to google, blogs are defined as:

“A blog is basically a journal that is available on the web. The activity of updating a blog is “blogging” and someone who keeps a blog is a “blogger.” Blogs are typically updated daily using software that allows people with little or no technical background to update and maintain the blog.

Postings on a blog are almost always arranged in chronological order with the most recent additions featured most prominently.”

(From the Glossary of Internet Terms)

However, I’d argue that there are several fundamental characteristics of a blog:

1. Date oriented format–“most recent additions featured most prominently.”
2. Informal, or less formal, writing style.
3. Personal voice–a reader can associate a blog with a person or persons.
4. Syndicatability–the author(s) provide RSS or Atom feeds. The feeds may be crippled in some way, but they are available.
5. Permalinks–postings are always available via an unchanging URL.

I can’t really think of any other salient characteristics. But the reason for this post is that Wendyopolis, which looks to be a very interesting weblog, doesn’t have #4. In some ways, that’s the most important feature, because it allows me to pull content of interest to one location, rather than visit sites.

I’ve written about this before, so I won’t beat a dead horse. Suffice it to say that, while Wendyopolis may speak to me right now, the chances of me ever visiting that blog ever again are nil, because of the lack of syndication. Sad, really.

Jetspeed 1 and 2

Here’s an article about Jetspeed 2. I’m actually very excited about this, though I feel that compliance to the spec is overrated. Perhaps I’m not really an enterprise developer, but I haven’t seen very many situations where I wanted a portlet (or an EJB) that had been developed on one portal server and deployed to another. But some of the Spring oriented features and ability to deploy struts application war files as portlets seem pretty neat and useful.

I’m currently working on a portal application, and we’re using Jetspeed 1–version 1.5, which has extensive documentation and has actually been released. JS1 is built on the Turbine framework. I hadn’t done much looking at this (other than a glance when I was looking at Torque for an OR layer). But so far, I’ve been really really impressed with Jetspeed and Turbine.

What has most impressed me is the configurability of these frameworks. There are a set of properties files that specify services, things like logging, persistence, localization, session validation, and authentication. The developers have done a great job of breaking these up into well defined chunks and letting me subclass services and plug in my own implementations. One example: our users do not login to the portal. Rather, they are authenticated by another application, which sets a cookie. I was able to disable Jetspeed’s own authentication system (which looks to a database) and plug in mine without making any modifications to source code. With properties overriding, I didn’t even have to modify the default properties files. Fantastic.

Jetspeed supports both JSP and Velocity as templating languages for the view. Velocity is used throughout the default portal, and I decided to use it as well. It’s an interesting language which has a lot of the benefits I’ve read about Groovy–there’s no types, and methods and properties look the same. It does look a bit perlish, I’ll admit–lots of $ and #, but it’s been fun to learn a different view language.

JS1 also provides an easy framework for developing portlets–an MVC framework, in fact. I don’t want to repeat what the relevant section of the portlet tutorial says, so I’ll just mention that developing dynamic content is a breeze.

I don’t want to say that Jetspeed has been a pure joy, however. There were a few days a couple of weeks ago that I wondered whether it had been a good choice at all. We have an existing base of users (hence the alternate authentication) and were noticing that the portal was loading slow when running against a user table of around 100K users. Then I ran some tests with The Grinder and noticed it was running really slow. Like 30 seconds to render a page with 5 portlets. Luckily, some sleuthing around indicated that there was much extraneous database access going on, and when that was eliminated, performance became acceptable.

In addition, the default build process is mavenized. I had an extremely bad experience and ended up writing a simple ant build script to do what I want. It’d be nice if both were options–since lots of people come to JS1 looking to slap a portal together for cheap, rather than thrash around with a complex build process. (I’d say at least forty percent of the messages to the mailing list are build related–not a good sign.) I just went to a BJUG talk about Maven, and Thompson was persuasive, so I might give maven another chance.

All in all, though, I’ve been very happy with Jetspeed. I am looking forward to JS2; I wish the timing had been better so I could have used it on the current project.

Useful tools: p6spy

This entry kicks off a series of entries where I’ll examine some of my favorite tools for development. Some of them will be long, some short, but all of them will highlight software I use to make my life a bit easier.

A large, large chunk of the development I do is taking data from a relational database to a an HTML screen, and back again. Often there are business rules for transforming the data, or validation rules, but making sure the data is stored safely and consistently is a high priority, and that means a relational database.

However, I do much of my work in java, which means that the relational-OO impedance mismatch is a common problem. One common way to deal with it is to use an OR tool–something like OJB or JDO. These tools provide object models of your database tables, usually with some help from you. You then have the freedom to pretend like your database doesn’t exist, and use these objects in your application. The OR framework takes care of the dirty work like SQL updates and caching.

Every convenience has its price, however, and OR mapping tools are no exception. The same abstraction that lets you pretend that you’re simply dealing with objects means that you cannot easily examine the SQL that is generated. In addition, the way that you’re using the objects may cause performance issues, because you’re treating the data as objects, rather than rows.

It’s much the same issue as calling methods over the network via RMI or accesing files via NFS: the abstraction is great and means that programmers don’t have to think about the consequences of remote access. But the failure of the abstraction can be catastrophic, all the more so because the programmer was not expecting to have to deal with the grotty details under the abstraction (that’s the whole point, right?).

OR tools do not fail often, or have many catastrophic failure modes, but they sure can be slow. With open source software, you can dig around and see how SQL is being generated, but that’s tedious and time consuming. With commercial products, you don’t even have that option. (Some OR tools may have their own ‘Show me the SQL’ switch–I haven’t run into them.)

Enter p6spy. p6spy can be used in place of any JDBC driver. You point it to the the real driver and it passes on any configuration or SQL calls to that driver. But p6spy logs every SQL statement passed to it and every result set passed back. (A fine non object oriented example of the Decorator pattern.)

It took me about 15 minutes to figure out how to use p6spy, the software is open source with decent documentation, the latest version has data source support, and it scratches an itch that most, if not all, java developers will have at some time. With p6spy, you can find out what that OR tool is doing under the covers–it’s an easy way to peel back some of the abstraction if needed.–search source code has apparently indexed many open source software projects. (Link via Dion.) I played around with it a bit and I think it’s a very slick application. I’m of two minds about this, though.

The good:

Code reuse is good. A co-worker of mine once called it ‘editor inheritance’–in a world where people time is expensive and disk space is cheap, it can make sense (not always) to just copy code rather than figure out how to make a piece of code re-usable. Koders lets you do this in a more effective way.

It also lets coders easily compare and contrast styles between real live projects. And I can only imagine that soon some researcher will sink his teeth into all the code and publish on First Monday.

The bad:

As the linux-SCO lawsuits have shown, it’s technically awfully easy to cut and paste code, but the results end up being illegal. I can only see this repository, even though it differentiates by license, exacerbating this problem. And mixing and matching code from different licenses becomes all the easier as they show up side by side in a search engine. If I were a company concerned with legal ramifications, I’d tread softly around this tool.

The possibilities:

Regardless, I have to say it’s a very cool application. I’ll be interested to find out how much people will use it. What would be really cool is further analysis–after all google gets its power from the links between websites–what would we learn by examining the links between code? For one, you’d have a better idea how useful and stable a project is, if you could know how many other projects used it. Having a plugin into a UML modelling tool would be pretty slick too.

Testing Korean content

I’m currently working on a site that needs to be truly localized for a large number of languages (tens of them). This is accomplished with large numbers of ResourceBundles, the MessageFormat class when variable text layout is needed, an Oracle backend which understands and doesn’t muck with UTF-8, an Access database which generates said bundles, and a crack team of translators.

However, how to test? Luckily, it’s fairly easy to have IE use a different language: clear instructions live here. One issue with the instructions is that they don’t tell you how to actually install a language pack. But this is easy too: I only had to right click on a page, choose the encoding menu, then choose more, and then the encoding I wanted (Korean, because I want to test double byte characters). I was then prompted to install a language pack. I accepted, and Windows downloaded a bunch of DLLs and other files. From then on I could view Korean characters (the encoding menu says I’m viewing ‘Unicode (UTF-8)’). Here’s a random site about mining that you can use to test your Korean language pack.

Don’t forget to test both the input and output of your application–saving user input, and being able to redisplay it is at least as important as being able to display what you draw from your ResourceBundle initially. As a bonus, the Korean character set that I installed via IE was made available to Firefox. This was done on the fly, not only did I not need to restart Windows, I didn’t even need to restart Firefox; I just needed to reload the page.

Mobile phones as examples of computing in context

Here’s an interesting 20 page paper examining some of the issues surround context and computing.

A few choice quotes:
“…answering the telephone has something of a moral compulsion.”

“…as much of this problem [a phone that understands context] reduces to that of building an intelligent computer.”

“…it is better to have machines which act in predictable ways so users can understand how they work” rather than unpredictable machines that ‘do the right thing.’

“A technology, like mobile phones, with its combination of voice mail, text messaging and the like, is something we dwell with in that it becomes part of the fibre of our practices and lives, even for those without(sic) reject them.” As someone who swore off mobile phones for a long time and now doesn’t know how life continued without them, I can sympathize with that sentiment.

“When people use a technology over time, and get used to seeing other people
using the technology, the actions of the technology come to be seen not as actions of technology but of the user themselves.”

Interesting reading.

Via Mobile Community Design

© Moore Consulting, 2003-2017 +