Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could any Android dev veterans chime in and comment on JetPack? This is the first time I'm hearing about it and I'm not sure I like it. It looks like a weird blend of HTML, CSS and JavaScript event handlers and I'm starting to wonder: Why not use web technologies from the get-go then and make use of the lessons learnt there?

This reminds me, I'm getting the impression that with every new UI framework that gets released, we're just recycling ideas learnt on the web and re-living its paradigm shifts:

1. First, in the early days of the web, we defined UIs declaratively but mixed structure and looks (`<h1><font face="Comic Sans MS">Hello, world!</font></h1>`).

2. Then we separated content structure (HTML) and styles (CSS) (or even XML and XSLT)

3. Later on we added dynamics and discovered event handlers (JS)

4. Then we realized we could use JS for everything (content, styles, dynamics) and imperatively create & manipulate UIs by manipulating the DOM (document.createElement, jQuery, d3).

5. Finally it dawned on us: That's not a good idea, either, because 1) we're mixing business logic and styling and 2) the DOM is global state. So we switched back to the now classic separation of using HTML for content, CSS for styles and JS for dynamics. But this time we try to keep individual components (their state, their DOM and their business logic) neatly encapsulated (React, Angular, Web Components).



> Could any Android dev veterans chime in and comment on JetPack?

Small nit but Jetpack is the name of the entire suite of libraries that Google offers for Android. The thing formally known as "support lib", a name that stopped making sense when it had random useful stuff not just compat stuff.

You're talking about Compose here (or Jetpack Compose).


Oh right, I meant Compose. Thanks!


The step 6 is to integrate graalVM into web browsers in order to allow seamless interoperability between any language (e.g Kotlin) and any other language, especially javascript and the web apis.

Unfortunately because of harmful politics from mozilla pushing the NIH webassembly, it's not going to happen before a proponent come (maybe Microsoft someday)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: