dominoGuru.com

Your Development & Design Resource

Questions (and Answers) from the dominoGuru.com Mail Bag!

It makes me wanna wag my 
tail... I publish my email address (ctoohey@dominoguru.com) for a reason: I want to hear from you. I enjoy the daily brain-buster questions I get from the greater online community, as they are often opportunities to see how other professionals leverage specific technologies and -- in most cases -- how those technologies (or solutions via those technologies) are perceived.

Some times it's sending a quick email with a link to an article or download that addresses the sender's question (or at least points them in the right direction). Other times, they result in the creation of site content (articles, downloads, etc.).

I thought I'd take a few minutes this morning to answer some of these emails, and offer to make this a monthly feedback segment on the site.

Our first email:

I am an experienced Domino developer (for 15+ years) but haven't gotten too far out of developing for the Notes client; just a few simple web apps, a bit of javascript, etc.

I have a customer with an slightly outdated website that runs on a Domino server, but their previous website consultants created a mostly .asp/html site on top of Domino; content management is via Domino dbs. They put in quite a bit of effort and expense into this website and don't want to reinvent everything, but their marketing folks are lamenting the current iframe approach which is causing a lot of search engine optimization (SEO) issues. So they want to get away from the iframes, but keep the site running on Domino and I had suggested looking into xPages which seems (from my very limited knowledge) to be a more up to date approach and should allow for better page design resulting in better SEO.

My questions:

  • Is this a valid assumption? Doing some rewriting in xPages will allow for less dependency on iFrames with similar look and feel?
  • Is there a way to rewrite pages (removing iframes) to continue to use the .asp content and not recreate all pages (several dozen) but 'include' them as is?

IFRAME Elements are evil. They should only be used when you want to create pseudo-AJAX functionality and only then. It's like using a Frameset Design Element for an IBM Lotus Notes Domino Web Application... <shudder>

Luckily, XPages is here to save the day!

If your content is managed via a IBM Lotus Notes Domino Databases but delivered via an ASP front-end, your best bet is to use the ASP Include Directive.

Your include can be in HTML format, and this is where XPages can really deliver the goods.

During one of my upcoming developer2010 sessions, I show how you can create an XPages HTTP Request Proxy. The XPages HTTP Request Proxy will consume the HTTP Request and perform CRUD functions on a remotely-defined Data Source (NotesDatabase).

Same idea here, really. You create a simple single-purpose NotesDatabase with an XPage. Let's take a look at an example:

In our ASP page:

<html>
<body>
<h1>Hello World</h1>
<p><!--#include file="rp.nsf/proxy.xsp?open&key=abc123"--></p>
</body>
</html>

Now, our proxy.xsp will simply set it's NotesDocument Data Source to the NotesDatabase storing your site markup with a lookup using the QueryString Parameter key.

Why they're using ASP and not the native Domino HTTP stack though is beyond me...

Our next email:

(The subject of this email was tongue-in-cheek titled "Yer RSS feed sucks!").

My reading of your blog would double, at least, if you had the option to provide a feed of your entire posts instead of teaser/summaries. I don't know if I'm the exception or the rule in this. I do know that I'm someone who cares enough to constructively complain.

... why the hell do I give out my email address again?! You people suck!

The RSS feed was a knee-jerk reaction to me borking the NotesDatabase Design that runs this site... and as I mentioned, I didn't have a good backup.

The current site design was in the wings for a while, but things like RSS feeds (needing to escape certain markup, forcing absolute URLs, etc.) was not something that I was worried about when the alarm bells were going off in my head.

I'm still not happy with the function of this site, and need to sit down and put together an actual project plan to move to a more updated design and improved user experience for both the reader and the content author (... me).

One of the things I can do, though, is modify the RSS feed to include full-content from each post. It's been requested by more than one person, so I know it's a problem area on this site.

Expect to see an announcement soon of the full-content change in the RSS feed.

Our last email of the day:

I am student and writing closing job. Can you give me example how to create question pool Form in lotus domino designer? I search over the internet and can't find.. Result should be visible in the second form.

I love hearing that more and more students are getting into IBM Lotus Notes Domino application development.

I have also said in the past that we really need some Hello World-style development guides for professionals (and students!) new to the platform.

The ideal place for this would be the IBM Lotus Product Wikis... but we first need someone to write them up. Perhaps I'll talk to the Wiki team and see if we can come up with a remote residency (that I will actually participate in!).

But back to the email/question...

What you'll want -- and we're talking Hello World here -- is the following:

  • Form Design Element: poll

    This Form will contain three (3) Fields (question, answers, and status.) and will act as the Default Form Design Element for our NotesDatabase.

  • Form Design Element: poll_active

    This Form will contain three (3) Fields (question, answers), and SaveOptions) and will act as an functional event controller for our NotesDatabase.

  • Form Design Element: response

    This Form will contain two (2) Fields (answer and author.) and will act as Response Document to the poll.

  • View Design Element: polls_all

    A simple View to display all polls.

  • View Design Element: polls_active

    A simple View to display all polls, with the Form Formula set to "poll_active" and a View Selection Formula set to display all active-Status polls.

From here, it's pretty simple. The poll will be setup with the question and any answers you wish to offer.

The poll-taker will be using the polls_active View, which will launch the poll_active Form Design Element. On the QuerySave Event of the poll_active (which will have the SaveOptions set to "0") will instead create a Response NotesDocument populating the answer and author.

I'd put together a sample app for this... but it's a simple enough exercise (and I don't want to give the student his final exam app directly!).

In closing..

A long post, but hopefully you enjoyed it. If you have any questions, feel free to send them over via email and I'll include them in what may very well become a monthly segment on this site.


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.