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
toolbox.
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
exceptional.


Other Recent Stories...

  1. 05/05/2016Is the growing social-sourced economy the modern back door into socialism?Is the growing social-sourced economy the modern back door into socialism? I read a really insightful post a couple of days ago that suggested the use of social network funding sites like “Go Fund Me” and “Kickstarter” have come about and gained popularity in part because the existing economy in no longer serving its purpose for anyone who isn’t already wealthy. Have the traditional ways to get new ventures funded become closed to all but a few who aren’t already connected to them and so onerous as to make ...... 
  2. 04/20/2016Want to be whitelisted? Here are some sensible rules for web site advertisingAn increasing number of websites are now detecting when users have ad-blocking enabled, and refuse to show content unless you "whitelist" their site (disable your ad-blocking for them). I think that is a fair decision on their part, it's how they pay for the site. However, if you want me (and many others) to white list your site, there are some rules you should follow. If you violate these rules, I won't whitelist your site, I'll just find content elsewhere. 1. The total space taken up by advertisements ...... 
  3. 12/30/2015Fantastic new series on Syfy called “The Expanse” – for people who love traditional science fiction[] “The Expanse” is a new science fiction series being broadcast onthe Syfy channelthis winter. It’s closely based on a series of books by author James S. A. Corey beginning with “Leviathan Wakes”. There are 5 books in the “Expanse” series so far. If you’re a fan of the novels you’ll appreciate how closely the books are followed.TIP: The first five episodes are already available on Syfy.com. If you’re having trouble getting into the characters and plot, use those to get up to speed.The worlds created for ...... 
  4. 10/20/2015My suggestion is to stay away from PayAnywhere(dot)com  
  5. 08/07/2015Here is one for you VMWARE gurus - particularly if you run ESXi without fancy drive arrays 
  6. 08/06/2015The Killer of Orphans (Orphan Documents) 
  7. 06/02/2015Homeopathic Marketing: Traveler on my Android is now calling itself VERSE. Allow me to translate that for the IBM Notes community... 
  8. 03/17/2015A review of British Airways Premium Economy Service – How to destroy customer goodwill all at once 
  9. 02/26/2015There's a bug in how @TextToTime() and @ToTime() process date strings related to international standards and browser settings. 
  10. 01/21/2015Delivering two new presentations at Developer Camp (EntwicklerCamp) 2015 in Germany 
Click here for more articles.....


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

Please wait while your document is saved.