Digging into the code for the example database – aaaah memories – but I digress…..as normal I am mostly blogging this for my own notes and if someone else happens to get something out of it – great 😀
Design and Data are separate?
So the design and the data are separate – well kinda – in fact “some” of the design is separate and “all” of the data is. Following the instructions on how to deploy the starter code and mess with it I managed to change the database and add a new XPage.
BTW for those who cannot find “Start Coding” it is here….took me ages to find it in front of my nose
So the database look like this in the notes client – pretty normal
and viewing the design of this database we can see forms, views and No XPages of worth
The data can be changed through the notes client and immediately represented on the website
Looking at the boilerplate code which was downloaded from starter code we can see – no data, no form, no views – but there are the XPages
New design elements
So I created a XPage in the Design database and followed the instructions on deploying the new code – it worked
Adding a new form to the VIEW database, failed.
Adding a new form to the DESIGN database worked just fine
Conclusion – So where is everything again?
Views and Data are in the NoSQL database
XPages and Forms and in the Design database
There is a lot to learn here……..and a lot of questions….
3 thoughts on “XPages in Bluemix – where is the design and where is the data?”
Howdy. I think I should clarify one thing you talk about here. The design nsf should only really be used for your XPages and custom controls. The forms, views and data going in the data NSF.
You say that adding a form to the data nsf failed, but that’s not quite true. The form exists, it’s just that you can’t preview it directly in the browser at a URL like “http://xpages.mybluemix.net/ToDo_design.nsf/HiMarky”, because the form is not in that design DB. Just like you can’t preview the “todo” form that is part of the boiler plate data nsf from the start at a similar address. But as you have seen already, you can create new todos, save/edit/delete etc. The todo form exists in the data NSF, the design side XPage uses that form as a data source and it all works out of the box. (If you really want, you could preview the form in browser at url like: https://xpages.mybluemix.net/bluemix/mary-rodens-org/markys-space/tododata.nsf/todo
In the long run you wouldn’t be previewing a form directly in the browser anyway (I don’t think), you would be using it as a data source in an XPage and binding to the fields etc. If you put your form in the design nsf, it will save data to the design nsf, and you run the risk of losing data.
Long story short: [data NSF = forms + views + data], [design NSF = XPages + custom controls]
Thanks Brian – that is exactly the kind of information we need 🙂
Reblogged this on Dinesh Ram Kali..