8 ms·
Just like the web platform, Android is hugely improved when you leverage the community libraries and tools they provided. Gradle actually helps a lot with that,
by izacus 10y ago
Just like the web platform, Android is hugely improved when you leverage the community libraries and tools they provided. Gradle actually helps a lot with that, since its clear dependency management makes use of external libraries a breeze.
If in 2016 you're still complaining about AsyncTasks and its management, you certanly have missed a lot of progress in the last few years. It's not unlike having people complain about JavaScript issues without ever looking at jQuery, React or newer tooling.
The most useful things you can do for yourself currently are:
* Adopt Kotlin as a language. It's not all that different from Swift, comes with IDE support, tiny standard library and really fixes the pain of Java 6.
* Use MVP patterns and its friends. There are a few libraries which take most of the pain of lifecycles away.
* Use RxJava, Retrofit, Glide, etc. libraries that make your life easier with concurrency. A lot of these tools are better and easier to use than what even exists on iOS. Using AsyncTask in 2016 is just silly, it was never a good API.
* Use Gradle! Driven by its scripting language, you can do so much to script and automatize your build.
Other than that, I agree, after years of development:
* Some Android APIs just aren't well thought out.
* Gradle badly needs performance improvement.
* State of NDK is just sad. Fixable, but sad.
* MultiDEX is a result of a very very dumb decision in Android 1.0 and it's going to hurt us for a long time :/
All-in-all, I honestly think the author didn't really look into Android all that much to have complaints that he had. The blog post is somewhere on the level of someone complaining about IE6 JavaScript bugs when we've already moved on to React and are dealing now with very different issues.
(And no I'm not saying Android is great or even a great platform. It's not. It's just that, just like on Web, you can do a lot to fix major pains.)
- ilogik 10y agoIs there a tutorial or book that you can recommend for a newbie to get started with Kotlin,MVP, etc?
- on_and_off 10y agoThere is a great google repo with many architecture samples, including some MVP ones : https://github.com/googlesamples/android-architecture https://github.com/googlesamples/android-architecture For kotlin, no book needed. Go to the language website, read the introduction, maybe a couple of pages on the language features and then complete the kotlin koans. It will give you an overview of most of the language features. After that, find an android project written in kotlin. Here is one : https://github.com/LostInContext/LostContext-App https://github.com/LostInContext/LostContext-App (there are many others) . Configuring an android project in kotlin the first time can be painful, especially if you have some code generation (dagger, databinding, ...) , so it is way easier to have a working sample to work with.
- finchisko 10y agoExactly. Criticize is easy. That guy should stop whining and rather enlighten us with his home brewed platform, language, tooling, etc.
- hehheh 10y agoYou're allowed to point out a project's faults without having created an alternative version.
- raverbashing 10y ago* and its friends * and its management * by its scripting language
- izacus 10y agoThanks! Fixed that!
- majewsky 10y agoI think you just proved the point of the author. I haven't done any app development yet, but from how you describe it, it seems to be as hard to keep up with it as with the JS ecosystem. No wonder then that the author has trouble keeping up with two entirely distinct ecosystems, and chooses to focus on only one. (That said, I'm very glad that this is the top-voted comment, since it looks like a very valuable resource for lurkers who want to get into the topic.)
- izacus 10y agoIMO it's really not (but I might be biased by experience) - the library churn is nowhere near the speed of the JavaScript world. All the libraries I mentioned are a few years old, battle tested and any larger conference or a resource (Android Weekly, Fragmented podcasts, etc.) will have numerous articles and talks on how to use them. The only exception is Kotlin as a language, which is pretty new and the tooling is still improving. You're not going to hurt TOO much if you stay with Java6 though. Remember, we at the end of the day we're all just old Java farts and we like our stability ;)
- dmix 10y agoI'm not super familiar with the Java world. Will eventually adopting Java 8 improve the experience developing Android apps where you might not need Kotlin?
- pjmlp 10y ago> Just like the web platform, Android is hugely improved when you leverage the community libraries and tools they provided. Which speaks a lot about the quality of work provided by the platform owner, when the community needs to step up.
- izacus 10y agoUhh, is there a platform there that isn't greatly improved by community libraries? At PSPDFKit we use a lot of additional third party tools and libraries on iOS as well, C++ practically needs community libraries to be usable, Python's biggest strength is in its excellent OSS library community, Ruby as well... I mean, yeah, in perfect world we'd all have neatly packaged by Google, we'd write 6 lines of code and have the greatest app ever. But software development never kinda worked that way for me and I have a feeling it never will :/
- pjmlp 10y agoC++ isn't a platform with a platform owner. Python's biggest strength that lead to its adoption was being a language with "Batteries Included".
- izacus 10y agoI'm not sure about the meaningful distinction here. Programming on any platform will be greatly improved by using good (preferrably opensource) libraries. What difference does it make who made them and why? It's such a strange nitpick.
- samastur 10y agoDifference is at the beginning. When I started using Python I absolutely loved that stdlib covered almost everything I thought I could need. These days packages I use mostly come from elsewhere, but at the beginning it was great. I'm fine with Javascript development these days because I built my fundamentals years ago. I am not sure how comfortable I would be otherwise and when I meet people who are where I used to be, they often look lost. I am also thinking about learning Android development and don't really know where to begin.
- cageface 10y agoThis is also very much the case with iOS. If you just stick to what Apple provides you're going to suffer a lot more than necessary. Libraries and tools like Snapkit, R.swift, Fastlane, and Alamofire sand off so many rough edges on the APIs and Xcode.
- cableshaft 10y agoTrying not to add dependencies after being burned in the past (cocos2d-swift disappearing was a particularly harsh one), but they all look interesting. R.swift in particular I might have to add. Autocomplete and compile time checking of resources is something I wish was more common in other environments.
- cageface 10y agoR.swift is brilliant. Apple should just write them a check and make it part of Xcode instead of playing cute games with rendering tiny images inline with code.
- exDM69 10y ago> It's not unlike having people complain about JavaScript issues without ever looking at jQuery, React or newer tooling. But this is exactly what makes being a Javascript developer a miserable experience. And I can give Javascript some benefit of the doubt since it's a multi-vendor language with complex standardization processes and all the stakeholders have their own interests and limited financial backing. By contrast, Android is a single vendor platform with practically infinite financial and labor resources behind it. It's just a mess. I'd expect a relatively painless experience: install dev tools, start a new project, build and go! But no, it's jumping through hoops, requires understanding a myriad of different SDK/platform versions and a constant churn in keeping your apps up to date with new versions while trying not to break backwards compatibility. And a big part of this mess comes from the fact that device manufacturers and mobile operators are unwilling to keep old devices up to date (and Google can't force them, while I think they should with some kind of licensing contracts), leaving customers exposed to security flaws while keeping the developers churn high with multiple versions to be supported.
- gsmiro 10y ago> It's just a mess. I'd expect a relatively painless experience: install dev tools, start a new project, build and go! But no, it's jumping through hoops, requires understanding a myriad of different SDK/platform versions and a constant churn in keeping your apps up to date with new versions while trying not to break backwards compatibility. > And a big part of this mess comes from the fact that device manufacturers and mobile operators are unwilling to keep old devices up to date (and Google can't force them, while I think they should with some kind of licensing contracts), leaving customers exposed to security flaws while keeping the developers churn high with multiple versions to be supported. Is it only me or there are tons of similarities to C# and the .Net environment?! More and more I feel Google just ends up with the same solution MS came up with in order to handle the diversity of vendors using its platform and their conflicting interesse.
- retox 10y agoC# is as easy to get started with as I've seen for any language. I don't see the comparison?
- signal11 10y ago> Gradle badly needs performance improvement gradle --daemon is a hack, I guess, but I always use it for my builds (even aliased gradle to gradle --daemon). It's far too slow otherwise. On newer gradle releases I believe the daemon is enabled by default.
- foobarian 10y agoMy problem with gradle is the built in Java dependency resolution is way too aggressive. If you change a class with a static constant it recompiles everything. Even if you don't, it will compile the whole dependency graph to handle some theoretical edge case when it would be enough to compile just the modified file 99% of the time. Oh well.
- Sagiri 10y agoPersonally, I would rather builds be slow than have my build mysteriously break when I'm in that 1%.
- foobarian 10y agoFor me it depends. If I'm in a development session with lots of iterations where build speed is the bottleneck, I'd take my chances (I do anyway, have to resort to manually compiling individual files). For production/CI/other builds it's a different story, although those usually get built clean so it's not even a consideration.
- on_and_off 10y agoif you are on a dev session with a lot of iterations, you really want to go the InstantRun (or JRebel) route.
- lucasarruda 10y agoI guess his point is not that Android platform hasn't improved, but the effort itself to develop for it versus developing for iOS platform. Cost benefit also is probably lot better on the iOS side ($$$ you get to develop an app / time to develop it).
- mmargerum 10y ago> you certanly have missed a lot of progress in the last few years. I think that's kind of his point. He was spreads too thin.
- rkapsoro 10y agoHey, what libraries for assisting with MVP/etc. patterns did you have in mind? Incidentally, our Kotlin-based app actually has a completely custom one that an opinionated product guy wrote that works reasonably well, but it still needs a lot of work and probably to be fully extracted for an OSS release. We also have some Kotlin delegated properties and other magic for cutting down on lifecycle & state management boilerplate.
- swsieber 10y agoAnd Gradle 3.0 does have some major speed improvements. Though if that's not enough, then I'd probably suggest Buck as build tool.
- smrtinsert 10y agoThe gradle and multidex complaints are spot on. Even as an enthusiast developer making my own personal apps for myself, I see this as true. I'm ok with Fragments, Rx makes everything nice.
- jimbokun 10y ago"All-in-all, I honestly think the author didn't really look into Android all that much to have complaints that he had." The author states pretty plainly the biggest reason for leaving Android development was he didn't have time to keep up with all the developments in both Android and iOS communities.
- odbol_ 10y agoThen he's not a very good programmer. This is technology: at the rate it's advancing, even tools from 5 years ago are out of date. You have to constantly keep up with the latest advances in programming if you want to stay relevant.
- on_and_off 10y agoAgree. I was expecting the author to lament on something like java vs swift. Even that would not be the best argument ever since you can write your android apps entirely in kotlin and it is vastly similar to swift. A real downside of kotlin is that it complexifies your build (but only the first time you have to setup a complex project with kotlin, dagger, databinding, etc) and that the tooling is not on par with the base java one. Multidex ? it is far from perfect but it is not a day to day issue. I work on a 200k methods app and multidex actually makes it almost entirely painless. Gradle ? Nobody can seriously say that builds have gotten worse with gradle. Before it, we had no way to hook up libraries with resources (aar). Now we just have to 'import libname:version' The complaint on the build times is very fair though. The solution is easy though .. just use an high end computer I use a mid 2015 mbp, it can handle an huge android app without any issue (except that build times are only acceptable, not great). It really looks like he has been submerged with having 2 platforms to learn at once and has not been able to tackle the basics.