When you're developing mission critical
mobile apps, cross-platform development is important, and will continue
to be so
until a day comes when everyone uses the same platform. Will it be
iOS, Android, HTML5, Windows or something else? Nobody knows
yet, but the ramifications are the same.
For now, the world is multi- platform, and unless you can afford to ignore all platforms but one, or to develop independent projects for each platform, some kind of cross-platform approach makes sense.
There are essentially two approaches to cross-platform mobile apps. You can either use an embedded browser control and write a web app wrapped up as a native app, as in Adobe PhoneGap/Cordova or the similar approach taken by Sencha, or you can use a cross-platform tool that creates native apps, such as Xamarin Studio, Appcelerator Titanium, or Embarcardero.
But within the second category though, there is diversity. In particular, apps vary concerning the extent to which they abstract the user interface.
But here's the trade-off-- If you design your cross-platform framework to include user interface widgets, like labels, buttons, grids and menus, then you can have your application work almost the same way on every platform. You can also have tools that build the user interface once for all the platforms.
This is a big win in terms of coding effort. If the framework is
well implemented, it will still adopt some of the characteristics
native to each platform so that it looks more or less native.
Some tools do this by drawing their own controls. Embroiderer is in this category. Another approach is to use native controls where possible, in other words, to call the API that shows a button, rather than drawing the button with the graphics API, but to use custom drawing where necessary, even sometimes implementing a control from one platform on another.
The downside is that because those controls are not in fact native, there will be some differences, perhaps obvious, perhaps subtle.
Furthermore, if you're sharing the user interface design across all platforms, it's hard to make your design feel equally right in all cases.
To be sure, you might be better off to take the approach adopted by most games, using a design that is distinctive to your app and make a virtue of its consistency across platforms, even though it doesn't have the native look and feel on any platform.
But Xamarin Studio on the other hand makes no attempt to provide a shared GUI framework. Xamarin CEO Nat Friedman says “We don’t try to provide a user interface abstraction layer that works across all platforms. We think that’s a bad approach that leads to the lowest common denominator (LCD) user interfaces.
The LCD in maths is the lowest number into which a specific group of numbers divide exactly. In cross-platform app development, what you should strive for is the highest common intersection-- ie, to make available all the features common to each platform.
However, the downside to this is the that effort involved in maintaining two or more user interface designs for your app. This is an old debate, but one that must be addressed nevertheless. One of the reasons IBM created Eclipse was a disagreement with Sun Micro systems over the best way to design a cross-platform user interface framework.
Sun’s Swing framework, derived from Netscape’s Internet Foundation Classes first released in 1996, takes the custom-drawn approach, which is why Swing apps always look like Swing apps (even if you apply the “Windows” look and feel). A team from IBM, some originally from Object Technology International which was a company acquired by IBM, believed it was better to wrap native controls with a Java abstraction layer, created S WT (Standard Widget Toolkit) to do that, and used it to build Eclipse.
Some are wary of tool kits which rely heavily on custom-drawn controls rather than native controls. On the other hand, X amarin Studio is so far in the other direction that it removes some of the benefit of a cross-platform framework.
Some are now predicting that X amarin will come up with its own GUI abstraction framework in the near future, along the lines of S WT. It's a compromise, but one which delivers a lot of value to app developers who want to create cross-platform apps with the maximum amount of shared code.
For now, the world is multi- platform, and unless you can afford to ignore all platforms but one, or to develop independent projects for each platform, some kind of cross-platform approach makes sense.
There are essentially two approaches to cross-platform mobile apps. You can either use an embedded browser control and write a web app wrapped up as a native app, as in Adobe PhoneGap/Cordova or the similar approach taken by Sencha, or you can use a cross-platform tool that creates native apps, such as Xamarin Studio, Appcelerator Titanium, or Embarcardero.
But within the second category though, there is diversity. In particular, apps vary concerning the extent to which they abstract the user interface.
But here's the trade-off-- If you design your cross-platform framework to include user interface widgets, like labels, buttons, grids and menus, then you can have your application work almost the same way on every platform. You can also have tools that build the user interface once for all the platforms.
Some tools do this by drawing their own controls. Embroiderer is in this category. Another approach is to use native controls where possible, in other words, to call the API that shows a button, rather than drawing the button with the graphics API, but to use custom drawing where necessary, even sometimes implementing a control from one platform on another.
The downside is that because those controls are not in fact native, there will be some differences, perhaps obvious, perhaps subtle.
Furthermore, if you're sharing the user interface design across all platforms, it's hard to make your design feel equally right in all cases.
To be sure, you might be better off to take the approach adopted by most games, using a design that is distinctive to your app and make a virtue of its consistency across platforms, even though it doesn't have the native look and feel on any platform.
But Xamarin Studio on the other hand makes no attempt to provide a shared GUI framework. Xamarin CEO Nat Friedman says “We don’t try to provide a user interface abstraction layer that works across all platforms. We think that’s a bad approach that leads to the lowest common denominator (LCD) user interfaces.
The LCD in maths is the lowest number into which a specific group of numbers divide exactly. In cross-platform app development, what you should strive for is the highest common intersection-- ie, to make available all the features common to each platform.
However, the downside to this is the that effort involved in maintaining two or more user interface designs for your app. This is an old debate, but one that must be addressed nevertheless. One of the reasons IBM created Eclipse was a disagreement with Sun Micro systems over the best way to design a cross-platform user interface framework.
Sun’s Swing framework, derived from Netscape’s Internet Foundation Classes first released in 1996, takes the custom-drawn approach, which is why Swing apps always look like Swing apps (even if you apply the “Windows” look and feel). A team from IBM, some originally from Object Technology International which was a company acquired by IBM, believed it was better to wrap native controls with a Java abstraction layer, created S WT (Standard Widget Toolkit) to do that, and used it to build Eclipse.
Some are wary of tool kits which rely heavily on custom-drawn controls rather than native controls. On the other hand, X amarin Studio is so far in the other direction that it removes some of the benefit of a cross-platform framework.
Some are now predicting that X amarin will come up with its own GUI abstraction framework in the near future, along the lines of S WT. It's a compromise, but one which delivers a lot of value to app developers who want to create cross-platform apps with the maximum amount of shared code.
No comments:
Post a Comment
PLS WRITE YOUR IDEAS ABOUT THIS BLOG IN SHORT