Vitaly's WebLog
Software development, startups, marketing

Isolating UI from Middle Tier

October 20, 2008

 

One, if not the main, principle of the good architecture is its openness against 'possible' changes. It can be viewed on different abstraction levels - some classes can be open for some changes in business logic, entire layers may be designed to be open for global changes like switching to another DB engine. As OCP states, entities should be open for extension, but not for modification. This means that your architecture should support its extension in planned ways easily without changing much code (you should write new of course). That is why seasoned developer likes to use interfaces here and there :-) And that is what dependency injection is for...

It’s a good practice to build Data Access layer in a way it is not tied to specific database. So if you use SQL server and then decide to use Oracle, you need to write new Data Access classes specific to Oracle and do not need to rewrite entire system. 

I was surprised, but it turns out that you can isolate user interface logic for web project in the same way. 

There are many JavaScript libraries that allow you to build rich Ajax based UI that lives inside your browser. The only what is needed from middle tier is to return data in some simple format (JSON, XML). So you can plan your architecture for a possible change of middle tier (ASP.NET to JSP?) if you need to. A good example of rich UI JavaScript library is ExtJS. I recommend taking look at it if you did not do that yet.

 

 

 

 

 

 

 

 

 


A good example of the bad software: Adobe Updater

December 5, 2007

I just cannot stand from posting this example of incredibly lame default behavior. And It is exposed by the software of the distinguished brand.

Once, I noticed small white rectangle in the notification area. The icon looked like unfinished one. What was my astonishment when I found that that was Adobe Updater. And what was my indignation when I found that it already downloaded more than 100 Mb. Isn't is a bad tone to silently consume user's resources that may cost him money?

I get caught on this each time I reinstall Adobe Products or Install new version. It seems that they have added this in Creative Suite 2, but I may be wrong.

Here is the list of things I found to be wrong with Adobe Updater:

  • Incredibly lame UX that you presented with when you want to turn-off updates (see below)
  • Changes in updater preferences are not shared among users on the same machine. If updates made to the executables that are shared among the users, then why not to share these preferences between them? This point is controversial, though, I know.
  • When testing this, I logged in to my machine using remote desktop with second user account. And I found that when one user have any of updater windows opened, another one receives no reaction when he clicks on Help/Check for Updates
  • Updates are enabled by default and are downloaded silently, the only visible clue is unintelligible icon in notification area.

Adobe Updater Icon

To disable automatic updates you need to follow the next steps:

  1. Go to Help menu. Why I should go to Help menu to run off automatic updates, shouldn't it be somewhere in Preferences
  2. Click on Check for Updates. It will open the following screen. It is pretty straightforward that you should check for updates in order to turn them off, right?
        Adobe Checking For Updates    
  3. After it has checked for updates you are finally presented with the following window with a link to Adobe Updater Preferences form.
        Adobe Updates Summary
  4. Here are defaults set by Adobe
        Adobe Updater Preferences
  5. After you click OK (or hit esc) you are lopped back to.... to the step 2 with update check window. If I just disabled updates, why they check them for me?
  6. And to escape from this vicious circle you should click on Cancel while adobe is checking for updates.

 

Shame on you, Adobe!