1

I'm a newbie to xPages but not to Notes. I'm trying to change my thinking to more of a relational schema with this application I'm writing but I would like to verify my architecture with experienced xPagers. Here's my scenario. Tell me whether I'm on the right track or if there's a better way to do this...

I'm programming a product order system. I'm getting Product and Customer information on a mainframe export so I have separate databases that contain the Customer data and the Product Catalog. I have a third database for orders. I'm thinking I have to have two data sources in the Order DB on my order xPage, one for Customer data, one for Product data. Then a third data source for the item repeat control from a form in the order DB. Am I thinking right?

2 Answers2

2

Multiple datasources on a single page is one of the strengths of XPages, as is pulling data from different NSFs to where the design is. It's a requirement for Bluemix, but it's an approach that's key to what I'm doing in the Key Dates demo application on OpenNTF.

If having multiple dominoDocument datasources on a single page, just remember that unless you set ignoreRequestParams="true", regardless of what properties you set, it maps to the document defined by the URL.

Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33
  • Thank you for your suggestions. One question is, am I thinking right with this? Other than agents running in a couple of the databases to load and update the data in the DB, I think I will have all the code in the main Order DB. It will also have data. I don't want to go to extremes and make everything separate. But am I working with the right mindset of xPages? I'll take a look at the demo app on OpenNTF and I'll watch your video David. I appreciate the help. – Mike Gonzalez Oct 05 '15 at 18:22
  • 1
    the key is to keep all your code in 1 database. Wether that db also has data or not doesn't really matter. you don't want to split your code up into other db's as you have different applicationScopes etc.. then... That video probably has the data in 1 db but again... the data can live anywhere... – David Leedy Oct 05 '15 at 18:25
  • @MikeGonzalez: Don't forget to set the white listing feature to prevent security issues: http://www-01.ibm.com/support/docview.wss?uid=swg21960372 – Sven Hasselbach Oct 06 '15 at 11:12
2

There's been several examples of this through the years on NotesIn9 I believe. This show might be interesting to you. But the short story is multiple data databases are ok though you ideally want to keep all your source code in a single .nsf. That source database doesn't need to contain any data itself.

David Leedy
  • 3,583
  • 18
  • 38