The Right Notes

Contributing development ideas to the Lotus Domino community

Coding without Code

Posted by therightnotes on April 17, 2007

One of my goals as a developer is to write as little code as possible.  That’s a bit flip, but it’s true.  I try to code in such a way that it is easy to access, re-do, or re-use code so that when requirements change or get added, the amount of work is required is minimal.

One of the requests that came up last week was to add an email reminder to a database that would send an email to anyone who had not yet submitted a particular form.  The form exists in the database, and the administrator has a view that shows whose documents are outstanding.

When we first designed databases, we knew we’d be sending emails to tell people that documents were available as well as other sorts of reminders.  My design had 3 parts:

  1. a form where the administrators selected the type of reminder, entered the content of the email, and set a date and time for it to be sent;
  2. an agent that checked the dates and times of these documents and sent emails as necessary;
  3. A designer only form that gave a name to the reminders and told the agents where to find the list of people to whom the email should be sent;

Item #3 is what allowed me to add the requested functionality without any code.  All I had to do was create a new document from this desinger form and give it a name (for the administrator to pick from the list) and tell the agent the name of the view where the list to send to could be found and the name of the field where the email address exists.  Once I saved that document, the functionality was immediately available:  no design refresh and no new code required.

Of course, all my code doesn’t come out this way.  But it’s so nice when it does!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>