Latest Entries »

Disclaimer:  The words that follow are my own and are not representative of Oracle nor it’s subsidiaries.  While I work for one of the leaders in our industry in technology and business I do not write this blog with the intention of representing them.  These thoughts are purely my own and as such I take full responsibility for them.

I have been really struggling with coming up with a post about ADF since I started working in the Fusion Apps development group at Oracle in June of last year.   Firstly, I didn’t want to start posting on how to solve common problems, as there are a lot of blogs out there that already do  this.  A simple google search for whatever problem you are having will reveal this.   Many answers can also be found on YouTube with step by step instructions.   Secondly I didn’t want to sound like an official Oracle blogger giving insight into the direction of the framework – my role at Oracle does not afford me with that ability.   Lastly and probably the most important, I needed to be careful in what I posted as to not give away any trade secrets, specifically how we handle things in Fusion.

So what I decided to do is compare an industry wide common stack that I have used; Hibernate + Spring + JQuery to Oracle’s ADF framework.     This will allow me to steer clear of specifically addressing any Fusion development and allow me to refresh my Hibernate and Spring experience.

So without further ado let me start by making some observations.

Am I A Lazy Programmer? Oh Hell Yeah!!!

First of all I like easy.   With all due respect to Staples, their easy button commercials have nothing to do with buying paper.  It’s me in a nutshell. I really should have a shirt with an easy button on it, stickers on my car, and an easy button on my desk to represent who I am.    I cannot stand to work with anything that has been made overly complicated just to solve problems that rarely come up, while making solving real world every day problems difficult.  I do not like API’s with optional parameters.   I do not like using a bunch of config files just to provide the ability to customize an application that will be customized in only rare circumstances.   If it takes me more than 15 minutes to figure out what I need to pass to your interface to make it do something, your interface is crap.

Secondly I really like writing test code.  I spent 13 years traveling the country trying to implement code that wasn’t well tested.  I learned through this firing squad indoctrination to poor coding practices how utterly important it is that code does not fail when it’s being rolled through the staging process.  Once code is in production errors become incredibly difficult to debug, and by design incredibly expensive to fix.  You do not want your customers dealing with this problem or your reputation will suffer.

Thirdly and this is really an extension of my first point.  I like code that is small.  There is never a need to have methods with 1k lines of logic in them.  That’s a different kind of lazy.   That’s the kind of lazy that says “I want to justify my job by making this so difficult to understand only a Senior level engineer could maintain this.”   Well I want to write code that is so easily understood that a Junior level programmer can pick up what I am doing.   If you don’t agree with this, read the book Clean Code – A Handbook of Agile Software Craftsmanship by Robert Martin.

Lastly I am an examples guy.   Documentation if it’s crystal clear and straight forward is helpful.  However in most instances it’s written by a developer for a developer who has intimate knowledge of the subject at hand and and it’s usually out of date.    Maybe this stems from how I learn – by doing rather than by just reading or listening.  How I came to learn this way I will never know, but if I don’t see examples and only see poorly written documentation I will not be recommending your framework to my colleagues.

So anything I say from this point forward should take these statements into account.
My Impressions of Hibernate+Spring+JQuery and ADF

Spring is easy to learn and incorporates two very popular design patterns right out of the box.   IOC (aka dependency injection) and the MVC pattern.   Lately I have been asking all the candidates I interview about the MVC pattern and I am often utterly blown away by how little most know about this.  Most candidates get confused about what a controller is, and where the business logic lies.  But, even the ones that seemingly know the pattern don’t know why a project team would choose to use it.   Very few(like 5%) knows what IOC is or if it’s useful in testing.   I am not sure why this is, but it seems to stem from the fact that very few people test their code.

Spring makes Dependency Injection incredibly easy, thus giving the programmer the ability to mock objects and test logic flows.

Also a simple google search will return hundreds of thousands of hits with real implementation examples on how to deal with particular issues.  So that is a huge plus for Spring + Hibernate + JQuery.

But ultimately using 3 different frameworks has it’s challenges too.

It is easy to create an ADF application without knowing ADF at all.  Yes this is the case and as a matter of self preservation, I can’t say that I am overly supportive of that.    There are a multitude of demos on the Oracle ADF site that detail exactly how you can create pretty complicated web apps rather quickly   These examples provide a great way to learn how to implement the different concepts in ADF, though they don’t teach you  a great deal about why you would make certain design decisions.

ADF is very much based on the MVC pattern, as well as a few other important ones such as the Business Delegate, the DAO pattern, and of course the Singleton pattern.  Many others are used but these are the most frequently interacted with.

With that said, ADF is not easy to learn.  Sure you can turn around a few apps really easily but beyond that when you start asking all the how to, or better yet, “how best to” questions, this is where it can get fairly complicated.  On this I am still withholding judgement because I am inclined to understand that its intention is the whole web application stack.

One of the main differences between ADF and Spring is that Spring is an application framework, but it’s not an ORM or a view component library.  You often have to implement much of the ajax code between the user interface and the backend with different helper libraries.   ADF as a single framework, also encompasses the ORM layer and the Component View layer.   This gives the programmer the freedom to not have to worry about so much plumbing.   In ADF I never have to create Entity Objects, then wire them in a config file.  Creating specialized views of data, so as not to expose everything within a table or even an entity object to a consumer of my model objects is also extremely easy in ADF.   This is why I have decided to not just include Spring in my analysis of the two frameworks but instead also include Hibernate and JQuery.

So stay tuned while I dive deep into these two application stacks and compare many of the pluses and the minuses I have found while using them.

Why I Hate Best Buy!

I need to give a shout out to two companies I have dealt with recently.

Garmin; My wife bought me a Garmin Forerunner 610 GPS watch back for Christmas. In March of this year the band broke. I called them up, gave them my S/N and they sent me a set of replacement bands without even charging shipping costs.   

Black Diamond; I sent them an email saying the headlamp I bought in the Fall is not recharging. They responded by telling me that they will send me a replacement one after I returned the one I had.  This might take a few weeks as we exchange but they didn’t even attempt to ask me when I had purchased it.

Compare that to the service you get at Best Buy.   Take the example of my wife who after 32 days decided to return a set of head phones that did not fit well in her ears well.  She wore the headphones once, and they cost $20.  After explaining the problem with the headphones to the service personel they told her that their policy is 30 days and they can’t open up there return policy to everyone because they risk losing a lot of money.  Really?  Do you know how much money you will lose for being a horrible company? 

Guess what, now I am a Garmin and a Black Diamond lifetime customer. At the same time, I will never, under threat of death, step foot inside a Best Buy ever again.

Long Time no Posts!

It’s been a while since I have published my thoughts on technology here in this space but I intend to change that.

The reason for my absence has been 3 fold.

1.) The job at Oracle has really caused me to be focused on learning the Fusion stack as well as ADF.  One alone would be a monumental task, but both at the same time has been a bit like climbing Everest.(which is a recommended task if you can)  I intend to comment on this, but I will have to be careful not to give away to many trade secrets.

2.) The birth of my son.    He is my world now, and getting time away to share my thoughts on technology just hasn’t been as much fun as watching the little guy grow.    Some day if he reads this, I want him to know he is the greatest gift ever!   He was born 6 weeks early, and his first week in this world was spent in the NICU.

3) Marathon Training – you may or may not be surprised by how much time this takes.

However there are a lot of subjects in the near future I want to comment on.

  • ADF
  • Enterprise Application Development
  • Testing

Two recent books I have read –

  • What Would Google Do
  • The Biography of Steve Jobs

Personal Tech

  • The technology that keeps kids alive in a NICU
  • My new GPS watch from Garmin.

Lastly recent interviews I have done and the trends I am seeing.

More On Find

At Oracle we do our development on Linux VMs running in one of our Data Centers.   Because of this I have had to get real familiar with various linux/unix commands.   I find this one particularly useful.

find . -name “*.jar” | while read LINE; do grep STRTOFIND “$LINE”;done

For STRTOFIND replace this with a classname and it will print the .jar’s that reference that class.

I have made a move into the ADF world as I have returned back to Oracle to continue on my career path. The next series of articles will deal with ADF ramp up and my impressions of the technology as I get used to using it.

Grep For It

Ever try to find a file with a particular character starting a line.

Try this..

grep -H -r ‘^W’ *.*

This will print out the file and the text of the line that matches your regular expression.  In this case ^W means lines starting with a capitol W.

After months of waiting, we have finally upgraded our Fascinate to Android 2.2.  The actual act of upgrading was relatively painless, however the upgrade install and the results were typical Verizon foolishness.  All you need to do is head to Menu > Settings > About Phone System Updates > and check for updates.

Then the update will start downloading to your phone.  After it has been downloaded and the install begins, your phone will be rebooted and it will start with a flashing Verizon logo.  That logo will stay there for what seemed like 5-6 minutes as the OS is installed.    The screen will then come up, but it will only show your top bar and nothing else for a little while.  I wish there was a better notification at both times about the OS being installed because while this was going on, it was my wife’s reaction to try to turn off the phone.  We almost even pulled the battery out as it looked like it was hung.

After the phone is rebooted and the OS is installed and working, you will notice that your icons, application shortcuts, and your widgets are now gone.  Why Verizon has to mess with that I will never know.  I get the concept of upgrading your users to a more stable release of a product, which Android 2.2 clearly is.  I can even understand that it took Verizon 8 months to get confident enough in the upgrade process that this wouldn’t break, or severely hinder their user bases’ ability to use their phones.  But to be honest most people won’t notice the changes to the phone.    But they will notice that their icons and widgets are gone and the the standard icons and widgets are back on.  This leaves a bad taste in people’s mouth.

Their QA process should have taken this into account.
Here is the list of new features.

In order to give your Android Application access to the Internet you must set the permission within the Android Manifest File.

<uses-permission android:name=”android.permission.INTERNET”></uses-permission>

This should be outside the Application Node.

 

Carbonite Off Site Backup

So I have decided to backup my main hard drive using the Carbonite software and backup system.    I say main hard drive because one of the biggest drawbacks of this method is that it doesn’t support external USB drives.   The inital backup understandably is extremely slow.  For instance after about 20 hrs, on a backup of about 24GBs it’s only 12% done.    The cost is about 55 dollars a year per computer but with each computer you can have unlimited amounts of data.   Whether you have 20MBs or 1TB it’s the same cost.

Once you have all of your data in the cloud, you can access it from your phone via a downloadable Carbonite application or another computer through the web interface.   It’s completely secure and uses an encryption algorithm similar to what your banking institution uses.

If you computer ever crashes and you need to restore your files, you simply run the restore command and it will download all of the files you have previously stored on the Carbonite servers to your hard drive.  Though as with the initial upload this might take a while.

Once all of your data is transfered to the cloud Carbonite runs in the background uploading new and changed files making the backup experience worry free.

If your computer becomes sluggish because of the constant uploads, I would suggest two things.   Change the backup schedule to update your backups during a time when you’re not working.  Or turn the CarboniteService off through windows services when you are actively using your computer then turn it back on when you walk away.

As anyone who has owned multiple computers over the years can attest, hard drives die, computers overheat and melt(when you are walking through security – true story), and accidents happen.   By choosing a good backup system, you can work on your laptop or desktop knowing no matter what happens you have a good quality backup system in place that is always backing up your most important data.

 

 

When you want to go back into root and change something remember these commands.

  1. adb shell
  2. su
  3. mount -o rw,remount /dev/block/system /system
  4. exit

This is very helpful when you are trying to update to Froyo.

Follow

Get every new post delivered to your Inbox.

Join 146 other followers