Gravatar

Geoff Evason

Archive for the ‘ui’ Category

HTC Touch Diamond: Lessons on what not to do with a UI

Thursday, May 8th, 2008

There are obviously a lot of iPhone clones out there. Some are better than others..

HTC just announced the ‘Touch Diamond’. The specs look good. 3G, GPS, big internal storage, nice bright screen. By all accounts it should be comparable to the upcoming 2nd gen iPhone. I was just looking at their demo and think that they spent too much time worrying about transition effects and not enough time worrying about usability.

The two most notable problems are this.

1. No consistency in the UI: The contacts have a roladex feel, the music is some sort of stack, and the photos, well, I’m not really sure what that is. Some sort of hanging chain type of interface… ?!

2. Poor use of space: The 2 worst offenders are mail and photos. The mail appears to be organized in an envelop and displayed with a 3d perspective where the right side of the message is further away form the screen. This is downright horrible design. Test that should have prime focus should not have perspective that makes it harder to read. IT should also not be covered by an image which obstructs the view. The photos also show on an angle, and in only a small part of the screen. If I’m looking at a photo, I want to see it!. The ‘chain’ format that it’s in doesn’t allow you see to what’s next or last (which is the only reason not to have a full screen photo anyway.)

Now, this isn’t a hands-on review. This is purely from looking at their flash demo. but, the 20seconds I spent looking at the flash demo made it clear that I wouldn’t be giving this device any more attention.

CSS For Sliding Door Input Buttons In Rails

Tuesday, February 26th, 2008

UPDATE: This article appears to get a reasonable amount of traffic from google so I figured I’d update/correct it. The solution I outline below ended up not working as nicely as I had hoped, so I scrapped it. Instead, I just created a single image and making all my button text fit within the length of that single image. Sliding doors isn’t worth the trouble (i.m.h.o), and what I wrote below isn’t a perfect solution anyway.

——

This is one of those annoying things that took me all day to figure out, and the stuff I was able to find on the internets wasn’t very helpful….

I wanted to create some fancy looking buttons with curved corners. But I wanted them to be real buttons (http:post) , not links (http:get) that just look like buttons.

I looked for a way to do it and found a way to do it using links and a way to do it using the <button> element. Neither of these did what I wanted. Rails uses <input type=”button” /> rather than <button>. After learning more about the difference between buttons and inputs I’m still not sure why, but I figured there must be a good reason. I did try <button> but IE was giving me headaches (I couldn’t click on the button) so I gave up. I tried adapting these methods and they weren’t working for me.

One of the methods linked above worked briefly, but it required floating one of the elements left, which makes layout a REAL pain!

So, I (perhaps by accident) found an easier way. I took the opposite approach from using the outer html element for the left image.

First, I made my own button helpers like so:


module ButtonHelper
  def fancy_button_to(button_text, action_text, button_class = "button")
    return '<form method="post" action="' + action_text + '">' + button_base(button_class, button_text) + '</form>'
  end

def button(button_text, button_class = "button")
    return button_base("button", button_text)
end

protected

  def button_base(button_class, button_text)
    return '<p class="button_wrapper"><span class="' + button_class + '"><input value="' + button_text + '" type="submit" /></span>'
  end

end

Then, the css looks like this:


span.button input {
 border:0;
 cursor:pointer;
 white-space:nowrap;
 color: #fff;
 text-align:center;
 font-weight: bold;
}

span.button {
 background: transparent url(/images/small_button_left.gif) no-repeat top left;
 padding: 6px 0px 6px 5px;
}

span.button input{
 background: transparent url(/images/small_button_right.png) no-repeat top right;
 padding-right: 5px;
 font-size: 15px;
 height: 25px;
}

You will need to create some sliding door images (see links at the beginning of this post). The values measured in pixels in the css will depend on those images.

Of course, there is some conditional css, but it’s pretty short. You just have to use different padding amounts for IE6 and IE7. So, I created a new css file call button_ie.css. I conditionally include it in the html file like so:


<!--[if lte IE 7]>
  <link href="/stylesheets/button_ie.css" media="screen" rel="Stylesheet" type="text/css"></link>
<![endif]-->

The button_ie.css looks like this:


span.button {
  padding: 0px 0px 0px 5px;
}

This isn’t perfect. Occasionally there is an error of 1 pixel in firefox 2, but IE6, IE7, & Safari seem to work fine.

Hopefully this will save someone else the frustration I faced today. Though to be honest, I’m actually thinking of moving to fix width buttons.

Why Choose Ruby On Rails?

Tuesday, July 31st, 2007

So, why did I choose Ruby On Rails?  Well, it’s all the love mostly.

I don’t come from a web development background.  I come from a windows client development background.  When I wanted to learn about web programming, I starting reading various blogs, talking to friends, and reading up on things.  There was a lot of buzz around rails, and some amazing claims (like 10x faster development).  And while you really don’t get 10x faster development, you do essentially get to start working on the real problem right away, rather than building up the infrastructure needed to do so.

That’s what Rails really is, a well thought our framework for developing web apps extracted from real world experience.  If you need to learn more about what it is, check this out:

http://en.wikipedia.org/wiki/Ruby_on_Rails

http://www.rubyonrails.org/

If you are starting a new project, or are new to web programming, I strongly recommend you start with Rails.  I’m very glad I did.  Rails constricts you to a set MVS (model, view, controller) framework but that constraint lets you focus on the real problem you are trying to solve.

The Top Reasons to Start On Rails:

-          It’s easy to learn! 

-          There are lots of resources to learn (books, blogs, online articles and tutorials)

-          It’s a good community. (Lots of plugins and gems make almost everything you want to do very easy)

-          You can develop real applications in a short amount of time.

The biggest complaints I’ve Heard Against rails

-          It’s slow (true, it’s slower than php, but the mantra is, hardware is cheaper than programmer time!. There are some major sites running on rails (like twitter.com).  No matter what technology you choose you are going to hit scalability and speed issues at some point, so the architecture is more important than the technology.

-          Okay – that’s about the only complaint I’ve heard.

For my application, I also considered .Net, PHP Cake, and perl.  They all had pros and cons. PHP Cake was the runner up, but it just didn’t’ seem as mature as Rails, nor did it have the same buzz.