I like the changes in Java 8, but I'm concerned about Java fragmentation between Oracle/OpenJDK and Android. It seems Android is stuck on Java 1.6 (since Dalvik is not "true Java" and is more like a VM that happens to implement a language very similar to Java 1.6). There's now a huge gap between 1.6 and 1.8. It's not just syntax like lambda and default methods. It's also the supporting API changes in collections (str…
Not to mention debacle it creates on your system. Android requires/plays-well with JDK 6 and you probably want to be running the latest version of Java for security purposes. Maintaining multiple JDKs have been nothing but troubling for me.
An Opinionated Guide to Modern Java Development, Part 1
331–340 of 402 posts
Re: An Opinionated Guide to Modern Java Development, Part 1
#332Earlier quoted context omitted.
After doing couple of Android projects with Gradle I've felt like Maven is a godsend. It might require writing some XML to declare what your project does, but at least it WORKS and at least it does not waste my time by forcing me to write code to include pieces of projects and properly process project (e.g. including native code, Robolectric testing, renderscript and some other things). Also any compilation inside ID…
for normal dependency management you shouldn't need to write code. I've never done any android dev, so I can't comment on that. declaring a dependency is literally like this: dependencies { compile group: 'commons-collections', name: 'commons-collections', version: '3.2' testCompile group: 'junit', name: 'junit', version: '4.+' } But I am not going to be the great gradle defender :) I have many complaints..... I woul…
* Code generation from annotations (reflection on Android is slow, so doing code generation is way better) * Attaching native .so libraries in proper directories of APK (Maven plugin does that automatically, Gradle needed writing code for that to work) * Properly handling RenderScript backwards compatibility library (there was no Gradle support for that at all)
* Testing - Robolectric is still not supported which throws a wrench into whole Jenkins/TeamCity autotest stack and needs fiddling with emulators
Re: An Opinionated Guide to Modern Java Development, Part 1
#333Earlier quoted context omitted.
After doing couple of Android projects with Gradle I've felt like Maven is a godsend. It might require writing some XML to declare what your project does, but at least it WORKS and at least it does not waste my time by forcing me to write code to include pieces of projects and properly process project (e.g. including native code, Robolectric testing, renderscript and some other things). Also any compilation inside ID…
> Right now (at least for Android), Gradle is a colossal waste of time due to lacking features, extremely slow execution and myriad of bugs which will eat away productive time on project Are the sparse features, slow executes, and bugginess due to Gradle or due to the scripting language it uses? www.gradle.org/overview says they will happily support any community effort to create additional build script engines for G…
Same goes with other things: we had to write Groovy code to handle build cases which Maven plugins handle by default. That's mostly an ecosystem issue.
Re: An Opinionated Guide to Modern Java Development, Part 1
#334A simple, obvious, useful idea I hadn't seen before.
Re: An Opinionated Guide to Modern Java Development, Part 1
#335Earlier quoted context omitted.
I'll address that in part 3. Basically jsr330 is a good standard, and it's implemented by Guice, Dagger and Spring
If you're planning at least 3 parts, have you considered turning this tutorial into a Leanpub book? It's the perfect start to one... (Disclosure: I'm a Leanpub cofounder)
Re: An Opinionated Guide to Modern Java Development, Part 1
#336What about dependency injection in modern java - is Guice or spring still the de facto standard?
Re: An Opinionated Guide to Modern Java Development, Part 1
#337Earlier quoted context omitted.
Especially since Google hasn't updated its Java language much lately. I think the solution for Google is to deprecate Java and start using Go. That would solve more than one problem for them.
Back when I was initially impressed by Go before the 1.0 release, I created a ticket for Go on Android, which is still open. I doubt it will ever happen.
Re: An Opinionated Guide to Modern Java Development, Part 1
#338Earlier quoted context omitted.
I'm using Dropwizard for the same reason. It is dead simple and gets me going out of the box. You should also give Grails a try if you plan on having a view layer
Dropwizard seems to have a view layer of its own that you can bolt on as well.
Re: An Opinionated Guide to Modern Java Development, Part 1
#339Earlier quoted context omitted.
I agree. Hibernate has become a downright liability at times in our codebase. These days I only use it in new code for query parameterization and result row transforms into models. Speaking of which, if anyone knows of a good library for query parameterization alone, let me know...
JDBI is quite good: http://jdbi.org/
Re: An Opinionated Guide to Modern Java Development, Part 1
#340Earlier quoted context omitted.
Not to mention debacle it creates on your system. Android requires/plays-well with JDK 6 and you probably want to be running the latest version of Java for security purposes. Maintaining multiple JDKs have been nothing but troubling for me.
Uhm... Android tools work just fine with the newsest stable JDK 7.