I’m looking for opinions on this. I’m about to develop an application in which users will create documents using form A, and then optionally create related (not response) documents based on forms B, C, etc. Some of the information from form A will need to be duplicated on the other forms, and all the related documents will share a common id number (key). All of this will be done via web browsers.
I’m kind of new do Domino development, but I’ve got a lot of experience in “traditional” programming. In that world, this would be a no-brainer – I’d create a different table for each form, and I’d link them together as necessary to show the common information.
But Domino seems to be different, and the web aspect adds another difference. In some apps, I’ve seen the developer create one big form incorporating A, B, C, etc., and just show or hide the different sections as appropriate. In other apps I’ve seen the developer create different forms and duplicate the information across all of them.
Is there a “best practice” here, or is it just a case of “it depends” or “whatever floats your boat”?
Subject: Web development: 1 form or multiple forms?
Thanks for the replies. I think multiple forms with a common subform makes the most sense. I don’t expect to have more than one B or C for each A, but I do want to be able to gather all the B’s together (same with the C’s) and deal with them as a group. I think having all the information in one big document would make that kind of crazy.
Stan – I liked the floating boats comment. Very well put!
Subject: Web development: 1 form or multiple forms?
It depends. Yes, Notes (and therefore Domino) is not relational (at least not “Notes classic” – the DB2 option on Notes 7 brings some changes to the table). Whether you use one form or three depends on what you need to do with the documents. If you need separate documents (records, if you will), then you’ll need to duplicate information. For instance, if there will be more than one B or C for every A, then you can’t simply throw everything onto one document. If you need to have different access to different documents, they obviously can’t all be the SAME document.
So if you have different documents, should you use different forms? Darned tootin’. That is not to say that you can’t maintain common features – that’s why the God of Domino invented subforms. But DON’T use computed subforms unless you absolutely have to – they are a good dietary source of slowness and non-scalability. Put your common stuff onto subforms that make sense at the modular level, and apply them directly to the forms. This gives you a single point of maintenance, which is a good thing. Why separate forms? The Form item on a document is special, and is a much more efficient item to search (for view indexing and so forth). Every little bit helps.
There’s usually more than one way to do something in Notes, so there is a lot of experimental boat floating going on, but a lot of what looks like floating is really just running aground.