My JavaFX 1.2 Blogging Contest Submission, by Sten Anderson

Friday, July 3rd, 2009

The JavaFX team is running a contest for blogging about developer experience with the newly released 1.2 feature set. The top 10 posts each receive $500 USD. This blog post is my contest submission.

—————-

Let me start by saying thank you to Sun Microsystems for sponsoring this contest, and to the JavaFX team for crafting such a fine RIA development platform.

Finally, I’d like to extend a very heartfelt “thank you” to the judges of the contest for reading each and every submission. I don’t envy the position you must be in, having to cull through each submission — each one chronicling a developer’s story, because while deep down we’re all winners, in a more accurate sense, only ten of us are.

Indeed, what does a $500 blog entry even look like? I imagine it must be bursting at the seams with insight and purpose. So while I have no doubt that you, the honorable judges, are up to this daunting task of discernment, I trust that the $20 I’ve forwarded to each of you will aid in the decision making process.

Actually, I’m feeling pretty good about my chances here, since after all, this is a blogging contest, and they don’t give out blogs to just anybody (case in point: I was put on an 18 month waiting list for this blog). So unless you’re accepting handwritten submissions, this is likely a slam dunk. But don’t worry — I’ll still take it seriously (wink).

So let’s get to it, shall we? JavaFX 1.2: The Developer Experience!

There are so many earth-shatteringly new features in the 1.2 release, it’s hard to know where to begin. Let’s start with the most obvious surprise addition: Charts. The charting support in JavaFX 1.2 is awesome! Just awesome! I love it.

Let’s see, what’s next? Oh, I know! All of the new controls! The new controls are AWESOME! Just really great! And they look stupendous in the new Look and Feel, Caspian. Good stuff. Love it.

Ok, covered that…what’s next? That might be it, right?

Ok. So, here’s the deal: I haven’t actually downloaded JFX 1.2 yet, but I promise that I will real soon. In fact, on that note, perhaps $500 would (ahem) speed that process along a bit, if you know what I’m saying…and I think you do. Just crown me as one of the winners and then I’ll promise to write up a more thorough post at a later date, ok?

Ok, fine, we’ll play by your rules. Let me download it and check it out. Don’t go anywhere.

[Many days later...]

Ok, so, I’ll devote the rest of this entry to my experience with migrating a JavaFX 1.1 application, Music Explorer FX, to 1.2.

The first thing that I was confronted with upon loading up the Music Explorer Netbeans project for the first time in 1.2 was the massive number of overly-apologetic compiler errors. After about the hundredth “Sorry, but I was trying to understand…”, though, I was starting to suspect its sincerity.

Perhaps you guys want to consider implementing an “Incrementally Irritable” Compiler where the first 10 or so errors nets you a polite “Pardon me, but I think you erred”, but by the, say, 50th error, you’ve degraded into a “bitch, plz!”

(Note: the contest guidelines likely have anti-profanity rules which you might be tempted to invoke to disqualify me after my use of the word “bitch” above. I would argue, however, that while “bitch” is a indeed a coarse term, it was used in a humorous way, which I’m sure elicited at least a smile, if not a full blown “lol” (if neither, then you must be finding this post torturous to wade through, but might I remind Your Honor that you took an oath to read each and every post in this contest. You have to finish.) Besides, “bitch” is not profanity according to WikiAnwsers.)

Anyway, these errors weren’t a surprise as I did read up enough on the 1.2 changes to expect them. After comma separating my sequences and changing all my “Image.fromBufferedImage” to “SwingUtils.toFXImage”, I was building successfully and ready to run the application.

When I bring up the application, though, I just get a black screen, so something isn’t right here. After some digging it turns out that I was binding to a Group on the Scene, which, while it seemed to work in 1.1, doesn’t seem to in 1.2. No worries though. So I simply removed the Group and did a bind directly to the underlying sequence and things start up normally again.

Great. So overall a pretty painless migration to get the app running again. Let’s see if the application still works though.

Oops. When I try to search for an artist, I get the following exception:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
com.sun.javafx.runtime.sequence.ObjectArraySequence cannot be cast
to com.citytechinc.ria.musicexplorerfx.model.Artist

The exception seems to occur when I pull data (a Sequence) from the Java layer back up to the JavaFX layer. In my attempt to futz with some of the return types to get this cryptic exception to go away I run across this Jim Dandy:

Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
after checking for duplicates.  Include in your report:
- the following diagnostics
- file C:\Documents and Settings\sanderson\Local Settings\Temp\
javafx_err_2753540138989817596.txt
- and if possible, the source file which triggered this problem.
Thank you.

Oh my! That seems like a rather serious error. You’d probably really like to get your hands on “javafx_err_2753540138989817596.txt” I bet. Perhaps $500 might help it find its way into a bug report.

But I kid! This whole “sequence across the Java layer” issue is bugging me though, so I tried to simply and isolate with a small test case. To that end, here’s a simple JavaFX class called ValueObject:

public class ValueObject {
  public override function toString():String {
    "Value Object";
  }
}

Here’s a simple Java class representing the Java layer:

public class JavaLayer {
  Object doNothing(Object obj) {
    return obj;
  }
}

All it will do is take an object from JavaFX and return it. Here we put it together in a separate JavaFX script:

var seq:Object[];
insert ValueObject {} into seq;
var javaLayer = new JavaLayer();
var javaSeq = javaLayer.doNothing(seq);
var javaObjSeq = javaSeq as Object[];
for (element in javaObjSeq) {
  var val = element as ValueObject; // throws ClassCastException
}

We insert a new ValueObject into a Sequence, pass it to the Java layer, which does nothing but pass it back to us. Somewhere in this translation between boundaries, though, some sort of type information gets munged since the cast to ValueObject in the “for” loop results in this:

java.lang.ClassCastException: com.sun.javafx.runtime.sequence.ObjectArraySequence cannot
be cast to seqtest.ValueObject

I would expect “javaObjSeq” to be of type “ObjectArraySequence” (it’s actually of type SingletonSequence, which makes sense since it has one element — btw, a quick naming suggestion on “SingletonSequence”: it might make more sense to name it “SingleElementSequence” so it doesn’t clash with the name and intention of the “Singleton” design pattern), but it turns out that its contents is also of type “ObjectArraySequence”, even though, if we ask “element” to print itself, it prints “Value Object”, which indicates that it is in fact of type “Value Object”.

So this is very confusing to me, be it a bug or a misunderstanding on my part. At any rate, something changed between 1.1 and 1.2 here.

Leaving the mundanity of data transfer issues behind us, something else I was able to do was upgrade some of my wrapped Swing components to official JavaFX 1.2 controls. You can consult this post for more details. In fact, in all fairness that post should also count towards the contest as well since it’s all on the same theme. Alternately you could consider it a double-entry if you feel that both posts taken together deserve a double prize of $1000.

Whew, so I’ve kind of run out of steam and time on this migration, as I’m sure you, dear judge(s), have run out of patience. This contest ends today, which for me, is a day off, and my two children are asking me to repair the pillow fort that I made for them out of the couch cushions not 20 minutes ago. And since, I think you’ll agree, that the central message of JavaFX is really that of a harmony between not just developer and development, but also between developer and life in general — including family life — that you’ll forgive me for ending this (I can only hope) award-winning post prematurely.

posted by Sten Anderson

Comments Off

Five Things You May Not Know About CITYTECH!

Wednesday, July 1st, 2009

Every once in awhile when I’m talking to people about what we do, I realize that few of our contacts have time to read thoroughly through our website or fully get to know our capabilities.

In that spirit I thought I would post about five things you may not know about CITYTECH to provide some quick hits about our breadth of experience:

1) We’re not “just an ECM (Enterprise Content Management) shop”–recently I heard something to this effect and I realized that it’s easy for us to get perceived as a one-trick pony when we are at a client working on a specific technology, such as ECM, WCM (Web Content Management), Java, .NET, etc.  In fact we do so many things it’s kind of difficult to describe what we do; we’re working on that message for the next iteration of CITYTECHINC.com!

2) Cloud Computing–been there, done that–with a lot of recent articles, webinars, posts, and general buzz (some may say blather) about cloud computing, we realize that this is an intriguing topic.  However, we’ve been confidently leveraging Amazon EC2 for a large organization for awhile and know the pros/cons quite well, so just contact us if you want to learn more!  We are also constantly evaluating and/or using other options such as Google App Engine and the Azure Services Platform.

3) We do RIAs (Rich Internet Applications) for more than the Web–we have solid examples of using front-end UI technologies such as Microsoft Silverlight, JavaFX, and Flex3 on large enterprise applications too!

4) CITYTECH is not just in Chicago–while we are based here in Chicago, we have clients in other cities, including some outside of the Midwest as I noted in a previous post.  If there’s a good project fit and a client wants the peace of mind that our experienced software engineers provide, then we’ll hop on a plane and take care of things!

5) Mobile is just another platform for us–sometimes we consider mentioning ourselves as a “mobile shop” to some degree, but really in our experience mobile devices are just another client platform to support, and our people readily design and deploy apps for multiple platforms and it’s no big deal!

Contact me for more examples and I’ll pull one or more of our senior consultants into the conversation to convey firsthand all that we’ve done!!  You can also dial my office line at 312-673-6433 x 144.

posted by Mike Watson

Comments Off

User or Usability? (or, The Psychology of Software Support)

Friday, June 26th, 2009

Before going into Software Engineering, I took a job in PC support at the university from which I graduated where it was my job to answer the support questions of the professors and administrative staff. I quickly realized that my job had very little to do with any sort of proficiency with technology as it did with simply being a sink for raw human emotion.

A veritable “who’s who” of the emotions involved in grief, I’ve seen a professor indignant and rage filled over the news that a crashed computer and unsaved document added up to hours of lost effort.

I’ve tried to console a staffer in tears over the embarrassment and despair of her 10th support call over Excel, whimpering, “I just don’t get it. I’m just no good at this!”

I’ve witnessed the bewilderment and denial of a PhD at the words of his document all running together: “I don’t understand, I’m pressing the “shift” key to shift the cursor over”.

My heart goes out to these people — technology is harsh and unforgiving (although in fairness, the “technology” of the space bar has been around at least since mechanical typewriters).

I would imagine that most users spend a not insignificant percentage of their time on a computer in some sort of troubleshooting mode. I actually enjoy working with computers, so my patience threshold for futzing around with something I don’t understand is probably higher than average — but woe to the user who actually doesn’t want to sink hours of time into learning how to use a new program.

It’s easy to point to the end user as the one at fault, but I think this is a mistake. I think more often than not, it’s a usability problem, not a user problem.

Usability is a fragile thing. We like to label programs as “intuitive”, but they are only that way because we’ve been trained on what to expect from previous programs. So when we say that a program is intuitive, we really mean that it conforms to our expectations — expectations that have been formed by the evolution of programs which have come before. But when a program behaves in an unexpected way, our confidence in its use is rattled, and we become adrift in its apparent arbitrariness. What was intuitive for its designers turned out to not be so for its users.

Usability Expert Jef Raskin warns against the flippant use of “intuitive” to describe interfaces:

“The impression that the phrase “this interface feature is intuitive” leaves is that the interface works the way the user does, that normal human “intuition” suffices to use it, that neither training nor rational thought is necessary, and that it will feel “natural.” We are said to “intuit” a concept when we seem to suddenly understand it without any apparent effort or previous exposure to the idea. In common parlance, intuition has the additional flavor of a nearly supernatural ability humans possess in varying degrees. Given these connotations, it is as uncomfortable a term in formal HCI studies as it is a common one in non-technical publications and in informal conversation about interfaces.”

He goes on to note that we should more accurately favor the word “familiar” over “intuitive”.

So really, when users are at the mercy of support it’s not because they lack intuition, a word that is connotatively linked to intelligence — it’s that they lack familiarity.

The person questioning her own self-worth over Excel may be in the wrong profession — or perhaps Excel is not all that intuitive. Excel in particular is an extremely powerful, and complicated program, one that, for some reason, is present on most machines in corporate America. Given its ubiquity and unusually broad user base, it needs to pay particularly close attention to usability.

One way a program can make up for being complex is by encouraging the user to explore and try out features knowing that they can always back them out with “undo”. In my experience Excel is particularly bad at this, not because it implements “undo/redo” poorly, but because it is such a complex and bloated program that it needs to go above and beyond conventional “undo” semantics.

I’m continually surprised, when after futzing with charts (or whatever), making changes and having “undo” disabled: “Can’t undo”. Can’t undo? Why not? I just modified the state of the document — back out my changes, Excel! Don’t make me Revert To Saved!

Now that I find myself on the other side of the curtain of application development, I try to be mindful of the user on the other end. When I watch people use an application I’ve written and they struggle with how to do something, my gut reaction is that it’s a training issue.

But it’s not. Ever. It’s a Usability Fail, and it means that I need to listen to the users, and try again.

posted by Sten Anderson

Comments Off

Configuring and Running Classic ASP Applications on IIS 7

Wednesday, June 24th, 2009

Copy the asp files to inetpub\wwwroot folder, set up the Database, install the COM+ DLLs and run the application, Yes this would have worked if you are working on IIS 4, 5, 6 but not anymore. There are more steps to do when you are working with IIS 7. And most of them are tricky and can make seasoned developer run around for solutions.

Below is the list of some trouble shooting tips, in no particular order while configuring and running classic ASP applications in IIS 7.

  1. Enable ASP - Classic ASP is not installed by default on IIS7, so we need to enable it first.  http://learn.iis.net/page.aspx/562/classic-asp-is-not-installed-by-default-on-iis-70-and-iis-75 
  2. “Enable Parent Paths” – Is disabled by default so we need to enable it before we can use parent paths. http://support.microsoft.com/default.aspx?scid=kb;en-us;332117
  3. Classic ASP script error messages are no longer shown in a Web browser by default so if you want to see them, it needs to be enabled. http://learn.iis.net/page.aspx/564/classic-asp-script-error-messages-are-no-longer-shown-in-a-web-browser-by-default
  4. And in IE options, “Advanced” tab uncheck “Show friendly HTTP error messages”.
  5. “Server object error ‘ASP 0178 : 80070005′” error message when you attempt to connect to a database results page created in FrontPage, This is due to NTFS permissions check here to solve it.  http://support.microsoft.com/kb/315454
  6. BUG: ASP error 80070005 “Server.CreateObject Access” when you create a Visual Basic component. This is again due to insufficient permissions, Check here for solution. http://support.microsoft.com/default.aspx?scid=kb;EN-US;q278013
  7. PRB: Server Object Error ‘ASP 0178′ Instantiating COM Object. Again a permissions issue, Check here for solution http://support.microsoft.com/default.aspx/kb/198432
  8. “Enforce access checks for this application” - In Component Services, COM+ application properties, under “Security” tab uncheck the “Enforce access checks for this application” check box. Also make sure in the “Identity” tab, “Local Service” account is selected.
  9. If you are using “myinfo.dll” in your application, copy it to the “C:\Windows\System32” folder and register it using “regsvr32”. OR if you do not have a need for it just take out the references from your application.
  10. Turn off UAC [User Access Control] check if required.
  11. Make sure the you create a application pool for classic ASP application with the settings “.Net Framework version” as “No Managed Code” and “Managed Pipeline” as “Classic” .
  12. “Enable Windows Authentication” in IIS, under “Authentication”.

References
http://msdn.microsoft.com/en-us/library/bb470252.aspx
http://technet.microsoft.com/en-us/library/cc732976(WS.10).aspx
http://learn.iis.net/page.aspx/559/running-classic-asp-applications-on-iis-70-and-iis-75

posted by

Comments Off

Faking a Password Field in JavaFX 1.2

Tuesday, June 23rd, 2009

I’ve been slowly attempting to migrate The Music Explorer from JavaFX 1.1 to 1.2. One area of the application that I was particularly looking forward to updating was the Twitter panel, which is the set of UI components that let you automatically Tweet your activity using the application.

Here’s what it currently looks like in the 1.1 version (on Windows):


It’s not exactly my proudest design moment, and if you haven’t checked out the Music Explorer yet, don’t let this deter you — it is visually the weakest part of the application.

In my defense, it looks this way because it mixes Swing components and JavaFX controls which made it all but impossible to line things up correctly. The second text box in particular is a wrapped Swing JPasswordField, which is unfortunately a slightly different size than the plain JavaFX text control above it.

“Oh, come on now”, you say. “It’s not that bad”.
Fine, check out how it looks on the mac:

Enough said.

So, clearly this needs its own sort of Extreme GUI Makeover: JavaFX 1.2 Edition.

Here’s what it looked like after I compiled it under JavaFX 1.2 (with no code changes):

Oops. That looks much worse, although I like the blue highlight and visible cursor in the new text control. Clearly, though, Swing and JFX Controls are just not going to get along - ever. So after replacing all the Swing components with 100% Certified JFX Controls and Layout Managers, here’s what it looks like:

Much better. Notice the “prompt text” on the text controls which solves the lack of labeling problem.

So now the hard part in all this of course, is that the second text box is a password field, yet since JavaFX still doesn’t currently have such a widget, anything typed into that field will show up as clear text.

So this problem jogged my memory to a post on Drew’s Blog (which btw, is a great source for quality JavaFX posts) who solved this problem by blurring the contents of the text field. Since that’s a pretty neat idea, I went ahead and did that here:

And here’s the code that makes that happen:

TextBox {
  promptText: "Password"
  columns: 15
  effect: bind if (password.rawText.length() > 0) BoxBlur {} else null
}

Note that the password field isn’t blurred until the user starts typing, which means that if the “prompt text” is visible, it’s not blurred.

This relies on a couple of (perhaps shaky) assumptions to work. The first is that, according to the API docs, the value of “rawText” will be updated with every key stroke if the underlying system supports it otherwise it won’t be updated until the user “commits” the text (by navigating off the field for example). Meaning that it’s possible on some systems for the “blur” to not kick in until the user finishes typing (which would miss the point of obfuscating the password).

The second potential code smell here is a possible performance issue with the bind. I don’t know the mechanics of how the bind works, but if it gets evaluated every time “rawText.length()” changes (as opposed to the entire expression “rawText.length() > 0″, which will only change once), then it will get fired every key stroke. This might be alright though, if assigning the “effect” is an inexpensive operation (which I assume it is).

Another way to do this could be to register an “onKeyPressed” handler which would simply assign the effect on the first down stroke.

So there it is. Thanks again to Drew for the idea.

posted by Sten Anderson

Comments Off

JavaOne 2009… Good Times!

Tuesday, June 23rd, 2009

I\'m the one drinking the Mountain Dew.So I went to this conference a few weeks ago called JavaOne, you might have heard of it.  Yeah, that’s me drinking the Mountain Dew in the picture to the left.  Actually this was my second trip to San Francisco for this conference however my experience this time around differed greatly, but in a good way.  For one, I went with a group of 6 from CITYTECH Inc. including Bill Gloff, Jeff Palmer, Sten Anderson, Matt Campbell, and Matt Van Bergen.  Last time it was just one other colleague and me back in 2006.  There are definitely benefits from going with a group.  For one, there could be a good session or BOF that you overlooked that another person might remind you of.  For me, I almost missed the Script Bowl 2009.  How would I forgive myself?  Also, it’s fun to get together and share things you’ve learned while it’s still fresh in your mind.  Actually a few of my colleagues wrote blogs on their experiences at JavaOneBill Gloff, Sten Anderson and Matt Van Bergen had many stories to tell which I will try not to repeat in this blog.  Also, check out Matt Campbell of CITYTECH doing a lightning talk at the JavaOne pavilion.

First, I want to say that I hope JavaOne continues to thrive even after Oracle takes the reigns from Sun Microsystems.  It would be a shame if it was dropped.  Actually, there wasn’t much of anything Oracle at JavaOne this year.  There was no booth at the pavilion, no keynotes, and even the t-shirts didn’t have their logo on them.  I guess I expected it to be plastered all over but they took the exact opposite approach.  The only thing Oracle I remember was the appearance of Larry Ellison at the opening keynote on Tuesday morning which you can watch here.  It was basically reassurance to the Java community that the acquisition is a good thing.

JavaFX was probably the hottest topic this year closely followed by the Java Store. However, the first didn’t have a combo box component yet and the latter didn’t have a cash register.  So I guess you could call it the year of cool stuff that isn’t quite there yet.  The Java Servlet 3.0 spec is looking interesting with an “optional” web.xml and asynchronous processing support.  Another big topic was the Java support for Google App Engine.  It sounds good but no aggregation functions?

Also, I was not the only person disappointed at the cutback of Groovy related sessions this year.  I guess I am a little biased given the fact that my colleagues Bill Gloff, Jeff Palmer and I just started the Chicago Groovy User Group this year.  However here is a little fun fact.  We came up with the idea while attending a Ruby conference in Chicago last year.  We noticed that Ruby already had a large following however Groovy was still young and had nothing similar in our area.  I consider myself a dynamic languages enthusiast however I am drawn to Groovy given that it is built directly on top of Java and can be seamlessly integrated.  As a matter of fact, one night after a JRuby BOF I ended up going out to eat with a group including Charles Nutter and Thomas Enebo, two key contributors to the JRuby project.  These guys have a tough job because their goal is to present a language that offers all or most of the benefits of Java to JDK developers while not ticking off the Ruby world.  They are doing a great job in my opinion.  In one of Neal Ford’s talks on some of the differences between Groovy and JRuby he used a Star Trek reference titled “Let That Be Your Last Battlefield” to make the point that all the dynamic language parties need to get along or they could destroy each other.  Even though I lean toward Groovy I completed a Ruby project just last summer.  Actually, my first project I was on at CITYTECH wasn’t even on the JVM, it was .NET.

The best part of JavaOne this year was not the sessions it was meeting people in the community from all over the world.  From Guillaume Laforge to the Grails Podcast guys Sven Haiges and Glenn Smith.  Speaking of Grails Podcast, be sure to check out their first ever show together in front of a live audience in both audio and video format.  I was glad I had brought my video camera to capture the event.  The panel included Scott Davis, Dierk Koenig, Danno Ferrin, Andres Almiray and James Williams.  I also have video of Dave Klein’s BOF talk on “Grails Enterprise Integration Strategies” that I will be posting soon.  Afterward, we went out to a bar and talked techie over beers the rest of the night and then a group of us got together for breakfast the next morning.

Now I’m back in Chicago working on my current Java project.  I’m thinking of rewriting it in Groovy / Grails to see how much it can be simplified.  I hope to have more on that posted in the near future.  Also thinking of making an iPhone client for it.  BTW, for an excellent book on Grails check out “Grails In Action” by Glen Smith and Peter Ledbrook.  It covers just about everything you need when diving into Grails application development.  For a more detailed look at Groovy check out “Groovy In Action” by Dierk Koenig or “Programming Groovy” by Venkat Subramaniam.  Also look for “Grails: A Quick-Start Guide” for beginners by Dave Klein coming in November and “Griffon in Action” by Andres Almiray, Danno Ferrin, and Geertjan Wielenga early next year.  Unfortunately the last time I was at Borders I was surprised to not find a single book related to Groovy on the shelf.  What’s up with that?  One other thing to note is the SpringOne 2GX Conference coming up on October 19th through the 22nd in New Orleans.

posted by

Comments Off

Dumbing Down Our User Experience

Sunday, June 21st, 2009

If a genie offered to give you some incredible super power, say the gift of flight, or invisibility, but in return would chop your IQ in half, would you do it?

What if he said that, over time, you’ll recover most of your intelligence to a point, but you’ll never be quite as smart as you are right at this moment — would you do it now?

About 12 or so years ago it seems like we were approached by the Web Genie, who offered us the fantastic promise of being able to use an application from any computer connected to the internet — no installation necessary!

All we would have to give up in return is any sense of usability to which we had grown accustomed. Sure we would gain it back slowly, but even 10 years later, web apps would still be struggling to be as usable as the most modest Visual Basic applications of the late 90s.

The first web apps in this pre-AJAX world held the novelty of filling out forms and pressing buttons in our browsers, at the expense of redefining our expectations of usability. But who needs usability when we’re bidding on small household appliances? Just take my credit card number and give me my toaster!

Then AJAX came around and set us back another five years in usability. Sure AJAX made web apps somewhat more usable if used correctly, but it meant that instead of returning to rich application development, we were going to try and keep at this web thing a little longer yet.

Web advocates proudly strutted the improved usability of their applications which we only accepted because our expectations were so low from the first generation of web apps. Suddenly Gmail looked amazingly usable compared to HotMail. A full page refresh on every operation? A thing of the past! Meanwhile, rich clients like Thunderbird silently wept in the corner.

It was similar to, in the early 90s, when popular music abruptly shifted away from Bands with Skill to the Grunge movement. Guitarists everywhere simultaneously recoiled at the notion that “Smells Like Teen Spirit” was the new standard, and rejoiced that the bar was now set so low since being in tune was now optional. It wouldn’t be until Guitar Hero brought back into the cultural awareness the reminder that Kansas is a pretty kick-ass band, and that guitar solos in songs aren’t optional.

Web Apps tend to struggle with fulfilling some basic rules of usability — basic maxims that Jef Raskin championed, such as, applications must treat all user input as sacred and, always allow the user to undo an operation.

We take it for granted that we’re not supposed to hit the “back” button at the risk of double charging our credit card, to say nothing of navigating to a different page, or abruptly closing the browser. We’re annoyed, but not surprised, when a form that we’ve spent the last 15 minutes filling out mysteriously resets itself after we submit it. We commit an operation, but we have no expectations at all that we will be able to undo what we just did.

I don’t know how many email drafts I’ve lost to Gmail because it got stuck in an unrecoverable “auto-save”. While editing a web page on “Google Sites” I am not uncommonly confronted with the message: “Unable to save the page at this time, please try again later”. Please try again later? I want to save my work now, not later!

We would never let a desktop application get away with this, but we grant a free pass to web apps because we understand that they’re shackled by the browser and pesky security models that don’t allow access to local storage, so we grant them copious amounts of slack, even though I’m sitting here with gigabytes of empty storage space and a document that can’t be saved.

As an internet consumer, I, of course, make liberal use of web apps all of the time. At the risk of biting the hand that feeds me all of the convenience of paying my bills or buying movie tickets without having to mail a check or talk to a person at a ticket counter, I am grateful for it all. I gladly accept convenience over usability with only mild amounts of grumbling.

It’s not like I haven’t produced my own usability nightmares on the desktop, or that there aren’t stand-out paragons of usability on the web. The distinction lies within the intention of the toolset that us mere mortals are expected to work with.

When I’ve committed my usability atrocities on the desktop, I had to go out of my way to buck the toolset I was using (I don’t, know, maybe I thought I was being clever), and conversely, the web developers that created, say, Google maps (since I’m on such a Google theme here) must have moved Heaven and Earth to make that work. One can only imagine what they could have come up with using Desktop technologies (it probably looks something like Google Earth).

So having said that, I find it difficult to get around the sentiment that web applications dumb down our expectations of what we’ve come to expect from how an application should behave. That might sound like an incendiary statement, and you might be tempted to think of this as just a tirade against web applications.

In fairness though, User Experience certainly does not make up the entire enchilada of what makes a quality application, just as the Nintendo Wii is proof that High Definition visuals aren’t necessarily for a quality gaming experience.

“Convenience and Collaboration” are huge driving forces behind what can make a Web application great (and I am a big fan of many of them). However, while “The Legend of Zelda: Twilight Princess” is one of my favorite games, I can’t help but wonder how much better the experience would have been in 1080p.

One of the Java Posse, in a discussion about how to distinguish a web app from a rich internet app,etc. stated that the distinction is moot: “it’s just apps”.

Perhaps this is extremely forward thinking and will be true ten years from now, but for the present trying to erase the line between the two types is what leads us to “The Uncanny Valley of User Interface Design”, as outlined in Bill Higgins’ excellent post. In a nutshell: web apps should conform to a user’s expectations for how a web app should behave, and vice versa for desktop applications. When the two cross into each other’s paradigms, a jarring, off-putting experience is the result.

Indeed it seems to be the trend for web apps today: move as many desktop-isms into the browser as possible banking on the fact that the user will appreciate inconsistent “auto-save” over none at all.

I wonder though, if we aren’t pushing in the wrong direction. Surely this web technologies thing can be taken further…but maybe it shouldn’t. Maybe it’s time to stop squeezing more “features” out of AJAX and get back to our rich client development roots.

Maybe we can remember that there was a time when not every application ran out of a browser.

posted by Sten Anderson

Comments Off

JavaFX Project Postmortem: In Which I’m Interviewed by a Five Year Old

Sunday, June 14th, 2009

Developer magazines sometimes are able to interview key developers of high profile projects after they’ve been shipped (with questions such as “what went right?”, what went wrong?”, etc.). Since I officially kicked my first non-trivial JavaFX application, Music Explorer FX, out of the door last week, I figured that I would grant an interview of my own. Since my five year old daughter, Meredith, had refusal rights from her last interview (and also since she was the only one interested in talking to me), I happily granted her the honor.

Meredith: Thank you for taking the time to talk to me, daddy.

Me: Thank you for staying up past your bedtime to do this interview.

Meredith: Let’s get started, shall we? Tell me about the application you just finished.

Me: Music Explorer FX is a tool for music discovery, written in JavaFX. You can get more information at www.musicexplorerfx.com

Meredith: Yes, yes. Let’s keep the sale pitch to a minimum, please. So why did you choose JavaFX for this project?

Me: Well, I was looking to do a project in JavaFX, so in some ways it’s a backwards answer to the question–

Meredith: Well, you wrote the questions, I don’t even know what half of these words are…

Me: Yes, well, so the reason I was looking to do a project in JavaFX is because I’m primarily a Java developer, and while JavaFX syntax has no similarity to Java’s, JavaFX compiles down to regular Java class files that run on the JVM, maximizing interoperability with Java code. This means that I was able to use familiar core Java API classes, such as Map, and List, and even dip down into Java code as needed, for example, if I needed to work with threading. It also meant that I could freely use any existing 3rd party Java libraries, such as Twitter4j for the Tweet support.

Meredith: (laughs) Tweet! Like a bird! Tweet, tweet, tweet! Look at me! I’m a bird!

Me: Yes, yes, try to stay focused, sweetie.

Meredith: So you didn’t find the learning the language syntax much of a problem?

Me: No, not at all, while there are some oddities to the language, for example, capital “Void”, instead of regular “void”, overall its declarative syntax was very straightforward. JavaFX has been described as a DSL for User Interfaces and Animation, and I think that’s a good description for it. It actually shares a lot in common with Groovy Builders — the subject of our last interview.

Meredith: I don’t remember that.

Me: You were four at the time — your memories won’t start fully forming for a while yet.

Meredith: If you say so. So, JavaFX is a Rich Internet Application technology. So is it in my Dora the Explorer game on the computer?

Me: That’s probably Flash based — a JavaFX competitor.

Meredith: Oh, ok. So what are some JavaFX games I would have played? Sesame Street? Elmo’s World? The Backyardigans? Polly Pockets?

Me: Well, I mean, JavaFX is still very new. So “competitor” might be a little generous — and besides, I don’t know that JavaFX is targeting the casual game space per se.

Meredith: Uh huh. Let’s move on. Earlier today you gave Holly more ice cream in her cone than you gave me. You said that you’d make it up to me next time. When will that be exactly?

Me: Hey! I told you, I didn’t want to take any questions on Family Dessert Policy!

Meredith: Daddy! It’s not fair! You always give her more than me!

Me: Ugh. Fine. Do you want some ice cream now?

Meredith: Now? It’s two hours past my bedtime. You’re keeping me up pretty late as it is. If mommy finds out–

Me: Fine, fine. How about for breakfast tomorrow then?

Meredith: Deal. Well, I think that’s all the time we have.

Me: Wait, we’re not even halfway through the questions. Ask me how it felt to see my application on stage at the JavaOne keynote–

Meredith: Mommy!! Daddy’s keeping me up!

Me: Ok! Ok! Alright. Geez. We’re done. Ok?

posted by Sten Anderson

Comments Off

Installing and Configuring SQL Server 2005 Reporting Services

Saturday, June 13th, 2009

Since past one month, couple of my friends asked me how to install and configure SQL Server 2005 Reporting Services on Vista. I had to recall what I had done few quarters ago. I also redirected them to this Microsoft KB.
All the steps are very clearly mentioned here and all we need to do is to follow the steps and make sure the following things are in place.

  • Uninstall the older version of Reporting Services [SQL Server 200 Reporting Services] before starting with this version.
  • Once installation is done go to “Reporting Services Configuration” tool and make sure all the configuration items are in GREEN.
    • Server Status: Running
    • Report Server Virtual Directory: Is set to “ReportServer”, else create with the same name and preferably under Default Web Site.
    • Report Manager Virtual Directory: Is set to “Reports”, else create with the same name and preferably under Default Web Site.
    • Windows Server Identity: Service name should be “ReportServer” and Service Acocunt should be “LocalSystem”
    • Web Service Identity: Select “Classic .NET AppPool” for both Report Server and Report Manager. Also ASP.Net Service Account should be “NT Authority\NetworkService”
    • Database Setup: Database name as ReportServer [This should be alredy present or create new] and DB version should be C.0.8.54
    • Initialization: Automatically gets initialized else click on Initialize button.
    • Click “Apply” and the Reporting Services configuration is done.
  • Check if the RSWebApplication.config [located C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager] has ReportServer defined between the “ReportServerVirtualDirectory” tags
       <UI>
          <ReportServerUrl></ReportServerUrl>
          <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
          <ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
       </UI>
  • Restart IIS, ReportServer, and SQL Server if required.
  • You can access the reports after publishing, using the link [ http://localhost/Reports/Pages/Folder.aspx ]

So ENJOY Installing, Configuring, and using SQL Server 2005 Reporting Services.

posted by

Comments Off

iPhone: iDuped.

Friday, June 12th, 2009

Last night I gave up something dear to me…no not my kidney, my first gen iPhone. As I navigated my way through the winding passageways of AT&T’s completely non-frustrating website to the iPhone 3GS pre-order page, I noticed something.

Behold, o glorious pre-order form.

While the increase in the rate was to be expected jumping into 3G land, there was one thing that rubbed me in an unpleasant fashion. Voice Dialing…..for $5 a month. While my initial reaction may have contained colorful verb phrases, thinking that users were about to be charged monthly for new functionality; I soon realized this was something far more questionable. AT&T *8 voice dialing.

So what we have here is redundant functionality. The average consumer, after hearing about the wide array of new iPhone features in the 3GS (voice commands being one), arrives at said pre-order form. Voice dialing is listed as an option, with no details stating that this voice recognition is actually AT&T’s functionality not Apple’s (unless the subscriber happens to look inside the dropdown for details, and even if they do there is no mention of Apple’s functionality) The subscriber wanting the new functionality, agrees to pay $5/mo for voice dialing, then unknowingly proceeds to use Apple’s built in functionality for free.

iDuped.

posted by

Comments Off

CityTech Home