back

by toddmorey·9y ago·view on hn ↗
Also, I think the idea that Javascript and HTML, languages designed specifically to markup and manipulate web documents, are the right tools for native app development is misguided as well.

I'm not saying JS doesn't have more general use constructs but HMTL/JS always feels like a strange, uncomfortable way to describe native UI. I guess what I'm saying is that you tend to feel the compromise.

In the end, I just think the language and tools used by the teams that build core apps for a platform will always beat those designed to abstract away what makes the platform special and compelling.

1 comments
Both Android and iOS majorly use XML to describe layout, and constraint-based layout on both platforms is essentially flexbox (CSS).

Instead of a common standard we have 3 competing stacks.

Having developed several hybrid and native apps on both platforms, I can say that usually the worst layouts are done by devs with experience only in one platform. From a high level, it's easy to accomplish the same thing on all platforms, animations included. It would be a ton easier if they just would actually converge.

iOS does not use XML to describe layout.

Storyboards and xib files use XML as a serialization medium, but you never actually work with the XML directly, it's literally just an underlying file format and the only reason it's used over a binary format is to make VCS merge conflicts easier to deal with. And more importantly, the actual built iOS app does not contain XML. Instead the build process constructs the view hierarchy based on the storyboard/xib (just as the interface builder editor does) and then serializes that to a binary plist (this is why UIView and UIViewController conform to NSCoding).