Andrew Pollack's Blog

Technology, Family, Entertainment, Politics, and Random Noise

Making progress working with TrialandErrorPages. Some things I've learned

By Andrew Pollack on 03/01/2012 at 08:35 PM EST

Warning. Despite finally getting to the point where my XPage does the things I want it to do and finally having the code patterns I wanted to start building a real application that users will interact with, I'm writing this blog post entirely in sarcasm font, specifically to blow off steam after an incredibly frustrating day working with this environment. If you came here looking for deep technical insights for xpages -- you're really too early. I don't have any yet. What I can offer are opinions born of frustration piled high, and somewhat assuaged by a bit of success thanks to a whole lot of trial and error and some help from notable xpages leaders in the community.

Some observations:

1. If you thought there were way too many options placed in obscure locations that are hard to find, you're not looking hard enough. There are at least 100 times more than just "way too many".
2. That option doesn't do what you think it does. No matter which options we're talking about, or what you think it does. The truth is, it doesn't do that. That's why I've renamed XPages to "TrialAndErrorPages".
3. ....

Ok, seriously -- there are a few things worth knowing if you're new to coding on xpages. There are lots of good demos and specific "how-to" articles. To all that hard work, I add the following mostly usesless observations...

1. Creating an XPage is far more different from creating any other kind of page than you'd think. It's nothing at all like a form with some pass through HTML and a lot of rendering. An XPage is more like a compiled program that spits out code to the user when it wants to. The reason that's important is that most of what you do gets translated a couple of times before the browser sees it. You're not creating a web page with the xpage development tool. You're creating an application that creates a web page. If it wants to.

2. For the love of all that you hold dear, the first thing you need to do is drop a "[Display Errors]" control on the page.

3, Some people really like the fact that no matter how deep you dig, there's always another option, event, property, or method you can dig up to do some new obscure thing with XPages. No, really, I've seen people write this on public postings. I'm not one of those people. I'm used to programming languages like C -- or even just javascript -- where you have a fairly small number of very general but powerful commands and you put them together in really interesting ways to make things work. XPages is the opposite of that. XPages is like those Lego sets that came out in the late 80s and early 90s where if you followed the instructions exactly you'd get a thing just like on the box picture -- but so many of the pieces were specially made just for that purpose that you never really had as much fun with it as you did with the old general use sets.

I'm done ranting now. Maybe tomorrow I'll have nicer things to say about XPages, because when all is said and done -- we're all going to have to use them as long as we stay with Domino.

There are  - loading -  comments....

re: Making progress working with TrialandErrorPages. Some things I've learnedBy Richard Moy on 03/01/2012 at 09:57 PM EST
It has been interesting reading your blog about your entry into XPages. XPages
is a very powerful set of application development tools that has so many
different things in it including bugs that is take a long time to learn and get
good at. So far the only thing I am using it for is XAgents which I use with my
UX Pages framework. I find it lot easier to code and port with this
framework. Keep on going at it. Eventually you will be able to get the hang
of things.
re: Making progress working with TrialandErrorPages. Some things I've learnedBy Sean Cull on 03/02/2012 at 03:22 AM EST
I like the phrase "TrailandErrorPages" - it does sum up the approach that you
need to take to learn XPages. The key is to try and learn by the errors and
discovery's of others as much as you can.

Having said that once you have your design patterns ( or have stolen a few )
and become more comfortable with it then it is a very powerful platform.

I know I have posted several XPage bugs on my blog recently but they are very
much the exception rather than the rule in 8.5.3. They also tend to be to do
with XPINC.

XPINC itself is amazing - to be able to write a rich replicating application
once for both offline and browser is very impressive.

Don't get me wrong, I think the lack of documentation, a debugger ( why am I
the only one that routinely mentions this ? ) and daily DDE crashes are a major
pain but we are producing good stuff.

As a parting thought I would also say that XPages is not for every application.
I still think it takes at least 100% longer to do an application in XPages.
This number is reducing as we gain experience and as IBM add extensions but it
is still a big number.

The reasons for the longer development times are : more choice in what to do,
more time to write, much more time to debug ( if you write crappy code like me
) , more time to test ( ie, firefox, chrome, XPINC, and all versions of below ).

The testing is also an issue in that many XPage run time errors will not appear
until you actually try and fun that particular ssjs line of code. If you are
too complacent and make a change without testing every aspect of its impact you
can easily get caught out.

The OpenNTF Xpages Debug Toolbar helps a lot.

You also need to be aware that we were spoilt as Notes developers in the way an
app could be rolled from version 3 > 8.x. This kind of thing doesn't seem to be
the norm on other platforms including XPages.

As a last thought make sure you check out repeats and especially repeats using
data within the same form - it is the most impressive feature in my opinion.
Imagine you have a form like a survey with 20 very similar fields. You can
develop a repeat defining how those feels are represented and then use it to
display an infinite ( well almost ) number of fields from the back end e.g.
city_1, state_1, country_1
city_2, state_2 etc....

Doing something like this is one of the areas where it becomes more efficient
to use XPages than traditional Notes because the impact of needing to make a
change is much less - you only change it in one place.

About 30% of our business recently has been XPages for non Domino shops.

Please keep up the feedback, XPages is like learning to drive - at first you
never understand how other people manage to do it and afterwards you wonder
where the difficulty was. It is important that the people who have been through
the learning curve are reminded what it was like so that they can make it
easier for others.
re: Making progress working with TrialandErrorPages. Some things I've learnedBy Sean Cull on 03/02/2012 at 03:24 AM EST
This what happens when you are writing comments while feeding children, you get
both last thoughts and parting thoughts !
re: Making progress working with TrialandErrorPages. Some things I've learnedBy Andrew Pollack on 03/02/2012 at 07:27 AM EST
I think that percentage will go up. Whether I like it or not, clearly xpages
is the development platform for Domino apps going forward.
re: Making progress working with TrialandErrorPages. Some things I've learnedBy Henning Heinz on 03/02/2012 at 04:49 AM EST
It cannot be that bad as you are still working with it.
not be that bad?By Andrew Pollack on 03/02/2012 at 07:32 AM EST
Well, honestly Henning, it is mostly a resignation on my part to the
recognition that like it or not, it is how Domino web development will be done
moving forward.

XPages does have some real power. The ability to bind the UI to multiple data
sources on the same page and for those to update using the built in ajax style
wiring is really good stuff.

That's what frustrates me the most. If the damn thing weren't so badly built
from a development tool UI perspective, it would be a real joy to work with.
Instead, it's like trying to build fine furniture with a child's first toy
re: not be that bad?By Tim Tripcony on 03/02/2012 at 11:46 AM EST
The irony is that the tooling is intended specifically for noobs. You made a
crucial observation in this post: the XML is not, as most surmise and even the
editor implies, the source code of your app. Rather, it is simply an
instruction set for Designer to tell it what code to generate. The theoretical
brilliance of XPages is that it allows developers to create true J2EE apps
without ever writing a single line of Java. In practice, those who never dive
into what Java is actually running when the app is accessed don't understand
the framework... or even how the application they're writing actually works.
Not only will you gain performance improvements by writing more of the Java
yourself, but you'll gain insight into what actually happens when the code
executes. Hence, less trial and error, more intentional development. As an
added bonus, the IDE mostly gets out of the way... with the exception of the
Java class editor - the one portion of Eclipse that has always been

Other Recent Stories...

  1. 01/26/2023Better Running VirtualBox or VMWARE Virtual Machines on Windows 10+ Forgive me, Reader, for I have sinned. I has been nearly 3 years since my last blog entry. The truth is, I haven't had much to say that was worthy of more than a basic social media post -- until today. For my current work, I was assigned a new laptop. It's a real powerhouse machine with 14 processor cores and 64 gigs of ram. It should be perfect for running my development environment in a virtual machine, but it wasn't. VirtualBox was barely starting, and no matter how many features I turned off, it could ...... 
  2. 04/04/2020How many Ventilators for the price of those tanks the Pentagon didn't even want?This goes WAY beyond Trump or Obama. This is decades of poor planning and poor use of funds. Certainly it should have been addressed in the Trump, Obama, Bush, Clinton, Bush, and Reagan administrations -- all of which were well aware of the implications of a pandemic. I want a military prepared to help us, not just hurt other people. As an American I expect that with the ridiculous funding of our military might, we are prepared for damn near everything. Not just killing people and breaking things, but ...... 
  3. 01/28/2020Copyright Troll WarningThere's a copyright troll firm that has automated reverse-image searches and goes around looking for any posted images that they can make a quick copyright claim on. This is not quite a scam because it's technically legal, but it's run very much like a scam. This company works with a few "clients" that have vast repositories of copyrighted images. The trolls do a reverse web search on those images looking for hits. When they find one on a site that looks like someone they can scare, they work it like ...... 
  4. 03/26/2019Undestanding how OAUTH scopes will bring the concept of APPS to your Domino server 
  5. 02/05/2019Toro Yard Equipment - Not really a premium brand as far as I am concerned 
  6. 10/08/2018Will you be at the NYC Launch Event for HCL Domino v10 -- Find me! 
  7. 09/04/2018With two big projects on hold, I suddenly find myself very available for new short and long term projects.  
  8. 07/13/2018Who is HCL and why is it a good thing that they are now the ones behind Notes and Domino? 
  9. 03/21/2018Domino Apps on IOS is a Game Changer. Quit holding back. 
  10. 02/15/2018Andrew’s Proposed Gun Laws 
Click here for more articles.....

pen icon Comment Entry
Your Name
*Your Email
* Your email address is required, but not displayed.
Your thoughts....
Remember Me  

Please wait while your document is saved.