{"id":960,"date":"2009-07-05T21:21:10","date_gmt":"2009-07-06T02:21:10","guid":{"rendered":"http:\/\/unitstep.net\/?p=960"},"modified":"2009-07-05T21:21:10","modified_gmt":"2009-07-06T02:21:10","slug":"separating-ui-from-implementation","status":"publish","type":"post","link":"https:\/\/unitstep.net\/blog\/2009\/07\/05\/separating-ui-from-implementation\/","title":{"rendered":"Separating UI from implementation"},"content":{"rendered":"
I saw this comic about usability<\/a> (linked from this question at Stack Overflow<\/a>) and couldn’t help but let out a distressed laugh. How often have you seen this happen at your workplace, or in an application you’ve had the “pleasure” of using? For every elegantly designed UI that exists, there seems to be a plethora of poorly designed ones that do their best to confuse users.<\/p>\n To me, a lot of this UI complexity stems directly from a lack of separation between the UI and business logic layers.<\/p>\n <\/p>\n As developers, we’re accustomed to the best practices of modularity and separating the implementation from the interface. This has lead to such patterns as MVC and Interface Oriented Design. However, when it comes to designing<\/strong> the UI layer, these rules sometimes aren’t followed. This is why we end up with overly complex “Search” pages, offering every option under the Sun, and configuration dialogs\/screens with a one-to-one relationship<\/a> to settings files or some other underlying implementation detail under the guise of “letting the user decide what they want”.<\/p>\n Without clear UI planning, this one-to-one relationship tends to rear its ugly head more often. Take our first example of a “Search” page. In most applications, the search functionality is interacting with some sort of a database backend, most likely a SQL RDBMS. The lazy approach is to design the search form based on the format of the SQL query itself. This is how we get search forms with multiple fields, drop-down boxes and so forth – because this format translates almost directly into a SQL query; <\/strong> i.e. of the form Just because this is easier for the developer, doesn’t mean it’s the best solution for the end user. In fact, it’s often the case that this is the exact opposite. <\/p>\n In general, users don’t care about the implementation of your application or how it stores data. They shouldn’t have to know about the columns of the table where the data is stored, so why make a search form that exposes this? Instead, you need to understand what your users want and how they’re most likely to use your application. This isn’t an easy task, as many have pointed out<\/a>.<\/p>\n This is where I think most UI problems come from – a misunderstanding of what users want. This isn’t to say that these developers are dumb or careless; but just that when it comes to empathizing with their users, they often are unable to because they know their own software and have such an intimate view of it from a coder’s perspective. <\/p>\n Take the example of QTTabBar<\/a>, a Windows Explorer extension written in .NET that adds many useful features such as tabs, etc. to the interface. It is an excellent extension and does things very well, but the options page is a complete nightmare.<\/p>\nProper separation<\/h2>\n
WHERE col1 LIKE... AND col2 LIKE...<\/code><\/p>\n
Thinking like a user<\/h2>\n