The Arrival - Some Thoughts on Windows Phone 7(.5)

by Rashid Z. Muhammad 28. November 2011 06:00

A Turn of Events

In April of this year, my HTC Touch Pro 2 cell phone developed free will and decided it would only perform tasks it wanted when it wanted and the wishes of its owner - me - would only be worth consideration after prolonged pleading and eventual physical aggressiveness. Its just as well since the Windows Mobile 6.5 operating system it was running was getting long in the tooth a while before the hardware itself revolted. I had been thinking of getting a new phone for months and the opportunity finally presented itself.

I must confess that my wavering fidelity to the Touch Pro 2 predated even Windows Mobile wearing out its welcome. The sexy device catching my eye was the HTC Evo, a large screen brandishing android-powered seductress not only attracting me with her formidable hardware and software assets but also the distinction of being the first high-speed 4G phone on the market. As a 10-plus year Sprint customer, I was a little shocked at the fact that my carrier which, less than 24 months previous, was lagging the smartphone market badly had picked itself up and was now offering some of the most compelling handsets around - sans the iPhone of course but I had no interest in that device to begin with.

Once it was clear that my phone situation was critical, I went to the Sprint store with visions of Android dancing in my head. As I was looking for an extended battery pack in the accessories section I happened to spy a carrying case for a phone called the HTC Arrive. What caught my eye about the Arrive was that, according to the picture on the package, it was running Windows Phone 7-, the recently-released ground-up rewrite of Windows Mobile. I had read a few WP7 reviews at launch, but had never seen it in person. Also, I didn't recall seeing any WP7 phones in the Sprint lineup before which made it a non-starter as I was not interested in switching carriers.

Curious, I asked a salesperson if they had an Arrive in stock and she walked me to the darkest, most remote section of the store where the handset was displayed. After blowing off a thick cloud of dust (I jest), I started playing with the phone and was immediately spellbound.

I read about the phone's Metro user interface in reviews but, despite the positive assessments ascribed it, the pictures didn't look very compelling. Monochrome squares and rectangles on a screen - big freakin' deal. However, once I actually saw - no, felt - the thing in action I was utterly amazed. The user interface on my Windows Mobile 6.5 device had devolved into a handheld slideshow so I figured just about anything would be an improvement, but what I was seeing in WP7 was by far the most responsive user interface I had ever seen. Seriously, liquid is the only adjective that I feel does it any justice.

As I continued to poke around the phone, it became clearer and clearer that I was not going to walk away with the EVO. The Arrive had everything I cared about plus it came in a more manageable size with a hardware keyboard. After about 10 minutes of toying with it, I decided to purchase the phone.

The first month or so with the Touch Pro 2 was great but over time the phone performed worse and worse - like a handheld Windows 95. For that reason, I decided to wait a while before I wrote my impressions on Windows Phone 7. Now, after 6+ months of ownership - and the last 2 months running the 7.5 "Mango" update - I think I have a good feel for the ups and downs of the OS and feel comfortable sharing my thoughts. Please note that this isn't intended to be anything other than my views on WP7 and WP7 alone so my perspective is that of a new user, not somebody trying to exhaustively compare the WP7 OS with any other platform.

The Good

For me, WP7's greatest asset is the User Interface. The fact that it is fast and responsive gets a lot of press -rightfully - but just as compelling is the fact that it represents a fresh take on how the user interacts with the device. Before WP7 most phones were glorified app launchers that presented users with a grid of equally sized icons representing all of the device's installed applications. WP7 has an application list that essentially does this, but the default view is the "Start Screen" implemented as a customizable list of tiles that can represent applications but also other objects such as contacts (single and groups), documents, or even specific pages in applications.

For example, my start screen has all of the important stuff - phone, email accounts, messaging application, calendar and weather - but it also has a shortcut to a playlist in the phone media player application, the scratch notepad in my online OneNote notebook, a link to my cloud-based document repository, a group of contacts for my close friends, and a link to the Foursquare app page for one of my favorite (and most hotly contested for mayor) restaurants.

Taking it a step further, the tiles are not just static icons. For example, the icon for my close friends displays recent social network updates from anyone in the group and highlights if anyone from the group has made an attempt to contact me. There is also a "Me" tile that lets me know if anyone has mentioned me on twitter or responded to a Facebook post, or tagged me in a picture or... whatever. Obviously only so much info can be placed in a 1-inch or so square tile so tapping the tile gets you into the full detail of the notification(s).

The examples I just mentioned are really byproducts of one of the other unique features of the phone: tight social networking integration. WP7 allows you to connect several social networks - MSN, Linked In, Twitter, and Facebook - and aggregate your contacts across them all. So if I have friends that I have connections to through my personal address book, Twitter, Facebook, and Linked In, I can connect them in under one contact entry which will show me all of the messages I've received from the contacts as well as their recent Twitter / Facebook status updates and pictures. It's a really convenient way to keeping track of not only what a person is up to, but also the communication history between myself and that person.

For me the most remarkable thing about the OS is how it tries to de-emphasize the app orientation that has become par for the smartphone course. I'm sure part of the reason is the fact that, while the growth of the app store is brisk, the WP7 platform is vastly outgunned by app marketplaces of its competitors who bring hundreds of thousands of apps to the table. (Having said that, I can't help but be amused hearing Apple enthusiasts try to belittle the high quality WP7 OS because of its lack of apps when those same people used to - and still - try to marginalize the importance of the sheer number of apps when it comes to Mac OSX.) Whatever the reason, I think the idea of making the OS more of a focal point than the apps has paid off, on social networking at least, as I very rarely use the Facebook or Twitter apps. I simply go to the "Me" tile, select "post an update" and choose which networks I want to receive the message. If I want to see updates from others,  I either go to a single contact, a contact group, or my full contact list and swipe to the "What's New" tab. Pretty slick stuff.

There are literally hundreds of cool features on the phone but you can read about those elsewhere. A few more things I like are: the ability to "try" any paid app in the app store, the Bing "Local Scout" which detects the neighborhood you're in and displays all sorts of destinations for activity in the vicinity, the way the media player can show pictures of the artist you're listening to on the phone lock screen, the fact that the phone integrates SMS, Facebook chat, and MSN chat into its messaging application, and the way that the contact list and contract group live tiles will cycle through pictures of people contained within.

The Bad

I'm sure you can tell I like Windows Phone 7 a lot, but it's not without problems. My biggest problem is the fact that the social media integration is confined to the providers Microsoft has built connectors for. Twitter and Linked In didn't become available til the 7.5 update and there are plenty of other useful networks that could be integrated e.g. Hi5, MySpace (I know, but they still have millions of users), or Google+ (ha!). This wouldn't be as annoying if I didn't know as a developer that Microsoft is very good a designing provider models for plug in functionality. There is no good reason for disallowing alternate functionality in the search and map apps either. Yes I know Google is nonplussed about the idea, but since most of their APIs are open that hole can be filled by third parties. Hopefully this problem can be rectified in the future.

A related issue is that the phone synchronization only works through the Zune desktop media player application. In some ways I don't mind this because the Zune software is one slick bit of kit (every bit as slick as WP7 in fact), but the problem is that the Zune player is a media application and media constitutes the least important data on my phone. For me, the phone is a life management tool with its ability to aggregate disparate contact lists and calendars into one cohesive whole and I would like a way to leverage that in an environment other than my phone - namely the computer I sync it with. As it stands, the phone is the only place where I can see all of this information in one location. I don't think there is any reason why the phone data can't be synced with a desktop client. Since Windows has built-in calendar and address book programs that can be default repositories it's ridiculous to me that I have to consult my phone every time I want to add something to a calendar in fear of having a cross-calendar conflict. Even a manual dump would be nice.

Next, the WP7 User Interface, as awesome as it is, can be a liability as well. Most basically, many of the apps use a "panorama" interface where the UI is spread along a single "page" with the phone only displaying one part of the page at a time. Here is an example:

It creates a pretty dramatic effect when using an application, but it's also a fairly novel concept which I imagine raises the cost of development due to the variation in user experience from the other mobile operating systems. It's not a deal breaker, but it can certainly slow adoption and, at this point in the game for Microsoft, uptake is priority one. I admit this is a pretty picky issue.

I talked earlier about how responsive and smooth the phone operates, well sometimes it is a little too responsive. There have been plenty of times where I have barely grazed a button and the phone zipped back to a previous page or launched an application. This could be due to hardware and/or software sensitivity issues but it also appears to be an artifact of software design as one app in particular (the Google Voice client) does it way more often than others.

Conclusion

I don't regret ditching the EVO for the Arrive. I know I've spent this whole write up talking about software and I think that's a good thing. The hardware itself gets out of my way and let's me get things done. What higher compliment I can give?

I have turned into a big fan of WP7. When it was first released there were a number of complaints about the OS being very slick but half-baked. My phone shipped with the first point release - NoDo it was called - and whatever came with that update was apparently enough to satisfy me. With the 7.5 Mango release the phone improved dramatically and even has a few market-leading features.

I think what has surprised me most about my experience with the phone is how my personal preference for dealing with technology has changed. The Windows Phone 7 experience is very cloud oriented with most information being pulled from remote sources so the phone itself has little outside of media files and a few documents saved locally. What local information is saved is either retrieved by syncing with a computer or the cloud, but the file system is not directly inaccessible. Not long ago I would have scoffed at the idea of not directly accessing the data on my phone, but now all I care about is being able to get at it when I need it. I'm wondering if I've changed or if the file access use cases have finally gotten to the point where direct access to the data store has been made less relevant to the experience of interacting with the data itself.

Probably both.

Whatever the case might be, at six blissful crash-free months (yes, zero crashes) in, I'm a believer.

Tags:

Reviews | Technology

Anatomy of an Architecture Part 1 - The Evolution of a Design

by Rashid Z. Muhammad 23. November 2011 06:00

A Better Way

There comes a time in the career of every programmer when they take an earnest look at their way of going about their job and mutters to her or himself for the first time: "There must be a better way." For me, that first period of introspection came in 2001 - roughly three years into my career writing business applications. At the time, I had a litany of desktop and web applications all with their own databases and conventions. Many of these applications were one-off programs written to scratch minor itches, but once you start providing value through software development, expectations rise and the spigot opens.

As the number of applications rose, so did the number of potential users. Since I was developing for a music school, I was inevitably going to run up against a Mac user or two and anything developed in Access, Visual Basic or Borland C++ was going to alienate them. This was the point where I totally committed to the web as my primary development platform going forward and decided to convert whichever existing desktop applications I could to the web medium. I'd like to thank the web standards project and mozilla.org for creating the climate to make such a commitment possible.

As my plan was playing out, another problem became evident, my newer web apps were much better written than my older efforts. This wasn't really a surprise as experience naturally makes us better at pretty much any task, but it was especially painful during maintenance when I would have to make changes to older applications with less elegance in design.

One App to Rule Them All

As a solution to this problem I decided to build a base library with commonly used implementations, but as I pursued that effort I had a much more interesting idea. Instead of building a base library module and implementing it in separate applications, why not build a base application and implement specialized functionality in a modular fashion? The idea was a "mother" app that implemented all of the plumbing and child modules that used this plumbing in a unified manner.

The primary benefit at the time was being able to share authentication and authorization allowing single sign on functionality to the growing suite of applications I had in development. In addition, I found that there was opportunity to integrate the applications themselves with one another. For example, one of the applications was a concert attendance program where students swiped their ID cards into a desktop application which saved the current date, time, and concert to a database server connected to a website where students could log in and see their stats. For various reasons, the stats could be wrong, so I developed a "dispute" process where students could challenge the count. When the student created a dispute, I saved them into the work tracking application I used for support requests and assigned the incident to the relevant school administrator for processing. Also, the calendars from a calendar application I wrote to power the main school website fed in as the authoritative list of events for the concert attendance application.

I called this platform xNET. The idea was that an arbitrary (x) number of applications could share functionality through an application NETwork facilitated by shared data. The first iteration of xNET was completed in 2002 and written in ASP 3.0. ASP.NET was around at the time, but I was still learning it and there was such a paradigm shift between the two platforms that I figured it was better to write it in the familiar ASP and port it later than to stumble through it on the new technology.

I did end up porting xNET to .NET a year or so later and with that port came my first object-oriented design. My early .NET days were a little rough as I was still very stuck on Dreamweaver as my web development IDE. Dreamweaver was great for ASP but terrible with ASP.NET and I probably moved at a quarter of the speed I would have had I used Visual Studio. That's right, in my early .NET days I debugged code manually and also manually compiled all of my assemblies. I had a great ASP.NET book but it wasn't focused on Visual Studio at all. I kind of shake my head when I think about that primitive setup and hours upon hours of lost productivity from not having an interactive debugger, but being exposed directly to .NET without the massive obfuscation of Visual Studio gave me a good understanding of how the platform worked. Having said that, I still wouldn't recommend that route to anyone trying to learn.

I did eventually move to Visual Studio 2003 and it was then that I really appreciated a design based on objects instead of database recordset. Even though my design wasn't really n-Tiered yet (all data access was in my object methods, not a data access layer) the ability to encapsulate related functionality in one object instead of a base library of functions resonated. I took my first object-oriented programming class (C++) in 1995, but it wasn't until I had years of  programming under my belt and was forced to adjust by .NET that I fully understood all the hubbub.

The Great Leap Forward

xNET cruised along for a few years as I got more acquainted with the .NET Framework, in 2005 I changed jobs and left the music school to work in the University research administration office as a web developer. They had a number of needs for custom software development so I naturally brought xNET along with me. While working on my first major project, I began to feel like this might be time for the platform to grow up.

At this point, xNET was object-oriented in the barest sense - it exposed data and logic using objects. This created a clean way to access data and perform operations, but I was starting to feel the pain of the massive amount of code required to create objects of even medium complexity. Creating member variables and all of the logic to populate those fields by itself was cumbersome and prone to induce a ton of copy/paste errors. I had people working for me that could work through those things but I still ended up with lots of problematic code. It was here that I once again said to myself: "There must be a better way."

This time, a "better way" meant a better way to develop software in general. I had years of experience under my belt at this point and felt like I had come a long way since I wrote my first production desktop application in 1998 but it was clear I had room for improvement. I wanted to create a way to make myself and my team more productive. My criteria for more productive was for us to have the ability to create basic object code quickly and correctly and to make the particulars of the database schema irrelevant when doing day to day coding. The latter requirement came from my frustration writing tons of convoluted SQL joins in object constructors and property collections that were the result of many-to-many associations along with a SQL injection attack that exposed vulnerabilities in my process.

It was at this point that I read a couple of books that would allow me to take the next step in systems design. The first was Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (commonly known as the "Gang of Four") and the second was Patterns of Enterprise Application Architecture by Martin Fowler. I took a look at the Gang of Four book around the time I first got into object-oriented programming but I hadn't seen enough to understand it. This time with years of cases under my belt and a deep interest in honing my craft, the book made perfect sense and allowed me to instantly make my applications better. Most of the concepts I had brushed upon one way or another, but the simple elegance of the GoF solutions was like water in the desert. After completing the GoF book, I became obsessed with patterns. Most of the other books I read were pretty much rehashes of the GoF book (I highly recommend O'reilly's Head First Design Patterns book as a more user-friendly alternative to the GoF text) until I came across Martin Fowler's awesome tome on Enterprise Architecture.

The biggest takeaway from PoEAA for me was a solid understanding of how the domain and data access layers should interact. Much of what I had seen up to that point was a DAL that essentially marshaled some sort of database recordset object to the domain object, it was Fowler's DataMapper pattern that made me understand that the DAL should do more than shuttle recordsets around, it should normalize the way the domain object interacts with data irrespective of the source. The irony here is that, in the book, Fowler doesn't actually say this as his discussion is exclusively in the context of a database source, but the revelation isn't always planned by the revealer.

Almost as important for me was the dichotomy of the Domain Layer and Service Layer. Neither of these concepts was new, in fact the Service Layer is simply a GoF facade pattern, but these ideas in the context of fine / course graining and tight / loose coupling take encapsulation to another level and are critical components for thinking about interoperability.

With the knowledge gained from these books and my own experiences, I started designing xNET2 on the .NET2 platform, a radical redesign of the platform with numerous upgrades including the following:

  • Standardized schema design in order to enable automated entity generation
  • Auto-generation of test classes for each entity
  • Decreased code required for new entities by factoring out every method possible into abstract base objects
  • Elimination of the use of SQL so developers can focus on objects and not data
  • The ability to create many-to-many object relationships without making schema changes
  • Implementation of strongly-typed collection classes for object-oriented search
  • XSS and SQL Injection threat mitigation through a DAL-level implementation of SQL statement parameterization and HTML filtering

The roll out of xNET2 paid off immediately. Thanks to code simplification, dramatic refactoring into tiers, and a new code generation process the quality and time to deployment of code improved dramatically. Seriously, the number of issues encountered after code was deployed to production fell by over 90% because of the testing and automation of class generation. It was at this point I felt fully actualized as a software developer.

Further Refinements

The core architecture hasn't changed much. In the xNET3 release, the only notable architecture change was my reducing the amount of tweaking after code generation by moving my module-oriented factories into late-bound instantiation operations using activator.createinstance(). xNET3 was really about getting xNET on the .NET 3.0 platform so I could take advantage of the Workflow Foundation and get my SOA on with the Windows Communication Foundation. I also updated my formerly ConllectionBase-derived strongly-typed collections to use the generic System.Collections.ObjectModel.Collection in order to add LINQ compatibility.

Currently I'm working on a .NET4.0-based xNET4 which is really a clean up of some of the things I implemented in version 3. I'm making a point to leverage the much-improved workflow foundation and round out my service layer implementation. I've gone from thinking about web services as a method to expose custom application functionality for external consumption to using them as a mechanism for cleanly exposing an entire research domain where data originates from an ugly amalgamation of disparate sources.

More importantly, service layers are great for decoupling logic from client applications which enables rapid expansion into new territory. I was able to write a full administrative interface for my portal application natively in Windows Phone 7 over a couple of hours and can't imagine an iPhone or Android implementation being much more difficult. In our current time where client platforms are rising and falling with the tides (iOS, Honeycomb, ONX, Windows Phone, WebOS, etc) the argument for making business logic generically accessible makes an incredible amount of sense. This also sparks conversations about service repositories and the like but I have philosophical issues to work through there.

Finally, I'm looking into the Entity Framework as a database source for my data mappers. It addresses almost all of the issues that designed xNET objects to fix and the tools to use it are built in Visual Studio as opposed to my solution that requires using a third party tool to generate the object code. My only concern is moving away from DataTables as my principal data marshaling objects as they are awesome for caching and storing data from diverse sources. However, I have been wanting to get a true unit of work implementation in place - I have a bit of a hack now - and entities comes with it prefabricated. That might be worth the loss of flexibility.

The Future

Going forward, I want to focus on client development and high performance backends. Since I've got a good handle on making business logic available, I would love to play around with some of these client technologies and come up with cool ways to make the business go, so to speak. Also, for various reasons, performance hasn't been a huge concern for most of my projects. The business case could be met within reasonable performance boundaries. However, I can see how the diversification of clients and the opening of systems to parties not completely indoctrinated in my shop can put pressures on infrastructure requiring scalably performant solutions.

I look forward to taking on these challenges and discussing the various issues that come along with resolving them.

Tags:

Code

On the GOP field

by Rashid Z. Muhammad 2. November 2011 21:18

I've had a large number of conversations lately about the GOP field of 2012 Presidential candidates and want to get a few thoughts together on the subject.

First off, it is my opinion that only two of the GOP candidates are electable and those are the two Mormons: Mitt Romney and John Huntsman. I don't think that fact and the endless barrage of Mormon PR during football this year are a coincidence.

Michelle Bachmann promised $2 a gallon gas. There is no need to waste any more time on her.

Ron Paul, who is probably the one candidate that the anti-deficit Tea Party should unite behind, will not be the Republican nominee. His foreign policy is totally unworkable from a Republican perspective and, unlike his extreme Libertarian economic policies, as President he would have the power to implement many of his desired changes in overseas engagement.

Newt Gingrich might think his Presidential ambition-driven stunts to make him look like a pragmatist (e.g. working with Al Sharpton on education) weren't seen as such by the general electorate but I think not. Newt is a smart guy but, when he gets going, it's hard for him to not come off like a complete partisan hack.  Indeed, it is arguable that his super-duper-anti-Clinton GOP of the 90s (Clinton Body Count!!!!) really touched off the level of high partisanship we are experiencing now.

Rick Perry is out because he unrepentantly sat on the third rail of US politics with his anti-social security rhetoric and his debate performances have only worked to intensify the shock by loading his underwear with gasoline. He's got the look, but not much else.

Herman Cain is out because he is fairly unvetted (I remember his Georgia Senate campaign and nobody took him seriously enough to spend any money vetting him), has zero government experience (which, for me, equates to no political allies which is a negative), and his "bridge to Fair Tax" 9-9-9 plan is a nice conversation starter but is a tax policy non-starter. I personally like Cain's reckless, entrepreneurial approach and unabashed embracing of his blackness on his own terms, but I think the book on him is pretty accurate - he's a lightweight benefiting from the overall weakness of the GOP field but won't get the nod.

The idealistic Tea Party movement gave the GOP a much-needed shot in the arm after they were bludgeoned electorally in 2008. For that reason, Republicans are in a situation where they have to give nationally unviable candidates lip service because the announced candidate with the best chance at winning the election - Romney - is a pragmatist and not an ideologue. Oh, and while that candidate was governor of a Democrat state he supported a heath care program that has large similarities to the one the GOP wants to hang around President Obama's neck. Boy it sucks to be them.

For me, the fundamental problem with the GOP is them making the same assumptions about the 2010 election the Democrats made about 2008. Principally that the victory was some sort of blanket endorsement of their ideals when it was more the electorate lashing out against incumbents for the current economic climate.

While I think there is need for Obama and his people to be concerned, I don't think he is in as much trouble as many pundits believe. With the exception of Huntsman, the entire Republican field is extremely vulnerable in the general election. Right now, I would give Obama a 70% chance of being re-elected.

Tags:

Politics

About the author

Rashid Z. Muhammad lives in Atlanta and likes to read.

Month List