Tag Archive: aspectj


Aspectj Android Examples

I should have known to look at my peers github profiles for this, duh. Matthias Kappler(kaeppler) has two android projects using aspectj in some very useful ways. The android  library is called Ignition and the example project is ignition-example. Word of caution he is using maven and gradle and the gradle-android plugin so ou may have to translate to using with ant.

You can cut out boilerplate, etc using aspectj annotations in certain ways see the IgnitionLocatioManager.aj example

Advertisements

Can I shoot the M’Fers?

Yes, I really am saying that …Can I shoot you M’Fers? Do a search on java techniques and android. For example, search for aspectj and android. Now, notice how many howtos state that in an ant build you run acj or iacj after the android javac compile step. Now pick up the damn gun and shoot your M’fer ass! Why?

Because lack of knowledge of advance java techniques and java tools is a sign that you should not claim that you are a java developer. Okay, for those that do not know you set the iacj to run in the javac task or just use ant4eclipse ant task adapter to make the process easier as there is no need to run two effing compiles on the main project or a test project when using aspectj in an android project!

And really if you are already using an ant build or the IDE builder running an ant build than by god dammit the ecj is an incremental builder which can sped up an android build especially if you are using instrumental testing. Also you can set more verbose feedback options using ecj instead of the javac that comes with the Oracle JDK.

Obviously, the other component of Agile development in systems that have broken or very decoupled anti-patterns such as android is in fact Aspect Oriented Programming due to the fact that you can separate concerns, etc. Specifically TDD and BDD only affect the agility or speed of development in the test process itself not the full development process itself. Dependency Injection also affects agility of the full development process rather than just testing if you apply it to the full project rather than just testing.

Unfortunately, most firms get stuck with java developers who happen to be android developers that replace java expertise and agile expertise with knowing only  the TDD/BDD buzz words.Please can I shoot those MF’ers? Yes, there is even on the market right now one Android Developer Testing Book that makes all these mistakes. Yes, really one publisher got their head up the ass and actually gave someone money to produce such  trash.