The purchase of Instagram is no less than an attempt to redefine the landscape of our industry, today, you are either an app, a service or a platform. For instance, RIM will become an "app". No disrespect, it can be a formidable app, opening the doors to the Enterprise to an Apple or a Google, but the window of opportunity for RIM to be a platform is gone. In this new world, search is an app, actually the feature of an app which sets the search context (yelp, UrbanSpoon...), ads is a service and the old WWW amounts to the Yellow Pages (paper HTML edition). Content is now produced, delivered and accessed in a completely different way, e.g. Instagram: we have entered the social:// era and left http:// behind. The circle is the new DNS.
... and maybe (always smiling) Amazon. The problem with Amazon is that they'll have to chose between being a commerce platform (and compete with WalMart) or an industry platform and play with the big boyz. I don't think these two things work well together and eventually Amazon will return to its commerce roots mainly because of the lack of social capability. Amazon is a formidable company, but they are too late to the game, with no money in the bank to acquire what they need to compete. As (Microsoft), Google and Apple know, there are only so many social networks that can fuel a healthy platform. Most likely Amazon will become a substrate to support services with AWS, and of course, an "app", the kindle, assuming the platform guys leave these holes open (far from a given).
Yet, Amazon was a decisive factor in establishing the architecture of the platform. It reinforced the power of the vertical integration pioneered by Apple. If you come with a great device or set of devices, and an app store, customers will come. Something that Google is still struggling to emulate with an open ecosystem, and I am not even talking about Microsoft.
If the social integration is pretty much a given, the game gets really interesting when it comes to the vertical integration. As we have seen with Apple, customers don't see "choice" (or price) as a competitive advantage. Customers want simple product lines, that offer great consumer oriented products, with clear and real innovation at each cycle, built by thoughtful product teams: selling incremental junk is no longer an option. And yes, TV or Game consoles will be engulfed in the platform. How could the platform guys leave them on the table? Any consumer device that can run an app will be vertically integrated in the platform (or replaced by one).
My best guess is that:
- MS/FB will partner strongly with or even purchase Nokia and HP.
- Google/Motorola will swallow HTC and/or LG, possibly bring Dell in its ecosystem
- Apple ... huh ... will buy Twitter, and RIM for its Enterprise App
Samsung could team up with Amazon, but most likely it will become the component provider of the platform guys. SONY's or Nintendo's trouble simply show that there is no more room for independent Hardware Vendors: you are either a (vertically integrated) platform or you supply the platform with components, not even devices. It is essential to understand that the touch points to consumers is going to be completely locked down by the platform.
Even Telco providers will be suppliers to the platform guys, with the Skype/Hangout/Facetime apps being the new face of telephony.
The interesting thing here is that unless social networks are just a fad, MS/FB is the most likely winner of that game. Even Ballmer could pull that off and retire on a -real - visionary success. There is a large probability that MS/FB/NOK/HP will take on 80% of a vertically integrated, consumer oriented market. Google will lose that game (this is not an engineers game, let alone using corny "Web" paradigms and UX, in any case they will take the decision to move to a vertically integrated model too late without any muscle behind it). Apple will take on a 20% "think different" crowd. Apple is not aggressive enough to win that game, they'll look back to their $100 B in the bank and ask themselves, if they could have used it more "wisely".
Facebook spent a billion, not to buy Instagram but to hold our industry by the balls. With its IPO behind, it will call the shots for years. And yes ... Zuckerberg is next CEO of "The Platform".
Fascinating times ... it's a shame that Steve is no longer with us.
Canappi's Data Binding Framwork allows you get data from a Web API and effortlessly bind it to your UI.
For instance, getting a Twitter feed and binding it to a table is as simple as that.
The core of the Canappi's binding framework relies on a simple assumption. Good Data is simple to bind, so what we do is to reify data formats to a simple set of rows. Yes, wouldn't the world (of software engineering) be a lot simpler if data was (mostly) flat?
In XML, that would amount to:
<collection>
<row attr1="value1" attr2="value2">
<key3>value3</value>
...
</row>
</collection>
I of course reify elements and attributes in a single dictionary for each row. So the reification algorithm is quite simple, I generally ask for a couple of values in the connection definition: which one is the collection element, which one is the row? I can go arbitrarily deep.
In JSON things are a bit more complex, I found it a bit harder to identify where the "array" is. Here is my reification algorithm, first I identify where the rows are, then I flatten any subdictionary (and I ignore for the most part subarrays):
You know what? the life of the data binder would be a lot simpler if API designers would also support a "mobile friendly" format which in JSON could look like:
{
"collection": [
{
"row": {
"key1": "value1",
"key2": "value2"
...
}
},
{
"row": {
"key1": "value1",
"key2": "value2"
}
},
...
]
}
What's the point of arbitrarily nested data structures?
So I'd like to share my Algorithm, you can dowload a adaptation of the SBJSONParser on Github.
This is how you use it:
url = [NSURL URLWithString:endpoint];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
request.requestMethod = @"GET" ;
[request startSynchronous];
NSString *response = [request responseString];
// Canappi tests for JSONP and removes it first
// See generated code
id data = nil;
SBJsonParser *parser = [[SBJsonParser alloc] init];
//Get a JSON object
id parsedData = [parser objectWithString:response error:nil] ;
//First find the array, then flatten the rows, to get an array or simple key/value pairs dictionaries
data = [parser flatten:[parser findArrayForElement:@"collection" andRow:@"row" wrapped:NO in:parsedData] forElement:nil] ;
Canappi also provides the ability to "join" two API calls and simply merge both set of rows in the same data structure.
So this post is a plea for API designers to give mobile developers the data structures they need to simplify the data binding process. There is simply no value in doing otherwise, just incidental complexity.
Interface Builder is one of the most amazing software ever written. After 25 years (and hardly anything added to it), it is still relevant and still a GUI designer far ahead of the competion. Just let me know if you know any other piece of software that was designed 25 years ago and is still relevant today, pretty much unchanged.
When I discovered IB in 1990, I was in owe. Not only could you build incredible GUIs effortlessly (at least for the time), but IB was also an Injection Dependency Framework more than a decade ahead of Spring. It forever set the tone of my career, anchoring it in the model-driven world, building software that builts software.
That being said, I built Canappi to address a number of shortcomings which would be expected since IB was never designed to build mobile solutions and to a large extend it shows.
1. Canappi's mdsl describes the entire application in a single file: XIB files have all kinds of granularity and are generally loaded individually at different locations, directly from the code. It makes it quite dificult to have a comprehensive view of the application.
2. Canappi introduces the concept of Layout, as a set of controls, which can be reused across different views: IB does not allow you to reuse groups of controls easily, this has to be dealt in code, not at the view definition time.
3. Canappi offers standard actions (call a number, send an email, navigate to a view, present/dismiss a view...): IB doesn't have any notion of standard actions, in particular navigation actions, so you have to go back in code to implement things that could be easily dealt with at the model level, in the GUI definition
4. Canappi has introduced the concept of stylesheets: IB does not have a simple way to reuse a set of properties across the definition of several controls (TextField, Label, Button...)
5. Canappi's programming model include Web API definitions which can be bound to layout and actions: How many mobile apps need to talk to some kind of Web API? Unfortunately IB, which was build 25 years ago, knows nothing about them. With Canappi you can create a client view of a Web API (Connection), and bind operations to individual layouts, including tables and actions. Canappi generates the code to assemble the Web API request, parse the response (XML or JSON) and bind it to the controls of a View.
6. Canappi's can easily specify the layout of a table: When you drag and drop a table in a XIB file, you get, a table. You have no way to declaratively define what the table row is made of.
7. Canappi defines the whole wiring of an application, from Splash screen to Menu to every aspect of Navigation (navigation bar, navigation actions, dialogs...): Apple recently added Storyboards, but that mechanism doesn't scale very well if you application is more than a few views.
8. Canappi makes the process of designing Universal Binary easy, you can define both the iPhone and iPad layouts. Each layout is independent of each other which allows you to define different navigation schemes as well (of course the remainder of the definitions are shared between the two: connections, styles, ...): IB knows nothing about different form factors running the same application. Again, 25 years ago, this was not a common usage pattern.
9. Canappi has a much richer palette of controls: Graph (Core-Plot), Gallery, RadioButtons (yes IB doesn't have radio buttons for iOS), Button Triggered Pickers and Date Pickers, Video Player, ...
10. With Canappi you can use Interface Builder to create Android layouts. We convert Interface Builder files into mdsl, which can be used to generate both iOS and Android applications.
Canappi's mdsl is also a textual language which you can easily version, compare and merge, even create libraries of resuable application definition. IB on the other hand is a graphical tool which is ideal to position controls on a view, but far less than ideal to manage an entire application.
In fact, mdsl, Canappi's programming model, is so complete today that you can now write entire applications from it, something that is impossible to do with Interface Builder. This app was built with 700 lines of mdsl and less than 50 lines of custom code.
Data services are often an essential part of mobile solutions. It can be pretty tedious to manage a data access layer (say written in PHP) and a database schema (say MySQL).
Over the past few months, we have built a number of prototypes and a fairly large scale project that is about to go in production using MongoDB hosted by MongoLab.
What we noticed is that all we had to do was to create a collection for each entity and everything else would happen in mdsl. I must admit this was a nice side effect of mdsl, not necessarily something that I had designed for, I was simply exploring what you could do with MongoDB. Of course, this works well for CRUD operations since there is no data access layer per se, but still, it seems to fit lots of mobile solutions like a glove. The freedom of not having a rigid schema and the ability to add attributes and rows by hand as needed makes a big difference when you are building a solution: all the boiler plate code that keeps the client, data access layer and schema goes away. I cannot emphasize enough how easy and fast developing a connected a mobile solution becomes.
Here is a typical mdsl connection definition to a MongoDB database:
The first operation fetches the entire collection of patients (of course not very realistic). The createPatient operation POSTs a new patient to the patients’s collection. The JSON body is constructed automatically by the generated code within a “row” element as shown on the right.
Canappi’s knows readily how to create, read, update or delete these types of record.
The third operation, getPatientByEmail, implements a very simple query, using MongoDB query language and assuming the row element name is “row”. Here is what the resulting json document looks like in MongoDB, using the MongoLab console:
Here is how a join between two collections can be defined, assuming an event has a foreign key, itemid that points to an item detail document:
That's it !