An application is composed of several pieces. There is the user interface, which is the part the end user interacts with. Then there is the raw data; the substance of what the application is tracking. Between these is the business logic. It defines the
operations to perform on the data when the user conducts a certain operation through the user interface, or how to present interpretations of that data to the user.
Most Notes applications encode this business logic in number of places. It can be on forms, in agents, script libraries, action bars, and many other places. They may even reside outside of the application altogether in a service called remotely. Adding an XPage front end to an existing Notes application allows you to present a new, web-based user interface to the users. However it still has to interact with the back end data in the same way that your previous user interface did. To minimize the amount of work done in creating this new interface, it is desirable to re-use as much of that business logic as possible.
In some cases, your existing business logic will automatically be called. For dominoDocument
datasources on an XPage that are bound to an underlying Form
with validation logic
, the computeWithForm
property can be set to trigger this logic. This can be triggered on onLoad, onSave, or onBoth for that dominoDocument.
But in other cases, such as an action on an action bar that's been attached to a view or form, there is no XPage equivalent.
Here are some techniques you can use to leverage your existing business logic investment with a new Xpage front end.
It's worth stating that the assumption we've made so far is that you have a strong investment in existing, complicated business logic. The above methods can expose that logic, but in most cases there is a price in performance. Depending on the load on your application, this can vary between inconsequential, and considerable.