Best practice (Part 2: planning & new developers)
Written by Ben Poole on 09 Oct 2002
Categories / keywords: Best practice, beginners, security, infrastructure, design
(click on a term to search for related articles at this site)
Background
When you get a new project in Notes, it's all too easy to just "dive in" and start knocking up forms and views... it's a great RAD tool, and encourages the wholly valid "prototyping" design model.
There's always a but though. Try and plan ahead a little, even if it's just ten minutes with a pad a pen. Some things you might want to consider:
- Complexity:
- Audience(s):
This needs careful consideration. Consider this scenario: you have a database file management suite for your company. End users plug file details into it and perform file management tasks. Support users look after all this, managing exceptions, file archiving, etc., whilst also resolving end-user queries. Meanwhile, other interested parties want to go for the "high level thang", the management information report. You know... the thing that takes the plebs three weeks to produce in the right style, extracting data from the underlying system in a profoundly convoluted way which no-one reads.
This all takes some design work. End users may need just a couple of forms and a couple of views to get the file details logged. Support users need views / folders that allow them to access everything quickly. They may even need some diagnostic tools: agents and such. Miscellaneous interested parties need some form of reporting function... they don't have to have Crystal Reports or whatever to get this you know, you can output information from Notes databases in a variety of ways, not all of them obvious! [Ed: for God's sake, that's another article!]
- Flexibility and the future:
Consider that every view you add to a database means another index and potentially slower loading times for viewers. Every db lookup you add to a form means slower loading times. Here's an example:
Three years ago I had a v1.00 application from my early days. It contained 13 look-up views, 7 bitmap-heavy navigators, and around 32 end-user views. The database template alone was around 4MB (although that was mainly due to the bitmaps in the navigators: I hated r4.5x!)
When I came to code v2.00 of the app in Notes 5, I slashed the number of look-up views to 5, the end user views to 27, and got rid of the navigators. The new template does far more — there's reams more code in it — but it weighs in at 2.3MB now. Forms load approximately 40 - 60% faster too, as I sorted out my lamentable db look-up code. How was all this done? OK, a lot of the efficiency was mainly through what I'd learned about Notes development in the interim, but a hell of a lot of this app's success was down to planning it! I knew exactly what I was going to do with UI code, action bar buttons, form look-ups and so on. We planned the navigation UI up front, and decided on the increased number of admin functions at the start.
OK, so moving on, you can certainly seek to maximise efficiency by using shared resources wherever you can: don't code fifteen agents that all do the same thing to a different field or document... Think about how such functionality could be achieved differently. If you have the luxury of fellow developers, use them! Bounce ideas off of each other, and perform peer code reviews. You will learn a lot, and sometimes a different pair of eyes are just the ticket.
» Best practice (Part 2: planning & new developers) (Ben Poole 09 Oct 2002)
... Re: Best practice (Part 2: planning & new developers) (Ah Tat 18 Dec 2002)
