Friday, June 27, 2014

Is AngularJS the new Fat client?

It was year 2000. People survived Y2k, the dot com bubble was just about to burst and we were writing our shiny applications. Many people were already doing HTML based thin clients (with a bit Javascript and mostly on Internet Explorer because Netscape was crap with anything beyond basic form validation).
But at that time there were still people doing something called "Fat client".

So what exactly was (is) a Fat client application.

In a nutshell, fat client is a concept where the client holds the logic of the application and talks to database directly. Database in this case is the point of truth. Fat clients have certain advantages.

  • Fat client utilises the users CPU and resources - thus spares the company from buying (at that time) expensive servers.
  • Fat client is pretty quick - unless you need something from the database (backend) and the database is busy.
  • Fat client's look and feel is consistent. It is a native application so users are usually familiar with the UI.


But there are certain drawbacks

  • Fat client needs to be installed and maintained locally. It's OK for several users, but thousands users can be a completely different story.
  • Fat client runs on one platform only - it is a native application in the end! It means that upgrade to newer version Windows is risky not even thinking about porting that application to Unix/MacOS.
  • Fat client can simply die or stop working and you don't know it until your users tell you (if they even bother to tell you).

And the list goes on.

Now, fast forward, year 2014. Here we are. We've got our servers but we try again to let our clients to do the heavy lifting. This time with a small twist. Instead of using native applications (we've been there, haven't we?) we use HTML/Javascript. So what exactly differs between the fat client v.1 (native application in year 2000) and fat client v. 2 (AngularJS application in year 2014)

  • We dropped native applications, we now use HTML and Javascript. So the UI may be completely unfamiliar to our users. HTML builds a very thick layer on top of the hardware so our fat client v. 2 applications may be pretty slow on older computers.
  • We ditch the installation process. Installing software is bad. Updating, maintaining it - no kudos there. Instead, we install the application over and over again as the user visits our site. But is the user really visiting our site that often? What the users just put his PC on stand by and have the page (application) running 24/7 for a days, months?
  • We're smarter now - we don't talk to database. We talk to APIs. And because we're smarter we all use JSON. JSON is fine, everyone can read it, it's nicely structured and all the network sniffers are happy - listen or port 80 (443) and all the structured data is there. 
  • As the application is written in Javascript everyone can read the source code and tweak it. All these wannabe developers rejoice.
  • We are more masochistic now. If something looks easy then everyone could do it, sure thing. So we make Angular difficult. Controllers, services, directives, dependancy injection. Who cares you only want to let user to input several parameters to get some output back, you still need to make it painful for the developers, they need to deserve their pay.
  • We learn from experience and we know users hate error messages. That's why we don't give them any. If we're in a good mood we dump something on the console and we pray for the user not to press F12 (or CMD+ALT+J). Ideally we let to user in the dark by presenting a screen where things look working but the code behind them is long time zombie.
  • Unfortunately the browser still has the reload and back button. We just hope the user will not press it or we try to come up with a smart way handling that. Users are confused but who cares about their feelings. 
  • Using browser has other nice advantages. No native printing, no access to the hardware, not working app if the user happen to lose his Internet connectivity. Some big companies allow you to continue using a crippled version of their application if you're offline but most people don't bother.
  • And we all know that data is the king. So we don't allow the user to access the data. Fat client v. 1 would allow you to save data in various formats but v. 2 saves data in the Cloud and makes sure anything that even slightly resembles the save button is removed.


So, is it all lost? I don't think so. Because there's already Fat client v. 3 here. Oh yes - the native smartphone/tablet applications! They install but keep themselves updated, they talk to APIs but in their own formats (although JSON is getting there as well). The applications still crash, allow you to save data and work offline. And now (*drumroll*) Google would like to allow these apps on their Chromebooks - eat that Angular!

And for those who want to see this side by side - here's the link!




No comments: