Sunday, November 27, 2011

Obtaining Android Source Code on Microsoft Windows Platform

I was able to obtain the Android source code.

Here's a screenshot in Eclipse of what prompted me to go searching for the Android source code.







(really ugly when you try control-clicking on an Android API class only to get this)

Obtaining the source was MUCH more of a challenge than I expected, and took me several hours yesterday evening (plus an overnight download). Somehow I just imagined that the source would be available by Android API version as a ZIP or JAR file. Nope ...

In order to get it installed on Windows (which is officially not supported per the Android Open Source Project documentation), here's what I had to do:




  1. Install Cygwin. I installed Cygwin 1.7.9-1, the latest, obtained from cygwin.com.
  2. The setup.exe is a Web Installer. I specified C:\cygwin as my Root Directory, installed for All Users. When running setup.exe, administrator privileges are required.
  3. In the Cygwin Setup - Select Packages dialog, I found packages for curl, git, and python. These 3 will be necessary for obtaining the Android Source. This installation was a bit tricky, so I want to document this well here:

Cygwin - curl installation


Cygwin - git installation



Cygwin - Python installation


  1. From here, complete installation of Cygwin.
  2. Once Cygwin has been installed, create a local directory to hold the Android Source. In my case, I used C:\android\android-source.
  3. Open a Cygwin terminal session and type:
    cd /cygdrive/c/android/android-source
    (of course, using whatever path for your local directory).
  4. Now, type:
    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/repo
    This will pull down the repo Python script used by the Android SDK Team and place it in your local directory for Android Source.
  5. Next, type:

    repo init -u https://android.googlesource.com/platform/manifest

    This will create a .repo file and initialize the directory to hold the Android Source.
  6. Finally, type:
    repo sync

    This will do the actual downloading of the Android Source. It takes a long time, and pulled down 8.72 GB into my local working directory.



Saturday, November 26, 2011

Setting up Android Development Environment

I am going to be doing my Android Development on a Windows 7 environment. This has already proven to present a unique set of challenges, especially regarding obtaining Android source for the android.jar.

Thus far, here are the steps I have taken for setting up my dev environment:

  1. Download Java SDK 6. I always install this to C:\java\jdk1.6.0_29
  2. Download Eclipse Indigo (Eclipse 3.7.1), 32 bit. I download the "Eclipse IDE for Java EE Developers" version and unzip this (no installer) to C:\eclipse.
  3. Download Tortoise SVN 1.7.1. Figured I will need this for source/version control. I *should* switch to git at some point. However, I use Subversion at work, and did not feel like struggling with learning a new distributed version control system at this point in time (already plenty of new stuff to learn).
  4. Installed Android SDK R15 (Windows Installer). I installed this to C:\android\android-sdk and ran the Android SDK Manager.


  5. I installed everything for Android 4.0 (Ice Cream Sandwich), Android 3.2 (Honeycomb), and Android 2.3.3 (Gingerbread). This took quite some time.
  6. Install Eclipse plugin for Subclipse 1.8 (compiled against SVN 1.7)

  7. Install Eclipse plugin for ADT (Android Development Tools)



From here, I began to create a "Hello World" Application. However, as I did so, I realized that the android source was not available.

Obtaining the Android source for android.jar was quite an adventure that I'll write about in my next post.


Hello, Android

Over the Thanksgiving break, I upgraded my JDK to Java SDK 6 update 29 (I've been living in JDK 5-land for quite some time), pulled down Eclipse Indigo, and installed the Android SDK and the ADT Plugin for Eclipse.

At this point in time, I don't actually own any Android devices, yet I'm interested in getting into Android development.

I actually own 4 iOS devices (2 iPhone 4s, 2 iPad 2s). I was interested in iOS development and perused articles and books on Objective C, Cocoa, and even higher-level frameworks such as cocos2d and Corona SDK.

However, as much as I love my iOS devices, I just found it really difficult to get into iOS Development.

I've been doing Java Development for the past 12+ years. Although I think I'm fairly good at learning new languages and environments (I am comfortably able to hop between the Java and Microsoft .NET realms), I just found that there was a steep learning curve for Objective C and Cocoa.

When I first began getting into .NET development about 7 years ago, I found that C# was an easy transition for a Java developer. The .NET BCL provides many of the same classes for I/O, XML, Strings, and i18n as is provided by the core Java API. Thus, as a Java programmer in a new land, it didn't feel too horrendously foreign.

iOS development, on the other hand, felt like a completely different world.

There are definitely points in the article where my thoughts and philosophies regarding technology trends diverge from that of the author.

However, I found myself definitely relating to his points regarding the barriers to entry for iOS development, both in terms of knowledge and equipment, as well as the lack of transferability of skills developed in the iOS arena back to the world of writing enterprise business applications (he referenced the TIOBE Software Index, which in 11/2011 shows Objective-C has a Community Index Rating of 5.983% as compared to Java at 17.874%).

So, based on the fact that Android development fits with my Java / Eclipse background extremely well, I'm embarking on learning as much as I can during Thanksgiving break, and during subsequent evenings and weekends.

Tuesday, October 18, 2011

FedEx Envelope

Wow. I took a half-day vacation today. While at home, I heard a ding-dong. It was the FedEx delivery person.

Today I received my OCM - Java Enterprise Architect certificate/success kit from Oracle. Made me feel special. :-)

Wednesday, October 12, 2011

Oracle Certified Master, Java Enterprise Architect

After 2 months of extremely hard work (studying every evening, working on a design project during nights and weekends), and another 2 months of waiting, I received good news on October 6th: I achieved Oracle Certified Master, Java Enterprise Architect 5 status.

Timeline:



  • 2011-JUN-01 - Began studying early June

  • 2011-JUL-21 - Passed Part 1 Multiple Choice Exam

  • 2011-AUG-02 - Submitted Part 2 Project

  • 2011-AUG-03 - Took Part 3 Essay

  • 2011-OCT-06 - Received Congratulations Email


Part 1: Multiple Choice Exam

I used the following study material:



  • Design Patterns: Elements of Reusable Object-Oriented Software. The Gang of 4 Design Pattern book. Like any software engineer, I have a copy of this book sitting on my desk at work and reference it on occasion. However, in preparation for this exam, I read this from cover-to-cover twice.

  • Core J2EE Patterns, Deepak Alur, Dan Malks, John Crupi. I read over this book cover-to-cover, and went back several times to reference particular patterns.

  • Core J2EE Patterns Online. This site is based on the Core J2EE Patterns book. I used it in-tandem with the book.

  • Sun Certified Enterprise Architect for Java EE Study Guide, Second Edition, Mark Cade, Humphrey Sheil. This was the only exam-focused guide I used. I used it as my outline, to understand which areas the exam would cover, and where I needed to focus my time. I didn't have a hardcopy of this book, but was extremely fortunate that my employer purchased me a Safari Books Online subscription. I love Safari Books Online, have found it to be a wonderful technical resource, since I can read all the technical books I need without having to purchase hardcopy books.

  • Java EE 5 Tutorial.
Part II: Project

I LOVED doing the project. This is where I felt like I learned new skills and grew, and formalized my UML.

I have done UML diagrams for years. However, after a while, one tends to get a little bit sloppy. Blending interaction and time transition into a static class diagram, for example. It's so easy to do when one has an understanding of UML, but isn't held to a rigid standard.

The project really forced me to "clean up" and "formalize" my system design documents. At work, if I bleed a little bit of state transition into a class diagram, everyone still understands and gets the gist. However, I am sure that sort of thing would have been penalized on the Java Enterprise Architect Project (as well it should).

It took me over 40 hours. I went at it aggressively, started working on it immediately after getting home from work. At one point, I probably put in an 80 hour week (40 for work, 40 for my Java Enterprise Architect Project).

I learned how to use StarUML, and used it for the Class and Sequence Diagrams.

For the Component and Deployment Diagrams, I used Visio Stencils and Template for UML 2.2.

I learned of the Visio Stencils for UML 2.2 from Jeanne Boyarsky's posting, which was referenced on Coderanch.

Part III: Essays



This part was a proctored sit down and defend/explain aspects of the Project. I enjoy writing, so it was fun. The only thing I felt badly about is that I type extremely fast and tend to like getting my thoughts into words as quickly as possible (trying to get a stream of consciousness into a coherent essay while I have just the right words in my mind), and the keyboards at the testing center were "clicky" keyboards.


By "clicky", I mean, they make a click-klack, click-klack as I typed. Felt badly for other test-takers.

Overall, the Java Enterprise Architect Certification was by far the best learning experience I've ever had in certification series. I've never taken a certification series that involves a challenging hands-on design project prior to this.

I also thought it was really neat that they did not require any particular UML tool, or any particular approach. I had the freedom to design a system using EJBs or Web-container only, SOAP, REST, VMs, cloud, or physical machines.

I just had to clearly define and document a well-designed system that meets the business needs based on JAD session results, BRD, and Use Cases, much like the challenge faced by actual Enterprise Architects in designing solutions for businss problems.