November 2007 Archives

Dejan Bosanac

AddThis Social Bookmark Button

I’ve always loved Groovy builders concept for handling (mostly creating) hierarchical documents. On the other hand I find StAX, pull-based processing API, to be one of my favorite methods for dealing with simple XML processing. It’s simple and fast, so what more can I ask for? Additionally, thanks to the Jettison project you can also use the StAX API to handle JSON documents. So, basically we can use one simple (standard) API to handle both XML and JSON documents in the same manner. The next logical step is to merge these two great pieces of technology into one.

Robert Cooper

AddThis Social Bookmark Button

I want to talk a little about Android. I am very much going to sidestep the holy war about is it or isn’t it Java, except to say, this looks a lot like something that would have been derived from the Danger stack. The commonalities are striking. As a Sidekick owner, I am terribly pleased with “Java-ish” development for that platform, and I think seeing something similar in wide deployment is great. That said…

First, lets talk about the Android UI API. I recall last year at Sun Tech Days,”The Gos” was asked what, in retrospect he would do different with Java. The first thing he came up with was the Swing API. The “747 Cockpit” feel of the API is overwhelming to new users. Frankly, Android takes this to a whole new level. Just look at the JavaDoc for the Checkbox class:

Constants inherited from class android.view.View
Fields inherited from class android.view.View


Public Constructors

          CheckBox(Context context)
          CheckBox(Context context, AttributeSet attrs, Map inflateParams)
          CheckBox(Context context, AttributeSet attrs, Map inflateParams, int defStyle)
Methods inherited from class android.widget.CompoundButton
Methods inherited from class android.widget.Button
Methods inherited from class android.widget.TextView
Methods inherited from class android.view.View
Methods inherited from class java.lang.Object
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.graphics.drawable.Drawable.Callback

Now, it certainly makes sense for everything to extend View, but View has a helluva lot of stuff on it. I am pretty sure my Checkbox doesn’t need scroll setting, for instance. There are also things like getDrawingRectangle() that seem like they would be better served with internal implementation to a Painter, rather than everything right there.

There is also a dearth of Interfaces to mark functionality. For example, the MenuBuilder.ItemImpl. Notice the crossover with both View and Compound button above.

Public Methods

        int  getGroup()
Return the ordering group of this menu item.
        int  getId()
Return the identifier for this menu item.
        Intent  getIntent()
Return the Intent associated with this item.
        int  getShortcutAlphabeticKey()
Return the key for this menu item’s alphabetic shortcut.
        int  getShortcutAlphabeticModifier()
Return the modifiers of this menu item’s alphabetic shortcut key.
        int  getShortcutNumericKey()
Return the key for this menu item’s numeric (12-key) shortcut.
        SubMenu  getSubMenu()
Get the sub-menu to be invoked when this item is selected, if it has one.
        CharSequence  getTitle()
Retrieve the current label text of the item.
    final    View  getView()
        boolean  hasSubMenu()
Check whether this item has an associated sub-menu.
        void  invoke()
        boolean  isCheckable()
Return whether the item can currently display a check mark.
        boolean  isChecked()
Return whether the item is currently displaying a check mark.
        boolean  isFocused()
        boolean  isSelected()
        boolean  isSeparator()
Check whether this is a separator item.
        boolean  isShown()
Return the shown state of the menu item.
        void  sendSelectionChange(boolean selected)
        void  setAlphabeticShortcut(int modifier, int alphaKey)
Change the alphabetic shortcut associated with this item.
        void  setCallback(Runnable callback)
        void  setCheckable(boolean checkable)
Control whether this item can display a check mark.
        void  setChecked(boolean checked)
Control whether this item is shown with a check mark.
        void  setClickListener(OnClickListener clickListener)
Set a custom listener for invokation of this menu item.
        void  setIntent(Intent intent)
Change the Intent associated with this item.
        void  setNumericShortcut(int numberKey)
Change the numeric shortcut associated with this item.
        void  setSelected(boolean selected)
        void  setSelectionListener(OnSelectionListener selectionListener)
Set a custom listener for selection changes of this menu item
        void  setShortcut(int numberKey, int modifier, int alphaKey)
Change both the numeric and alphabetic shortcut associated with this item.
        void  setShown(boolean shown)
Return the shown state of the menu item.
        void  setTitle(CharSequence title)
Change the label text associated with this item.
Methods inherited from class java.lang.Object
Methods inherited from interface android.view.Menu.Item

Just having marker interfaces for things that support Focus, Check, etc would really help clean some of this up from a API standpoint. Now, getting around some of this Cockpit feel should be easy, since Android includes a declarative XML UI system out of the box.

Now maybe I am just missing something here, but:

<?xml version="1.0" encoding="utf-8"?>
<!-- Demonstrates using a relative layout to create a form -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/blue"
                android:padding="10px">

    <TextView id="@+id/label"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Type here:"/>

    <EditText id="@+id/entry"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@android:drawable/editbox_background"
              android:layout_below="@id/label"/>

    <Button id="@+id/ok"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/entry"
            android:layout_alignParentRight="true"
            android:layout_marginLeft="10px"
            android:text="OK" />

    <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeft="@id/ok"
            android:layout_alignTop="@id/ok"
            android:text="Cancel" />
</RelativeLayout>

There seem to be a few shortcomins here. The schema URL doesn’t seem to resolve to anything meaningful. It *seems* to me, and I could be wrong here, that there is no way to use non-Android provided widgets in your UI. Compare this to the forthcoming GWT declarative UI XML:

<!-- Note how we add a new namespace for the application's package -->
<app:ButtonTree
 
xmlns:g='http://code.google.com/webtoolkit/com.google.gwt.user.client.ui'
 
xmlns:app='http://code.google.com/webtoolkit/com.example.myapp.client'
/><g:Tree xmlns:g='http://code.google.com/webtoolkit/com.google.gwt.user.client.ui'>
 
<g:TreeItem>
   
<g:Button>Do something</g:Button>
 
</g:TreeItem>
</g:Tree>


Here the namespace maps to a package, making it easy to build UIs with other components. Another thing that stands out about the declarative UI stuff is the lack of CSS. While the Android UI lets you specify design elements in:

The following values are supported for dimensions (described in TypedValue):

  • px (pixels)
  • dip (device independent pixels)
  • sp (scaled pixels — best for text size)
  • pt (points)
  • in (inches)
  • mm (millimeters)

Which is great. However, it seems like rather than specifying margins, paddings, alignments, etc, in the XML files, being able to define these in a CSS, or CSS-like file would seem like a better idea. Then, even, allow me to specify different CSS files based on different device UI types: screen size/aspect ratio, portrait vs landscape mode, etc. This has always been one of the failings of mobile development as long as I can remember.

So that summarizes what I don’t like. What I do like is the great separation of functionality into Intents, Activities and Views. To summarize this, you can expose functionality of your application, or use the Android base functionality, by invoking Intents. These intents can then launch something else, or not if the phone won’t do that, or the needed software isn’t there. These can take you to Activities. Activities are single screen-type states in your application with a managed lifecycle. Activities then reference Views with a clear binding pattern, and a suspend-resore lifecycle that lets not just your whole application, but sub-elements of your application (List Buddies, Chat Window, Add Buddy individually) be suspended out of the running state and navigated around. Honestly, it makes me feel better about some of my own API design, I have GWT APIs in Gwittir that look very similar. :)

While I haven’t spent a great deal of time with it yet, there are a few things that stand out as big points of pain in the current developer tooling. There is no way to toy around with the LocationManager class in a real way because the emulator just doesn’t have a way to alter this information at runtime. It is also really complicated to mock out the ApplicationContext class for unit testing your code — which seems very un-Google. While Android is easily one of the most documented new systems I have recently — maybe ever — seen, approaching the docs the first time is terribly imposing. John Lombardo at LinuxDevices.com has a great intro and guide to the guides.

Paul Browne

AddThis Social Bookmark Button

The JBoss Drools boys have something cool brewing. They already have the most useful GWT (Google Web Toolkit) App that I’ve seen outside of the Googleplex. That’s a fully fledged app ready and waiting to be used in anger, not some example widget, or a test case thrown together by somebody playing with the technology. The BRMS app itself, targeted at business / professional users, allows them to catch the knowledge that they have in their heads and share it with the team.

Here’s the problem; If you’re into Rules, you’ve probably already downloaded the BRMS - ( Business Rules management system). If you’re just a casual browser, a cool GWT app it may be, but you’re not going to take the time. Why? Unless you have Tomcat or JBoss 4 ready and waiting on your PC you’re not going to bother (note ; this will work on other application servers like weblogic , with another couple minutes work, but that just proves my point).

In order to make things easy for us lazy people, the nice people at Drools are preparing a standalone BRMS; download , unzip , start and play. That’s presuming you have Java installed. You do have Java installed don’t you? But being lazy, how big a download is too big?

I’m not the best person to answer the question - I’ve already downloaded the (largish - 530mb) Red Hat Developer Studio (now at release candidate 1). So what’s your download speed and how big (small) does the BRMS have to be before you’d consider trying it out?

Answers on a postcard to the JBoss Drool Team.

Dejan Bosanac

AddThis Social Bookmark Button

It all started when I tried to find a solution for customizing an XStream instance for my ActiveMQ XStream message transformer that would be better than currently used (extending a base transformer and providing a custom factory method that will do things like alias, converter, annotation, etc. settings). I wanted an easy solution to configure XStream instance in a Spring xml configuration file used in my application and provide that instance to all beans that need it (message transformer among others).

XStream is a very nice library that I’ve used and written about before, but there is no Spring factory builder that could be used for this purpose. A little googling got me to the OXM framework, a part of Spring WS project.

Hari K. Gottipati

AddThis Social Bookmark Button

Google’s Android software for Open Handset Alliance raises eyebrows of every Java developer because of its non-standards. Instead of supporting the Sun’s open source efforts on Java, Google went in a different direction and came up with its own JVM named Dalvik which executes Java programs on Android phones. It is neither Java SE, nor Java ME. It is Google’s in house version based on some of Java SE packages, apache commons, httpclient, junit and their own user interface instead of standard AWT, Swing. It also has android.* packages for Telephony APIs, power management and SMS. (List of Androids packages). In a way its similar to the GWT which uses Java as its development language but does not support the full JDK.

The byte code execution is also different. Instead of executing the .class files, Dalvik VM executes the .dex files which are optimized for minimal memory footprint. The dx tool(part of Android SDK) transforms .class files into .dex files.

We have enough problems with Java mobile development already. Not all phones support all the same Java standards, so there is no guarantee that the same software will run on multiple devices, as the “write once, run anywhere” Java tagline promises. Now Android is going to create more problems than solving. With this, programmers will have a new breed of Java to develop mobile applications, those cannot be ported to any device except Android powered phones. We already have enough versions(standards) of Java, why do we need another one?. I don’t think any Java developer is interested in developing the applications in non-standard version, unless you want to win the 10 million dollar prize? It sounds like Google is trying to bribe the Java developers to adopt this non-standard Java with 10 million dollar prize. Well, may be its another Google’s don’t be evil policy -:)

Google tweaked the JVM to improve the performance of applications for the Open Handset Alliance phones. In fact, for the same tactics, Sun sued Microsoft a while ago. Knowing this, how Google managed to get the license from Sun to tweak the JVM? In fact, they didn’t - according to MIT research scientist Stefano Mazzocchi:

But Android’s programs are written in Java, using Java-oriented IDEs (it also comes with an Eclipse plugin)… it just doesn’tcompile the java code into java bytecode but (ops, Sun didn’t see this one coming) into Dalvik bytecode.
So, Android uses the syntax of the Java platform and the java SE class library but not the Java bytecode or the Java virtual machine to execute it on the phone (and, note, Android’s implementation of the Java SE class library is, indeed, Apache Harmony’s!)
The trick is that Google doesn’t claim that Android is a Java platform, although it can run some programs written with the Java language and against some derived version of the Java class library. Sun could prevent this if they had a patent on the standard class library, but they don’t and, even if they did, I strongly doubt it would be enforceable since Android doesn’t claim to be compatible (and in fact, could very well claim that their subset/superset is an innovation on the existing patent and challenge Sun’s position).

Wow! what a smart approach! I am wondering what the Sun’s reaction is going to be!!!! As a Java developer, I don’t want to develop the applications that only run on Android even if they give 10 million dollar prize. If I did that, it would be encouraging such evil practices of creating non-standard Java.

Why Google is not following the open standards(Java is open source)? Why they are tweaking the standards? What happened to Google’s “Don’t be evil” policy?

What is your take on this?

Robert Cooper

AddThis Social Bookmark Button

Obie Fernandez has a great write up on the Future of Java panel at QCon with Chet Haase, Charles Nutter, Rod Johnson, Josh Bloch, and Erik Meijer.

On one point:

An audience member suggests that splitting up the JDK platform by defining core-subsets of functionality would be desirable. Chet disagrees, suggesting that it would break things. Guice Bob says Java Kernel will help, which is a small downloadable bootstrapper that downloads needed JDK components on demand instead of all in the up-front download.

The predominant topic of conversation continues to revolve around adding or removing to the Java platform — new features, language or otherwise. Rod seems in favor of adding, while Charles hints that he’s been tempted to use the Open SDK project to create a stripped-down version of the Java JDK.

Erik states matter-of-factly that it is impossible to take things out of a mature platform. “You can never take anything out!”

Josh speaks about JSR 277 and its infrastructure for addressing versioning issues.

Now Josh Block is saying we should create a new Java platform. Everyone agrees that there are real dangers in choosing that road.

One of the things I hope is that OpenJDK will make possible big changes. Once there is an open source Java 7 that still runs Java 1.0 code, it can be there and be maintained for people who want that forever. Java itself can then move forward, perhaps even to Java 2 (:P) with real generics, adding some bloody keywords (@interface still makes me hate people), and other things that we haven’t been able to do because of this legacy requirement.

Robert Cooper

AddThis Social Bookmark Button

on the ADC web site.

Paul Browne

AddThis Social Bookmark Button

It wasn’t meant to be this way, but I spent most of the IJTC talking to people about Flash Killers. Technologies that look good, work in any browser and are powerful enough to deliver enterprise applications with no installation.

  • Dejan Bosanac, was speaking on Scripting in the JVM. He was kind enough to give me a copy of his book which (for the first time) has got me seriously considering Groovy. Maybe I’m about 3 years behind everybody else on this , but I get there in the end! Dejan’s book (Scripting in Java: Languages, Frameworks, and Patterns) is available on Safari
  • Guillaume Laforge talking on Groovy completed what Dejan had begun. Ironically, I didn’t see the talk , but it was the reaction of the people that did that got me interested.
  • Xoetrope (an Irish Open Source company sponsoring the conference) was demonstrating the XUI framework. Initially I thought that the world did not need another Java presentation framework. What changed my mind is that this has two edges - the first is the IDE - a plugin for either Eclipse or Netbeans , similar in drag and drop style to Visual Basic but generating clean XML Files. The second is that you can deploy on the Desktop (as either SWT or AWT/Swing), or as JSP / HTML. You can download XUI (and IDE plugins) from sourceforge.
  • Richard Bair from Sun were talking about Swing and Java FX (more below). Sun is threating to deliver on the initial promise of Java Applets (Write once, deploy anywhere).
  • Strange for a Java event, but Microsoft was giving out disks containing Silverlight

None of the above technologies really solve what I’m looking for; Ideally we’d have a version of Flash (that almost everybody has installed / designers know how to make look good) with Java embedded in it (we need the processing power of the client). Think modern version of Java Applets. Realistically we’ll have to go for 2nd best as such a thing doesn’t exist.

More on the Java FX Stuff: James Weaver of the JavaFX blog was good enough to talk through these requirements. I’ve been promised a blogpost on deploying a JavaFX Script via Webstart. With that, and if Sun makes good their promises on consumer usability in the next version of Java, then maybe we have a Flash Killer. While Sun has dropped the ball in the past (note that it was Microsoft and not Sun handing out CD’s) the response times for the FX team for a casual query about Webstart (which is not their area) gives me some hope.

If you are interested in JavaFX, another good resource (you wait ages for one , then loads come along at once) is Angel Leonards introduction to JavaFX Script.

Tim O

AddThis Social Bookmark Button

There’s a good chance that someone out there is using Slide, it used to be distributed as a WebDAV library with Tomcat 4. If this is you, or your organization, you should know that it is no longer “a project”. Here’s the announcement from Roland Weber of the Jakarta PMC:

The Apache Jakarta PMC is sorry to announce the retirement
of the Jakarta Slide subproject. After it’s last release in
December 2004, development activity was significantly reduced
and came to a total standstill this year. Without a minimum
developer community that can release security fixes, we have
no choice but to retire Slide. We’ll keep at least one of
the mailing lists open for a transition period, so users can
discuss alternatives and migration away from Slide. Further
use of the Slide codebase is discouraged.

One alternative to Slide is provided by the Apache Jackrabbit
project. Jackrabbit has a healthy, active developer community
and provides, among others things:
- a server-side content repository
- a WebDAV server component for access to the repository
- a WebDAV client component
Please visit http://jackrabbit.apache.org/ for more information.

We apologize for the inconveniences.

Tim O

AddThis Social Bookmark Button

Nick Sieger announces the availability of a new release of ActiveRecord-JDBC on his blog in ActiveRecord-JDBC 0.6 Released! You might just let this piece of news go by unnoticed, but if you read Nick’s blog entry, you’ll see that it is a turning point for people who want to get a Rails application running under JRuby, Nick writes (emphasis mine):

..to make your application run under JRuby, no longer will you need to a) find and download appropriate JDBC drivers, b) wonder where they should be placed so that JRuby will find them, or c) make custom changes to config/environment.rb. All that’s taken care of you if you use one of the following adapters:

* activerecord-jdbcmysql-adapter (MySQL)
* activerecord-jdbcpostgresql-adapter (PostgreSQL)
* activerecord-jdbcderby-adapter (Derby)
* activerecord-jdbchsqldb-adapter (HSQLDB)

One thing that’s great about RoR is the convenience of it all. I spend about half of my time dealing with J2EE and a quarter with RoR, and the amount of setup that is involved in the J2EE world defies belief. Nick has made a point to emphasize the ease with which you can dive into the JDBC-backed ActiveRecord:

We can leverage this convention to make it easier than ever to get started using JRuby with your Rails application. So, the first thing new in the 0.6 release is the name. You now install activerecord-jdbc-adapter:

jruby -s gem install activerecord-jdbc-adapter

But wait, there’s more! We also have adapters for four open-source databases, including MySQL, PostgreSQL, and two embedded Java databases, Derby and HSQLDB. And, for your convenience, we’ve bundled the JDBC drivers in dependent gems, so you don’t have to go hunting them down if you don’t have them handy.

$ jruby -S gem install activerecord-jdbcderby-adapter --include-dependencies
Successfully installed activerecord-jdbcderby-adapter-0.6
Successfully installed activerecord-jdbc-adapter-0.6
Successfully installed jdbc-derby-10.2.2.0

Tim O

AddThis Social Bookmark Button

Mark Reinhold, Chief Engineer for the Java(TM) platform, outlines a roadmap for the OpenJDK project infrastructure on his blog:

The publication last week of our experimental Mercurial repositories heralds the first of many infrastructure projects that we hope to initiate, and in most cases complete, over the next year or so. Here’s the entire list:

2007/Q4 Code-review publication, Core community database, Public Mercurial forests
2008/Q1 Mercurial forest management, OpenGrok
2008/Q2 Improved content publishing, Process tools
2008/Q? Bug database, Distributed build system

All dates are—naturally—somewhat approximate.

The surprising part is the Bug Database, why should it take that long to figure out a solution? As an unnamed Sun engineer told me at JavaOne, the internal bug tracking system can’t move very quickly and is something of a disaster. It is unclear whether he was saying that what we see in BugParade is an extension of this system or something else entirely, but he made it sound like there were a lot of secret bits in the bug tracking system that couldn’t be exposed easily. I remember mentioning JIRA and he responded about how they had considered something like that but that the blocker was the lack of a mechanism to have a fix target multiple releases. What’s clear is that the Java project is big enough to demand some custom infrastructure (like a web review tool). It’ll be interesting to see what brews from this project.

Tim O

AddThis Social Bookmark Button

Everyone calm down about Java 1.6 on Leopard. Calm down and get busy like Landon Fuller did this weekend. He blogged about it here FreeBSD’s 1.6 JDK on Mac OS X. And then he posted to the OpenJDK discussion list ten minutes ago. Clearly, it isn’t a satisfying answer, he reports “partial success” with some serious issues (stack alignment). If more people took initiative and didn’t sit around, blogging about whether Steve Jobs likes or dislikes Java we would probably already have something workable.

There has been a lot of discussion of creating a porting project on the OpenJDK mailing lists lately, if this is something you think is important, you can keep track of the discussions on the OpenJDK General Discussion List and there is an ongoing discussion about porting OpenJDK to other platforms

Tim O

AddThis Social Bookmark Button

More about this over at Simon Phipp’s blog Red Hat Joins OpenJDK. If you are not already familiar with the IcedTea effort, take a look at the IcedTea Project Page. IceaTea takes the code from OpenJDK and replaces the encumbered code (binary plugs) with some code from Classpath. I’m assuming that this agreement will make it easier to incorporate some of this code back into OpenJDK project as a replacement for the encumbered code.

(Even though I’ve needled Sun about the continuing Apache dispute, this is, IMO, good news for the OpenJDK effort and for the availability of certified Java on the Linux platform.)

Tim O

AddThis Social Bookmark Button

Jason Hunter wrote the popular Java Servlets book from O’Reilly. He just announced the availability of an interesting product named MarkMail which is based on a commercial product named MarkLogic Server. Here’s an excerpt from an email announcing the service:

For the last few months I’ve been working on a new project: a web
site for interacting with email archives. We’re using, as the
site’s initial content set, the public Apache mailing list archives
– because Apache is the community I know best and I think people
here will find the site useful. We’ve loaded a bit over 4,000,000
emails across 500 lists.

http://apache.markmail.org

For some screenshots, read the rest of the entry.

Tim O

AddThis Social Bookmark Button

I continue to believe that Maven is the first choice for build systems despite the lack of quality documentation (which is a continued problem). Why? (Or specifically, why should an open souce project use Maven above other build systems?…..)

…open source projects benefit from having the most widely portable build possible. Widely portable builds reduce the inefficiencies associated with contributing to a project. In an open source project (such as Maven) there are two distinct groups: end-users and developers. When an end-user uses a project like Maven and decides to contribute a patch to Maven, they have to make the transition from using the output of a build to running a build. They have to first become a developer, and if it is difficult to learn how to build a project, this end-user has a disincentive to take the time to contribute to a project. In a widely portable project, an end-user doesn’t have to follow a set or arcane build instructions to start becoming a developer, they can download the source, modify the source, build, and submit a contribution without asking someone to help them set up a build environment. When the cost of contributing source back to an open-source project is lower, you’ll see an increase in source code contributions, especially casual contributions which can make the difference between a project’s success and a project’s failure. One side-effect of Maven’s adoption across a wide group of open source projects is that it has made it easier for developers to contribute code to various open source projects.

In other words, even with Maven’s problems (which will shortly be addressed, I promise), it still defines a common interface that many developers are familiar with. If you continue to use some custom procedural build system (even in your closed corporate environment) you are bucking the trend. The common interface, the ability to just “sit down in the driver’s seat” and go, is more important than making sure that some highly opinionated software architect at a very large organization is happy with the “cleanliness” of the Maven repository or that someone feels that the Maven conventions can be bent to fit their own conventions.

Go ahead, adopt your own build process because you just *think* you know better, and have fun maintaining it. I know one thing about build systems, they are the last thing you need to be worrying about and your clients or employers rarely care to spend money on your clever, custom build system.

Robert Cooper

AddThis Social Bookmark Button

Google’s much hyped OpenSocial API finally appeared on code.google.com. For the most part it is “Yet Another GData API.” Which is good, and bad. Good in that people pretty much understand it. Bad in that it seems really half-baked to me.

Let’s start with the sample friends list. This would live somewhere like: http://{domain]/feeds/people/{person-id}/friends

<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005'>
  <id>http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends</id>
  <updated>2007-10-28T21:01:03.690Z</updated>
  <title>Friends</title>
  <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends'/>
  <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends'/>
  <author><name>Elizabeth Bennet</name></author>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/02938391851054991972</id>
    <updated>2007-10-28T14:01:03.690-07:00</updated>
    <title>Jane Bennet</title>
    <link rel='thumbnail' type='image/*' href='http://img1.orkut.com/images/small/null'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=574036770800045389'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/02938391851054991972'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>51.668674 -0.066235</gml:pos></gml:Point></georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/12490088926525765025</id>
    <updated>2007-10-28T14:01:03.691-07:00</updated>
    <title>Charlotte Lucas</title>
    <link rel='thumbnail' type='image/*' href='http://img2.orkut.com/images/small/null'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=5799256900854924919'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/12490088926525765025'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>0.0 0.0</gml:pos></gml:Point></georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/15827776984733875930</id>
    <updated>2007-10-28T14:01:03.692-07:00</updated>
    <title>Fitzwilliam Darcy</title>
    <link rel='thumbnail' type='image/*' href='http://img3.orkut.com/images/small/1193603277/115555466.jpg'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=14256507824223085777'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/15827776984733875930'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>53.017016 -1.424363</gml:pos></gml:Point>
    </georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
</feed>

So, what have we got here? Well, it is awful little. Title is obviously the person’s name. We have a gd:postalAddress field for an address, a georss:where to locate them on a map (this can be a specific location, or just a city pointer), and a thumbnail. That’s it.

This is what the People Data API specs:

Property Type Description
Name atom:title The desired display name for the user
Image link atom:link With rel=”thumbnail”, a small image URL to represent the user
Profile URL atom:link With rel=”alternate”, the standard profile URL representing the user
GeoLocation georss:where Geographic location of the user. This may be approximate, or rounded off to the nearest city.
email gd:email Email address(es) for the user
IM gd:im Instant messaging adress(es) for the user
Address gd:postalAddress Address(es) for the user.
Phone number gd:phoneNumber Telephone number(s) for the user
Key value parameters gd:extendedProperty As different social networks and other sources of People data have many different named fields, this provides a way for them to be passed on generally. Agreeing on common naming conventions is to be decided in future.

That is really not much. For instance, Given Name and Sir Name aren’t broken out into separate fields. That alone can make importing into a standard address book problematic. Secondly, the link rel=”thumbnail” use is COMPLETELY retarded. It gives no real information, and doesn’t really apply. I don’t understand why Google didn’t use MediaRSS for this, which supports multiple representations of the same media element, contains size information, etc. They already use MediaRSS on Google Video, so I can’t imagine it is a religious issue.

Also, hand-wavy stuff like this always makes me nervous:

As different social networks and other sources of People data have many different named fields, this [gd:extenedProperty] provides a way for them to be passed on generally. Agreeing on common naming conventions is to be decided in future.

Name-value pairs seem really inadequate here. I don’t understand why we can’t, much like the APP specification instructs, say that foreign markup of any nature will be preserved. If I want to sync a contact between two different services, that contact information should simply preserve whatever markup the other services wish to include. Moreover, if I wanted to do something like embedding (x/v)Cards in the entries, seems like that should be just fine.

Finally, it seems to me that doing GoogleAuth everywhere for this is less than optimal. OpenID would be much better and would encourage more adoption at the bottom level of the tech food chain — not MySpace and Six Apart, but Joe Blow’s open source project. But it all goes back to the root of the problem here:

Google didn’t design a spec for interoperability of social networks as much as they built an API for dealing with Google. I don’t think this is what people really wanted here. Aside from the fact that it works on the presumption that everyone is going to clear everything through Google, it is going to require a whole lot of user understanding to make this data really portable.

For instance, it seems to me there should be part of the specification that says profile pages have link rel=”opensocial” pointing to the users individual feed. That is easy to communicate to the user that they can point at a buddy’s page to add them as a friend. If that page also had an OpenID link on it, then cross registration outside of the Googleplex would be easy. If the Microsoft SSE extensions were used, then it would be easy for me to maintain references to my accounts on other systems from each other, so with Alice imports her Orkut contacts to MySpace, MySpace can find the myspace <id>’s from people on Orkut with dual membership and resolve that automatically. There also doesn’t seem to be anything implicit in the auth structure for *requesting* access to profile information. It is common to restrict your exposed profile data to people who are your friends. Having links between profiles on different services — presumably with something more like OpenID auth to establish profile ownership — would allow for this; you could import my full information from my MySpace page into Outlook if you were my friend on Orkut.

In short, I am sure OpenSocial will make a dent in something. But it doesn’t seem to be solving the “Give me a truely portable contact list and identity” that I would really like to have.

Advertisement