Tablet platform overview – iPad, Android and Windows 8

This post will be an opiniated discussion about the advantages and disadvantages of the different tablet platforms out there. This is not the kind of post I normally write but for once I feel the need to express my personal opinion about a subject, rather than solving a particular programming problem which is my normal kind of blog post. The reason for this is the continuing bashing of Windows 8 tablets (especially the RT variant) that occurs online and in printed media. As it happens I have personal experience of Android tablets, iPad and both Windows RT and Windows 8 tablets so I’m in a good position to compare these systems to each other.

Much of this post is obviously subjective opinions but hopefully one or two of you will learn something new about these platforms.

Android

Acer Iconia Tab A500
My first tablet was an Acer Iconia A500 that I bought a few years ago. I was really happy with this tablet from the beginning and I choose it over an iPad for several reasons:

  • I could configure it and tweak it so that it worked exactly the way I wanted
  • Widgets were very useful
  • There were plenty of apps, even though not as many as for the iPad. There are several kinds of Android apps that simply do not exist for iPad, such as custom keyboards (the one I like best is the amazing SwiftKey) or utilities such as the really cool Tasker app that triggers actions on events such as geographical location, currently running app, etc.
  • It had a full size USB port enabling it to read files directly from a USB memory or an external hard drive
  • It had a micro sd card slot making it easy to extend the builtin memory
  • It was cheaper than the iPad

My Android home screen

My Android home screen, configured they way I want it with folders and a calendar widget.


All these are valid reasons and the tablet did indeed live up to my expectations in these areas. It’s pretty cool to be able to connect a PlayStation 3 hand controller and play games on it, for example.

There are downsides to this platform of course, as there always are. The main reason that I don’t use this tablet very much these days is mainly one thing – it has a really laggy user interface. The GUI wasn’t very smooth even when it was new, there was always some “stuttering” in animated transitions. It was disturbing but I could live with it. The problem is that it got worse over time. I’m not sure about the reason for this but I have experienced the exact same thing on all my Android deviced I have owned (the HTC Desire and even the Samsung Galaxy S3 have the same problem). The reason might be that the accumulated amount of installed apps requires more and more resource but it’s not very evident what’s happening when the GUI locks up for a second or two sometimes and there is no apparent activity. CPU monitors don’t indicate extensive CPU usage either so I’m not sure about what the problem is.

Also, the standard web browser is not so good either. It displays most pages correctly but is rather slow. Chrome is the new standard browser and that’s even worse in that respect, it takes ages to download enough of a page to start display it and when you scroll down a page it’s incredibly laggy when downloading new content coming into view. Other browsers such as Dolphin does a much better job, making web browsing bearable.

For these reasons I was tempted at buying an iPad and when I found an iPad Mini on sale I took the plunge.

iPad

iPad Mini

What immediately strikes you when you buy an “iDevice” is that it feels really classy, from the box design and packing to the actual design of the device. Apple products have a reputation for “just working” without hassle and I think that the philosophy of good looking devices that you simply turn on and start using is a really neat one.

You can’t configure an iPad in particularly many ways, but that was fine by me. This time I bought a tablet, I was tired of having to troubleshoot performance problems and stuff like that. I bought the iPad to use it on the commuter train and I wanted it to be easy to handle, quick to start up and have stable apps. I have mostly used it for watching video courses using the PluralSight app, watch movies or play the odd game. The iPad do these things really well. And there is never any unexplainable delays in the user interface! The reason for this is likely the iPad’s simpler architecture and APIs, it doesn’t for example allow background processes as freely as Android, but for me the user experience easily outweighs the limitations.

This is where you see the magazines you subscribe to.

This is where you see the magazines you subscribe to.

There are many magazine available...

There are many magazines available…


The other thing that Apple has really been successful at is integrating a lot of apps and content in the App Store. I was aware of the large amount of very polished and stable apps that was available (and I wasn’t disappointed) but I did not know of the excellent integration of magazines and podcasts. Essentially all you need to do to have easy access to this content is to select the ones you’re interested in, pay, and you’re done. No other platform makes it this easy, you often have to install a special app, Google for feed Urls, etc, but for iOS devices all this is already prepared for you.

The worst problem with the iPad in my opinion is it’s reliance on iTunes for importing media to the device. This is really incredibly limiting as it supports very few video formats and if you try to import non-supported files you don’t even get an error message, it’s just silent. Took me a while to understand what the problem was. The builtin video player is good for supported files and it supports sub titles in m4v files, for example. But if you need to play files on your home network you need a more powerful media player

The best media player I have found is nPlayer. It supports many formats and features for network files (in file shares and DLNA servers for example). Recently I also learned that that it actually supports copying non-iTunes-compatible video files directly to the iPad by using the App tab of iTunes when my iPad is connected to the computer. That removes the need to convert all files to specific formats as nPlayer supports most file types. The files are only available to nPlayer, not any other app, though. It’s a little clumsy, but it works.

Windows 8

Surface Pro

Surface Pro

Surface RT

Surface RT

In spite of the video annoyances I was rather happy with the iPad, but when I attended a Microsoft conference (TechEd Europe to be precise) there was an offer to purchase the Microsoft Surface RT tablet and the Surface Pro tablet rather cheaply. Being a technology buff, I couldn’t resist the temptation so I got both of them, mostly out of curiosity. I have been using Windows 8 at my home computer for some time and haven’t really seen much point in this Windows version for a desktop computer but I though it would be nice to try it on devices that have been developed from the start to work well with touch and the “Modern” UI interface.

The Surface Pro is a real PC with an Intel Core I5 CPU and Windows 8 Pro. You can install all Modern UI apps and any old Windows program on it and it just works. I have even tried to install Oblivion, a 3D role-playing game a few years old, and it played really well. The unit is a little heavier and thicker than a normal tablet but that can be forgiven when you consider that it’s actually a full PC.

The device comes with a pressure sensitive pen that feels very natural and is more useful than I expected it to be, both for taking notes and drawing in OneNote and for operating the desktop UI, which sports rather tiny UI items because of the full HD screen.

The Surface RT is in many ways the opposite of the Surface Pro. It has a really neat design, and it’s thin and light. It uses much weaker ARM-based hardware than the Surface Pro and it’s a wide-screen device which makes it much better suited for watching movies than the iPad. The battery life is much better than the Surface Pro.

The main objections people seem to have about the Surface RT are

  1. There are too few good apps in the Windows Store
  2. You can’t run desktop apps on it

The first point is absolutely valid, the really good and useful apps in the Windows Store are really few and the ones that are there don’t seem to get much attention from their developers. Wordfeud, for eample, is several versions behind its iOS and Android siblings.

The second point is not so much of a problem since running desktop apps do indeed require more powerful hardware and worse battery life. If you really need that, go with the Surface Pro, otherwise get an Surface RT. The criticism is also unfair when comparing the Surface RT to Android tablets and iPads – they can’t run Windows desktop applications either! And besides, Microsoft Office is included with the Surface RT and it works really well. I haven’t had any problems with opening documents or spreadsheets.

Actually, apart from the meagre app supply I can’t really see many problems with the Surface RT. What surprised me was that the deskop mode is actually available and it looks almost identical to a “real” desktop computer. There is the normal File Explorer and it supports network shares just as well as a normal laptop/desktop. This is a really powerful feature no other tablet OS can match. It just works! Also, if you have a Modurn UI app, they also will support file shares etc automatically as that support is built into the OS. On other platforms, each app has to rely on a third party library to cope with this and it seldom works robustly.

Movie file format is limited in the standard player, so I use PressPlay Video instead, which is great. Moving files from other computers, memory sticks or the Internet is done in the same way as for a “normal” computer using the File Explorer or saving directly from the web browser.

Being a Windows computer, my Surface RT tablet automatically discovered my Canon network printer and installed the correct printer driver. I can now print web pages from Internet Explorer or documents from Office and it didn’t take any configuration at all. “It just works.” 🙂 No other platform can do this as far as I know.

Windows 8.1: Clicking a link in a mail now displays the web browser side by side with the mail app

Windows 8.1: Clicking a link in a mail now displays the web browser side by side with the mail app

So I’m actually rather happy with my Surface tablets, and when I installed the Windows 8.1 Preview on my Surface RT, it’s even better. There are numerous small improvements, such as much better side-by-side running of apps (see image on the right). Again, no other tablet can do this (Samsung has something similar for their tablets but it’s a more manual process).

I have used both my Surface tablets more than I expected. On the Surface Pro, Netflix in the Chrome browser with MediaHint browser add-on has been awesome for watching US NetFlix content. I have also started to appreciate Microsoft Office OneNote (I think the pen made it feel very natural to use that application). The Surface RT has also been used a lot, mainly for web browsing and watching movies (from my NAS or the standard NetFlix Windows 8 app). Windows 8.1 makes the Windows 8 experience much more streamlined and I think it’s a shame that Windows 8 wasn’t like that from the first version.

Summary

Of the three kinds of tablets I own, the Android is used the least because of UI lagging. Google promises that Android 4.3 adresses this problem, but I’ll believe that when I see it. It’s also not likely to be an update that Acer will support on an older tablet like mine.

The iPad is actively used in exactly the ways I expected, mainly when commuting and also by my kids as it has a bunch of great games that they like.

My Windows 8 tablets are also actively used and I like them both more than I thought I would. They have more features that are usable to me than both the Android tablet and my iPad.

The main problem with Windows 8 is, as everybody already knows, the lack of useful and robust apps. There are apps like that, but they’re too few. I don’t think that’s going to change either, iOS and Android have gained so much momentum that it’s too late for Microsoft to catch up with them. Microsoft have one unique absolute killer feature however, in that Surface Pro and it’s brethren can run Windows desktops applications. When that kind of tablet becomes smaller and with better battery life I think that much will happen in the tablet market. My Chrome + NetFlix + MediaHint use case is an example of the power that this platform brings to the tablet format.

To sum it up, I think the Windows RT and Windows 8 Pro tablets have taken too much and exaggerated criticism so far. They’re not perfect but then the competetion is not fault-free either. The problem is not that Microsoft and it’s allies deliver bad products, it’s that they’re too late so that the other app markets have had time to grow too large.

Just my two cents…

/Emil

Using NDepend 4 to analyze code usage

This week I was assigned the task to analyze the usage of an ASMX web service we are planning to remove since it has a number of problems (which is another story) and switch to new and better written WCF services. As the service is rather large and has been around for years the first step was to analyze if it had methods that no client actually used anymore.

For this task I decided to use the brilliant code query functionality built into NDepend 4. I have briefly reviewed earlier versions of this tool on this blog but this time I thought an actual example of how to use it in a specific situation would be illuminating.

The first step was retrieve a list of the methods in the web service. To do that, I added an NDepend project to the web service solution. Se below for an example of the dialog used for this:

Attaching an NDepend project to a Visual Studio solution

After this NDepend performed an analysis of my solution, after which I was able to start querying my code using the CQLinq querying language. NDepend has for a long time had its SQL-like CQL (Code Querying Language) but for some reason I never got around to using it. NDepend 4 introduces CQLinq which is much nicer syntactically and has a good editor for writing code queries, including IntelliSense. For more info about CQLinq, see this introduction.

What I needed was a list of methods on my Web Service class. To retrieve this, I opened the “Queries and Rules Edit” window (Alt-Q) and typed:

from m in Methods
where m.ParentType.FullName == 
   "ActiveSolution.Lernia.Butler.EducationSI.Education" && m.IsPublic
select m

The CQLinq query window.

The results is displayed in the bottom pane. I exported the list to an Excel file for further processing.

The next step was to see which of the web service methods the different clients used, so I analyzed each client with NDepend. Note that I excluded their test projects from the NDepend analysis to make sure that no lingering old integration tests affected the results.

For each client I listed those methods of their respective web service proxy classes that they were actually calling. A query for that can look like this:

from m in Methods  
where m.ParentType.FullName == "ActiveSolution.Lernia.SFI.WinClientFacade.Butler_EducationSI.Education"  
&& m.IsPublic  
&& !m.Name.StartsWith("Begin") 
&& !m.Name.StartsWith("End") 
&& !m.Name.Contains("Completed") 
&& !m.Name.Contains("Async") 
&& m.NbMethodsCallingMe > 0 
select m

The ParentType is of course the proxy class that gets generated when adding web service references. For this type, I list all public methods (except the asynchronous helper methods that we don’t use anyway) that are used by at least one other method. The results were copied into the already mentioned Excel document and when all clients’ data was retrieved I was able to do some Excel magic to get this result:

The resulting Excel report listing the reference count for each method in the web service class.

The columns B through G contains ‘1’ of the respective client is calling it. Rows with a sum of zero in column H are not used by any client and can be safely removed. Mission accomplished.

This has absolutely just scratched scratched the surface of what can be done using CQLinq, and there is much more functionality in NDepend than just queries (the diagram tools, for example). It’s a great product for anyone that is seriously interested in code quality. And we all should be, right?

/Emil

Book review: MCPD 70-519 Exam Ref: Designing and Developing Web Applications Using Microsoft® .NET Framework 4

I recently completed my MCPD certification for web development and before taking the 70-519 exam I read MCPD 70-519 Exam Ref: Designing and Developing Web Applications Using Microsoft® .NET Framework 4 by Tony Northrup. This blog post is a short review of the book.

Short version
If taking the 70-519 exam, this book is well worth a look as it discusses many development aspects related to the exam. However, it should not be used as general architecture guidance on the Microsoft .Net platform as it’s too narrowly scoped.

Longer version
The book has six chapters:

  1. Designing the Application Architecture
  2. Designing the User Experience
  3. Designing Data Strategies and Structures
  4. Designing Security Architecture and Implementation
  5. Preparing for and Investigating Application Issues
  6. Designing a Deployment Strategy

These chapters cover many design and development aspects you’ll likely come across in a real project but it should be noted that the content is pretty brief and doesn’t go into very much detail. This is in line with the scope of the 70-519 exam which assumes you have the technical know-how to develop solutions and is more geared towards architectural decisions.

Another aspect of the content of the chapters are that they are coloured by the author’s personal opinions, as so often is the case when discussing software architecture. This is probably unavoidable, but I especially noted this in the chapters discussing data access strategies and monitoring/logging. The author discusses the options available in the .Net Framework but doesn’t mention other alternatives such as common open source frameworks (e.g. NHibernate, log4net, etc). This can lead to confusion as some statements, if read literally, are inaccurate. For example, after reading page 90 you might come to the conclusion that WCF Data Services requires using the Entity Framework, which is wrong. (What is required is a class that exposes IQueryable<T> objects.)

This aspect of the book should be kept in mind when reading the book, and then it becomes useful for preparing for the exam. It also serves as a good overview of the technologies available in the .Net Framework as developers. The book is easy to read and not too long, just a little more than 250 pages.

On a personal note, the exam was actually pretty easy so if you’re an experienced developer I shouldn’t do too much studying before taking it. This book serves as an overview if you feel the need to refresh your knowledge but reading it is probably not required to pass the exam.

Final note
I read this book electronically as a PDF on my Android tablet, and if you do the same then I suggest taking some time to research the best PDF-reader app to use as the reading experience is greatly affected by this choice. My choice was ezPDF Reader Lite which allows tweaking the zoom factor and other settings. This is very useful as the aspect ratio of the tablet screen and the printed book are probably not identical.

I also tried using the ePub version but found that in that version too much formatting was lost in tables and other more advanced design elements.

NDepend 3

In case you missed it, there’s a very powerful tool called NDepend that helps you analyze your code structure and detect potential problems very easily. A new version, NDepend 3, was released earlier this year and the biggest new feature is probably Visual Studio integration:

It still has all the code metrics you’ll probably ever need, a custom made code query language, diagrams (some of which are still a little difficult to read) and graphs to help with analysis. See my post about the previous version for some examples.

Here are a few live examples of using NDepend: http://www.ndepend.com/Features.aspx#Tour

If you’re into code analysis you should give NDepend a try. With this new version it’s more usable than before and it still has the same very powerful analysis engine under the hood. Check out http://www.ndepend.com for more info.

/Emil

NDepend – first impressions

nDI was recently contacted by Patrick Smacchia, one of the developers behind NDepend and he asked me if I’d like to try it out, which I did. This is a report of my first impressions.

If you’re not familiar with NDepend, it can be described as a tool to analyze a set of .Net assemblies for code quality. I suppose its name indicates that it originally was focused on analyzing dependencies but these days that name is rather misleading, in my opinion, as it can do much more that that. I’ll go through some of its capabilities below.

When you first analyze a set of assemblies, NDepend displays a screen similar to this:

NDepend main screen

If you’re like me, then you didn’t check out any tutorials or web casts before running the tool and your first reaction is likely “Holy cow! What’s all this?” or something similar. 🙂

It turns out that there is a ton of useful information in these displays but you have to know how to interpret them which takes a little learning.

Briefly, here’s what I gathered so far:

  • The Metrics display (with the gray blobs) lets you select a metric (such as the number of lines of code) and display it on the selected code level (method, field, type, namespace or assembly). The the blobs represent code entities of the given level and their sizes correspond to the metric’s value. All children blobs of the parent level are grouped together to indicate which parents have high accumulated values of the metric. This display was really bewildering to me at first but once you decode its structure then it’s really powerful.
  • The Dependency graph is more intuitive and let’s you see call dependencies between code components of different levels. Works well on small numbers of components but once you start to display larger dependency chanins, e.g. between methods, then it quickly becomes very difficult to use.
  • The Dependency matrix is also fairly unintuitive at first, but very powerful.
    NDepend depenency matrix
    It contains the so called Dependency Structure Matrix with displays dependencies between code elements. Each non-empty cell in the matrix represents a dependency but the number can have different meaning depending on user selections in the GUI. Green and blue cells indicate one-way dependencies (hover mouse over a cell to display a small arrow indicating the direction) while black cells represent bidirectional dependencies, which might be a cause for concern. This display can really show many interesting aspects of usage dependencies and it can also be used to generate dependency graphs for subsets of these dependencies (try the popup menu to see what I mean).
  • Finally, there the CQL query display where you can use the NDepend Code Query Language to further analyze your code. By default a set of standard queries are executed, listing potentional problems with naming, performance, and many others.

In addition to the displays described above, an HTML report is also generated after analyzing assemblies. It displays much of the same information as the graphical and interactive displays above, but also contains the “Abstract vs instability diagram”:

NDepend AbstractnessVSInstability diagram

Obviously you want to be in the green area with all your assemblies, but the dimensions used might not be completely clear at first sight. This seems to be a good article describing it it detail.

So, what are my first impressions? Well, I must say that NDepend really is a very powerful tool for analyzing code but it does require investing some time to use its many features properly. To me, that seems like an investment well worth doing.

/Emil