Sunday, November 9, 2008

Through the Years

Lately I find myself browsing the lists of followers and following for various people on Twitter.  It feels a bit strange, almost like seeing someone’s Rolodex, black book, or email contacts, but I guess this is the new reality of social computing.  Most of the time I haven’t the foggiest idea who these people are, but sometimes their name, alias, or picture is enough to intrigue me, and more often it’s because I've seen an @name tweet that looks interesting.  Most people have their own websites or blogs, and a refreshing number of them aren’t completely commercial.

After clicking through a few and skimming various blogs, I found one that looked interesting, if perfectly pointless: How would have you looked like in the 50's-90's?  This in turn linked to the site Yearbook Yourself, which was well done and a bit of fun.  I’ve seen various sites that can age a picture, show what a child of two parents might look like, and so on, with most of them being fairly awful.  This site looks like a front-end to a few different malls and stores, but it doesn’t go crazy trying to advertise or oversell.  This last point should be a lesson to anyone building a site that tries to sell something, as people like me just don’t have the patience for annoying pop-ups and other tactics.  I have become quite adept at ignoring them, or moving on to something else.  If a site doesn’t annoy me then I’m much more likely to spend time on it, come back later, and possibly become a customer.

If you didn’t click through to see what the site does, it basically allows you to see what your yearbook photos might have looked like through the years.  It has decent rotation, zoom, and pan features, so you can get pretty good results.  If it has a major failing is that it doesn’t adjust, or allow you to adjust, the relative contrast, so some pictures are too dark or too light.  But it’s better than most sites I’ve seen, and the results made me laugh:

1952  1956 1964

1968 1976 1980

1984 1990

Granted, the goatee doesn’t work in all of the pictures, and I doubt I would have sported it in high-school no matter what the decade.  One that made me laugh a lot was 1976, which I think could have been the inspiration for Mark Wahlberg’s character in Invincible:

invincible

The 1990 picture hit close to home as I had a “surfer mullet” in high-school, short and spiked in the front and fairly long in the back.  I don’t recall anyone calling those haircuts mullets back then, and they were common enough in Mississippi that people didn’t give them a second glance.  That picture also reminds me a bit of Randy Owen (lead singer of Alabama), Billy Ray Cyrus (before the Miley years), and that jackass Billy Mitchell in the movie The King of Kong.  Maybe not quite as flattering as Mark Wahlberg (which itself may be questionable), but funny in a scary kind of way.

The 1980 and 1984 pictures bother me the most, as hair like that is just plain wrong.  I am sure that I saw people sporting those dos back then, but I don’t recall what I might have thought.  Like the mullets, they probably didn’t seem quite as out of place or time, although I guess that might have something to do with where you were living at the time.  The 1968 picture is funny in that it seems similar to some of the haircuts that I’ve seen my stepson’s friends wearing.

Speaking of pictures that bother me, I find it hard to look at some people’s albums on Facebook that are from the 1970s and 1980s.  The same is true for a lot of films from that era, especially those about high school and colleges.  The guys look totally dorky and the girls are scary, but I know that I couldn’t have thought that at the time.  Surely people haven’t gotten any better or worse looking on average, but the haircuts, makeup, and clothing have changed a lot.  My wife has also pointed out how bad actor’s teeth were back then, with many of them being yellowed, crooked, smoke-stained, and so on.  That’s one of those things I wish I’d never had pointed out to me, as I don’t think I even noticed it before, but I do now!

I’ve always been interested in time travel, but I have to wonder if I’d really like to go back and experience things first hand.  Some things like historic events would be cool, but I think that most day-to-day life would be disturbing, at best.  One of my favorite new series this fall is Life on Mars, ABCs version of the BBC original.  It’s about a cop who gets hit by a car and is in a coma, but is apparently “living” in 1973.  I was only 6 years old in 1973 and wouldn’t visit New York City for another 17 or so years, but it seems to be doing a decent job of depicting the look and feel of the time.  There is a lot more to the social and political issues of the time than anything else, and it’s an interesting vehicle for showing how much things have and haven’t changed.  Other series and movies have been similar, but this one seems to have more legs as it has decent writers and actors.

My own idea for time travel would only work for going into the future, and only if we can make cryogenic storage a reality.  If I knew that I had only a short time to live, I’d have myself frozen and then awakened every 5 to 10 years.  I’d spend a week or so catching up on things, maybe spending more time if it seemed to be really interesting.  This would let me see and experience the future, a form of time travel, without having to worry about the laws of physics.  Granted, it might be difficult to learn that loved ones and friends were no longer around, but again I’d only be doing this if my own time was short.  It might also be damn depressing if things were really bad, but I’m fairly optimistic and feel that things will be better in the future, not worse.  The worst thing might be feeling like a caveman due to the advances in technology, being unable to find out what is happening due to lack of knowledge of how to use things well.

Many of us are now using the web technologies without thinking about it, and we’ve adapted to things like the iPhone, but we’ve had time to grow accustomed to it.  If the “you” from 1978, 1988, or even 1998 were transported/awakened/etc. right now, how well do you think you’d do if you had a week or so to check things out?  The 1998 version would have had exposure to the web, especially if you were involved in high-tech, but the same couldn’t be said of the 1988 or 1978 versions.  My cell phone in 1998 was a Motorola StarTAC, considered “cool” at the time but would be junk today, and my first Palm Pilot had already lost its novelty.  Neither of them really gave any clue as to what we’d be using in a decade.  Many of us were using the web enough, but it wasn’t considered a serious “platform” for applications.  I was working for WebLogic, Inc. (before BEA and long before Oracle) at the time, and many there thought the same thing, with web only for the simple stuff.  It sounds crazy now, but that’s the point.  What will we be using in 10, 20, or more years?  I bet that most of the web pundits (or pundants, as some idiots call them) don’t have a clue, and we’ll all look back on this time and wonder how we ever got by.

Saturday, November 8, 2008

iFlights & iFights

Writing a blog entry on the iPhone while en route to Bangalore from Frankfurt isn’t easy, but the fact that I can do it is pretty cool.  Iggy Pop and Kate Pierson (of B-52’s fame) are singing “Candy” as I started this using the Notes app (Edit: See below for more on why this was a bad idea), with One Republic now singing “Apologize.”  That song, while overplayed, is still one of my recent favorites, although for a while I thought they were saying “It’s too late to phone a judge…”  I have no idea why I thought that, but it had me listening to the rest of the song to try to figure out if it was about crime or something.

The confusion over what that song meant leads me to the iFight in the title.  I just finished watching the latest episode of Law & Order, downloaded this morning via iTunes just before leaving for the airport, and the subject of the show bothered me.  It revolved around street fighting, to the death in some cases, with seemingly ordinary people involved.  I won’t give away the plot, but it featured a YouTube-like site where videos of the fights were being uploaded.  Law & Order is often said to be “ripped from the headlines,” and in this case it hit (no pun intended) close to home.

I’m a strong believer in personal freedoms and freedom of expression, but stuff like this is a bit too much.  I worry about kids seeing this and emulating it, and from the news reports it is already happening.  My stepson, age 12, has some restrictions on what he can and can’t do/see on the net and TV, but he surely gets more than he needs.  I know that he’s seen things like the “Ultimate Fighting Championship” with his dad, and I can’t control that, but I do try to offer a counter to it.  So far he seems to be turning out to be a good kid, and I hope he doesn’t fall prey to peer pressure or media overexposure and get into trouble like some kids do.

As I finished typing that paragraph Johnny Cash came on singing “The Man Comes Around,” which got me thinking more about violence on TV.  I first heard that song while watching last season’s finale of “Terminator: The Sarah Connor Chronicles,” a show that I enjoy quite a bit.  It is often a violent show, which is no surprise given that it’s part of the Terminator franchise, but it doesn’t bother me like real-life YouTube videos and the like.  As an adult I think that I have the ability to distinguish between what is obviously fictional (at least I hope that the Terminator storyline is) and what is real-life.  Can children make this distinction, or for that matter many supposedly mature adults?  While my stepson is an admittedly small sample set, he seems to be similar to many of his friends in terms of his ability to understand what is real or not.  I let him watch Lost, Heroes, and a few other PG-13/TV-14 shows and movies, and it’s clear that he doesn’t always get it.  That he has less-restricted access while not at our house is worrisome, but it worries me more that there are kids who don’t have any guidance whatsoever.

Well, that was getting a bit heavy, but luckily Journey is now on singing “Don’t Stop Believin’,” which I had on my iPhone before the infamous Team Cyprus Move To Undo “The Video” scandal.  (Edit: You can still see the video here despite the best efforts to remove it)  If the timing hadn’t been so bad with the markets crashing and all, I think most folks would have laughed at it, or most likely never heard of it.  It certainly wasn’t any worse that what went on during the dot-com boom, but way back then we didn’t have YouTube, Twitter, and so on to rapidly spread things around.  What I find funny is that they tried to remove it, clearly not “getting” the power of the net despite their being considered the tech elite.  This will likely be around forever, thanks in part to the technologies that power the companies they represent, and in some cases pioneered.

After a bit of a break I resumed typing, which is somewhat tedious on the tiny keyboard.  Why don’t more apps support the horizontal layout, which is wider and more comfortable?  It’s strange to me that Apple can do so many things right, but get a few things very wrong.  Where are cut-and-paste and other accelerators and ease-of-use features?  The original Mac was cool because it did many of these things so well, yet it seems that they either don’t know how to do them on the iPhone, or are purposely holding back.  Weird.

Led Zepplin just came on singing “Kashmir,” which seems somewhat appropriate given that I’m heading to India.  I don’t know much about the region, and if the Indian gentleman next to me wasn’t sleeping peacefully I’d ask him.  We spoke after boarding and he works for Greenpeace, the first person I’ve ever met from that organization.  He’s returning from Amsterdam where he was meeting with tech companies to discuss how they can be greener, reducing their carbon footprints.  I’m not really much of an environmentalist in the “activist” sense, but I do believe that the energy problem is the most important one to try to solve.  Why?  Because if energy is cheap, renewable, and clean, lots of other problems become much easier.  I don’t believe that it is going to be easy to “turn back the clock” and vastly reduce our consumption, and it’s going to be hard to convince developing countries that they can’t or shouldn’t grow, which will always require energy.  Both US presidential candidates gave this issue plenty of lip service, now lets see if Obama is going to make good on it.  I hope he does, and I wish that we’d channel most of our resources and talent into trying to solve this problem.

After Nirvana sang “All Apologies,” a favorite of mine, The Queens of the Stoneage came on with “Long Slow Goodbye,” which may be some sort of cosmic hint to wrap this post up.  It seems long on the Notes screen, which probably wasn’t designed for such things, but it works well enough.  I’ve got lots of time left and may blog some more, moving on to a more technical subject.  (Edit: iTunes can’t sync the notes to a PC, which is stupid, and another one of those things that it is hard to believe Apple can’t or won’t do)

Thursday, November 6, 2008

I’ve Lost My Mojo!

My travel mojo, that is.  I realized it as I sat by myself in a restaurant in Dreieich, Germany, not far from the Frankfurt airport.  Seated at a table with a German couple, I couldn’t think of anything to do except stare at my hands (literally twiddling my thumbs) while waiting for the waitress/barkeep to come back for my order.  The beer was good, the restaurant was nice, and I was looking forward to the garlic cream soup and Bavarian style pork with cabbage, etc., but I was quite uncomfortable just sitting there.

What to do?  The couple I was seated with didn’t appear to be looking for conversation, especially the guy, who just had that “scary” look about him.  I thought about pulling out the iPhone and browsing the web, twittering, etc., but the silly outside-of-USA data policies made me hesitate.  After what seemed a long time, but which was really probably 5 or so minutes, I got up, paid for the beer, and left.  I had passed a Döner Kebab place on the way, so I headed back there, knowing it would be less intimidating.

What the hell?  I used to eat alone all over the place, never hesitating to venture out into the places I travelled to.  Eating alone didn’t bother me a bit, and I sometimes found interesting people to talk to.  The only thing I can figure is that I’ve lost my travel mojo, and I will have to get it back.  I don’t need to become an international spy or travel in time to do so; I’m pretty sure it just comes down to getting out on the road more frequently.  Being married with a family means I can’t travel like crazy as I once did, nor would I want to.  But I do need to get out there on a regular basis, not only because it’s good for my mojo but because it’s good for my job.

Monday, October 20, 2008

There Ain't No Such Thing As A Comfy Seat

During a keynote at AjaxWorld 2008 West the speaker talked about the "comfy seats" in a Ferrari, which inspired this post. I was reminded of the many articles in car magazines where the reviewer used words like comfy, great fit, relaxing, supportive, and so on to describe the seats. Or not. For every glowing review there are as many or more where the seats are describe as uncomfortable, tight, hard, non-supportive, and so on. It's the same car and seats, but the reviewers are all different.

I drew a rough table that I can't easily reproduce from this iPhone blog client, but it has cars in the rows and reviewers in the columns. The cars range from economy to SUVs to exotics, the reviewers from petite women to Biggest Loser contestants. You can probably guess that some of the results are size-centric, but other factors such as sex and desire come into play. A large man might put up with tight seats in a Ferrari because, well, it is a Ferrari. But would he honestly say they're comfy? I doubt it

If you're into WOA, RIAs, and so on then you know where I'm going with this given the title. It's not every day that I get to combine my passions for cars, sci-fi, and WOA, so this was fun to ponder for a bit. If you're a bit lost at this point, here are some connections:

There Ain't No Such Thing As A Free Lunch - Robert A. Heinlein
REST - Representational State Transfer
WOA - Web Oriented Architecture

In summary, consider using WOA so that you don't try to force all users into the same UI. It won't fit them all, and most won't find it comfy.

Thursday, September 11, 2008

iPhone Blog Post

Posted using blogit.typepad.com from my iPhone.

Monday, July 7, 2008

And Now For Something Completely Different

It seems like a long, long time ago that I first wrote about the sample RESTcommands that we had made available on wlp.bea.com, but in fact it was less than a year. It's amazing how much has happened since then for me, WebLogic Portal, and of course BEA.

A Quick Refresher

My blog entry The REST of the Story includes an introduction to REST, and here are some of the links again if you'd like to read a bit about it:

There are others, and there is naturally lots of discussion and debate over how RESTful something is. I have always been more interested in the practical application of ideas and technologies rather than the theory, so I try to avoid getting into these debates. What I do know is that REST-style commands work very well for Web 2.0 applications, and I like not having to use heavyweight server-side Java for everything.

A Web 2.0 Demonstration

You can see the REST commands in WLP 10.2 in action by visiting the Dynamic Visitor Tools Sample site. Follow the link on that page and you'll see this portal desktop:

dvt_desktop.png

You can create an account and login very easily, and when you do so it will enable the DVT functionality for things like drag-and-drop, adding portlets/pages/books, and changing the look and feel, layout, menus, and so on. What you might not be aware of is that nearly everything you see is powered by a combination of the WebLogic Portal REST API, the WLP Disc Framework, the Dojo Toolkit, and the Dynamic Visitor Tools Sample code.

Patterns

A visitor to this site will push buttons, make selections, drag and drop items, use inline editing, and so on as part of a Web 2.0 style interactive experience. A common pattern is used for nearly everything in the DVT, illustrated here:

rest_flow.png

We'll look into Disc more in an upcoming entry, for now we'll start by saying that it makes it easy to get to the client-side representations for portal objects. The DVT sample uses Disc to get information about the portal desktop, including the various labels, titles, DOM nodes, and so on that make them up. Without Disc a portal page is just a collection of DIVs and other HTML tags, and in the past developers often had to invent their own solutions for mapping these to the server-side definitions and instances. Not impossible, but it wasn't always easy and it meant custom solutions that might not interoperate or upgrade well.

Try It!

One thing that makes REST interesting is that it is very easy to use; in fact you can try it out without writing a single line of code. I will suggest that you use Mozilla Firefox with the Firebug add-on as you can do a lot with the console, but any browser will at least let you try the basics. Try the following URL:

http://wlp.bea.com/dvt/bea/wlp/api/portlet/list?webapp=dvt

This will return a list of available portlets in the dvt web app, which will look something like this:

rest_portlet_list.png

The XML is fairly straightforward:

  <rsp>
<portlet_summaries> - Array of portlet summarys
<portlet_summary> - Summary for a portlet
<label>portlet_1</label> - The unique label for the portlet
<title>My Portlet</title> - The title to display
<icon>portlets/icons/myportlet.png</icon> - The optional icon
<description>The portlet</description> - The optional description </portlet_summary>
...
</portlet_summaries>
</rsp>   


This list can be used to display a list of portlets, as in this example from the DVT Gallery:


dvt_portlet_list.png

A Closer Look


While XML is great for many things, it's not really great on the client side, especially when going cross-browser. It's often easier to use JSON, JavaScript Object Notation, which is fully supported by the WLP REST API. Simply include the argument format=json and you'll get a response that contains JSON, which is easily used on the client. Here is a screenshot from Firebug showing the arguments being used by the DVT to build the gallery listing above:


rest_portlet_list_params.png

These include:




  • desktop: dvt - The portal desktop, from Disc


  • format: json - Return the results as JSON


  • max: 200 - Return a maximum of 200 portlet summaries


  • portal: demo - The portal, from Disc


  • scope: visitor - Can be visitor, admin, or library


  • start: 0 - Start with the first portlet


  • webapp: The webapp to get the portlets for, from Disc



This will return the following:


rest_portlet_list_response.png

This is fairly dense, but if you format it you can see that it is similar to the XML:



  {
"content": {
"portlet_summaries": [
{ "title":"My Portlet Customers","label":"portlet_1","icon":"portlets/icons/myportlet.png" },
...
]
}
}   


If you haven't already used JSON it might not be obvious why this is so much easier than XML. With JSON you can use the JavaScript eval function (or a nice wrapper for it as provided by Dojo and other toolkits) and get a JavaScript object back. This takes just a few lines of code:



  var result = eval("(" + XMLHttpRequest.responseText + ")");
var content = result.content;
var portletSummaries = content.portlet_summaries;
for (var i = 0; i < portletSummaries.length; i++) {
var title = portletSummaries[i].title;
var label = portletSummaries[i].label;
...   


More Examples


You can use the same pattern to get lists of most of the portal resources, using the following pattern:


<protocol>://<host>:<port>/<webapp>/bea/wlp/api/<type>/<action>/<label>?<params>

This is covered in more detail on our edocs site in The WebLogic Portal REST API , which is a good follow-up to this blog entry. If you'd like to explore some more, here are some of the types and actions you can try, all starting with http://wlp.bea.com/dvt/bea/wlp/api/:




  • portlet/details/<label>?webapp=dvt - Where label is from the portlet summary


  • lookandfeel/list?webapp=dvt


  • page/list?webapp=dvt


  • book/list?webapp=dvt


  • menu/list?webapp=dvt


  • theme/list?webapp=dvt



As you've probably noticed, so far the focus has been on reading from the server via HTTP GETs, but there is a lot more you can do using POSTs. The DVT sample uses this to change the look and feel, add portlets to a page, and so on, using the data from the GETs to create the various parameters. You can't really explore POSTs using URLs in the browser, but you can do so with a small amount of code. One thing to note is that you will need to be authenticated in order to do anything interesting, and you can only do the things that the server security allows.



I've got a set of sample portlets that I've been working on that duplicate much of the functionality in the DVT using "plain" JavaScript, with no reliance on Dojo, etc. All you need to do is have Disc enabled in a WebLogic Portal 10.2 desktop. They aren't meant to be examples of how to write portlets so much as they are demonstrations of using REST and Disc, and can be used to learn how to use these technologies with most any framework. I hope to make these available soon, but if you can't wait drop me a line and I'll send you the current set.



More to come on this, and I'll continue with the optimization series as well.

Friday, April 25, 2008

The Importance of Frontend Performance

I've never "live-blogged" before, and in fact blogging is normally something that takes me forever as I treat the entries more like whitepapers than anything else. I think that comes from the "enterprise" culture and my age more than anything else. That being said, I'm sitting in a session by Steve Souders, who has been the chief performance Yahoo and is now at Google, and is the guy behind YSlow, etc., and it's quite interesting.

I'm blown away by the stats he has on various large sites, where he shows that 80-90% of the time is spent getting the content to and rendered on the client, with a relatively small amount of time spent on the server. This is interesting because many BEA products are very good at the server side, with all the various -ilities that we are famous and loved for. What we haven't done a ton of work on is the client, instead focusing on implementing the latest J2EE and industry standards. The WebLogic Portal team certainly cares about the client, but I can't say that we've gone nearly as far in that area as we could/should have.

A lot of what is being presented may seem obvious, and he's building on the types of things that YSlow, etc. focus on. The slide he's on as I type this is on JavaScript and how it is loaded, where a huge amount of time is spent just getting the code to the client (assuming an empty cache), and that's before it actually starts doing something. If you've followed my earlier blogs then you know that I've minified, combined, and so on the code on they wlp.bea.com playground, but even after all that there is still room for improvement.

My personal opinion is that I shouldn't have had to do this, it should just "work" when I'm using a WLS/WLP/etc. server. If as a developer I specify N JavaScript files, the server should be smart enough to package them all up, minify them, gzip them,etc. to do the right thing to make the client more efficient. As a client-side developer I shouldn't have to use tricks or otherwise fool around with trying to optimize it. Hey, we do a lot on the server to ensure that it works well, so why not on the client?

I sometimes get the impression that some folks don't think the client is important, and in fact they consider it "fluff" compared to the "hard stuff" on the back end. I firmly believe that plenty has been done on the back end, and in fact any further optimization is going to be minimal and won't necessarily add any measurable value. We've been in various horse races to show that the server is fast, and I'm sure that's important at some level, but if the client experience is slow and annoying, who really cares how fast the server is? There is an old saying that the customer is king, and the real end-game customer are the users of the sites, not the people using our products. If these end users aren't happy, our customers won't be happy.

And hey, if the client really is easy and fluffy, solving these problems ought to be a cinch for a bunch of hard core enterprise developers, right?

 
Clicky Web Analytics