A Legacy Notes Developer's journey into madness.

"You don’t need to know Java to write XPages" and other fables

Devin Olson  October 11 2012 09:19:14 AM
Since the advent of XPages several years ago, I've heard the following mantra more times than I care to remember:

"You don't need to know Java to write XPages"

To which I say HORSE SHIT!!

While you may technically be able to build an XPages application (or several) without knowing Java, you will never be able to build a good one.  I can already sense the naysayers starting to grumble; I'm sorry if you don't like hearing this, but it nevertheless remains the TRUTH.  Urban VIII and the Jesuits didn't like hearing about heliocentrism either.  

The underlying nature of XPages built on JSF means that unless you are writing Java code, EVERYTHING you create in your XPages application must be interpreted and processed at run-time.  All that cool SSJS you write and all those neato controls that you drag onto your XPage are ultimately converted into Java.  All of that conversion takes time to complete, and consumes resources on the server.  Yes, IBM did and awesome job putting all this black magic real-time interpretation / language translation / object mapping uber cool mojo together, and yes it works extremely well; but it still takes time and resources.  When you consider the impact of all those little moments and put a real load on the server, those little moments begin to add up.  

If you have, even at a very basic fundamental level, some knowledge of Java and how the language works you will instinctively begin to build better XPages.  Even if you don't actually write any Java code, a grasp of how things work "under the hood" will help.  

Once you start writing your own Java code and incorporating it into your XPages, they will (unless you write complete crap) perform better, scale better, be more efficient, end world hunger and cause peace to break out everywhere.  

Tim Tripcony wrote an excellent blog post just the other day called pragmatic reasons every Domino developer should learn Java.  I encourage you to go read it.  Now, I like Tim very much (and consider him a good friend), but he is sometimes a bit too nice.  Let me see if I can make the point more simply:

If you don't lean Java you will lose your job and your children will starve.

Take a course (or two), read a book (or two), and invest in yourself and your career.  If you can, try to learn Java OUTSIDE of an XPages environment.  Trust me on this.  I used to teach Java, and even though I've done very little with it since 2002, that experience has made my personal transition from legacy Domino development to XPages much easier.  




SOURCE CONTROL

"DDE has built in design locking and replication, and that is good enough"

To which I say EVEN MORE HORSE SHIT!!

While you may technically be able to build your XPages application without a good source control system in place, you will eventually run into problems with corrupted design notes, conflicts, and other pain-in-the-ass things.   Eclipse makes it INCREDIBLY EASY to add and use a Source (or Version) control system.  It doesn't matter what one you use so much as you USE ONE.  I could rant about this all day, but I have work to do, so I'll leave you with a few links that you should go and read.  Some of them are old, but they are (IMHO even more so now) still extremely relevant.

Jeff Atwood: Check In Early, Check In Often (August 2008)

Rands In Repose: What To Do When You're Screwed (July 2004)

Notes In 9: Xpages, Designer - SOURCE CONTROL!! (January 2012)

Hope this helps,
-Devin.
Comments
No Comments Found

Discussion for this entry is now closed.