iA


XP on Domino

by jcf. Average Reading Time: about 2 minutes.

Ben Poole mentions Testing 1,2,3 in the Notes/Domino context (of course taken from the Xtreme Programming school of thought. He links to Duffbert’s XP experiences.

Let me chime in with my experience on TestingFirst with Notes. I worked on a large Domino project last year with a team of 5 other people. I tried to get some XP into the group (but failed – there just wasn’t enough interest from the other team members… another story).

From an earlier project I had a NotesUnit Lotusscript class that I expanded and made usable. I tried to use it – I tried hard, really hard. Ultimately I just gave up on using it. Not because I find TestingFirst a wrong thing to do – not at all. It was because the Notes development environment sucks. Our project grew and grew. We built an elaborate LotusScript class library – with about 50-70 classes. Two of us wrote test cases, and tried to execute them every time we changed something. The Notes guys will know that this is not a simple thing to do (You have to run an agent – either locally, or as in our case, on the web server). This turned out to be a slow and complicated process – made worse by the way the LotusScript compiler handles compiling dependecies when base classes change (It doesn’t handle dependencies at all – you have to recompile them by hand. We ended up writing our own Classes to generate the dependency tree and compile everything) Then we hit the infamous 64k barrier on size of code – which meant we had to move our code into many smaller libraries (which kills run time behaviour, because the Domino server loads all of the libraries, everytime an agent that uses them is executed) or into fewer, larger libraries that were maintained in external LSS files. We opted for that – but those of you who have been there, know that you’re on your own when you have to debug the code. The compiler doesn’t help you anymore – it just flags the whole file as being in error – it doesn’t even tell you a line number when you make a typo.) The test-first methodology just didn’t help. Testing wasn’t anything that was unobtrusive – as it should be in the XP sense, but a major undertaking. But then coding this beast was becoming a major undertaking. My experiences: NotesUnit works (If there is enough interest from you guys, I’ll dig it out and make it available) but the Notes IDE is so bad that it makes grown people cry – specially when you’re in large projects. I haven’t had much hands-on time with Notes 6, and I haven’t done a project yet with it – but from what I’ve seen, I doubt that there was much progress in that department – let me know if I’m wrong. Test first is a great idea, if you code in a language with an IDE that helps you and doesn’t throw rocks at you at all times but imo Notes is not ripe yet. And that is real shame!

6 comments on ‘XP on Domino’

  1. Ben Poole says:

    Great post, thanks for that. I’ve been thinking about automated testing for some time in Notes, and just couldn’t come up with a satisfactory tool design; it’s good to know someone else has found this troublesome also!

  2. Tom Duff says:

    You might want to make it available, as there’s some interest in this area. I agree that it’s not something that’s a walk in the park…

  3. Very interesting. As I mentioned in my own blog recently (http://smokey.rhs.com/web/blog/rhs.nsf/stories/TestingandExtremeProgramming), I’m considering submitting a proposal for a Lotusphere session about testing Notes/Domino apps, and adding some discussion of XP to the topic seems like it might be a good idea. I’m interested in hearing more of both positive and negative thoughts and experiences with XP in the Notes/Domino world.

    -rich

  4. jonvon says:

    wow, this really strikes a few chords in the old noggin. i just got through with a project where i coded a whole bunch of lotusscript classes. i also hit that 64k barrier at some point. and had the problems with having to save everything whenever private (private!) variables would change, etc…

    wow, what a pain. but overall it was worth it. my project wasn’t as big as yours though, sounds like…

    as i go back and add little pieces of this and that, doing clean up and whatnot, its nice to know that the classes are at least self contained and i can reference various methods and whatnot and it always does the same thing.

  5. JC, reading through your blog makes me feel both happy and unhappy. Happy to see you again and unhappy in this case of XP and Domino. Had my thoughts about this, too. But even if we might be able to handle script testing (we are not even near your approach, but I will stop it with that information), testing the rest of that “code mix” in formulas, html code, JS is a real long term issue in Domino development. I really like the idea of XP, forcing some of it’s methods in my team, but testing, though a core feature, nowadays does not work.

    CU, JCF.

    Andreas

  6. Ben Poole says:

    Just returning to an old post ;o)

    Readers might be interested in Nik Shenoy’s work here, LSUnit:
    LSUnit

    Certainly this stuff is limited in Domino, specifically: no reflection, and we’re only testing custom classes, but hey, it’s better than nothing ;o)

Leave a Reply