|
Object-oriented (OO) programming is a worthy goal. It can help you write code that is structured, well organized, easy to test, and simple to maintain. Unfortunately, LotusScript is not a true OO language in that it doesn’t have features such as interfaces, static class members, exceptions and exception handlers, and support for Inversion of Control (IoC). You can gain all the benefits of OO programming with LotusScript by adopting the Foconis Object Framework (FOF), which is a production-ready, free, open-source LotusScript library. You can download the FOF and use it as is. The FOF adds the features and concepts that other OO languages already have built in. Plus, it gives you dynamic loading of code libraries, which can noticeably speed up the performance of your applications.
This two-part article helps you get started working with the FOF. In part 1, we introduce you to the framework, explaining its architecture and features, as well as the merits of using it for your own work. We demonstrate how to use its classes and create new classes of your own. By the end of part 2, which goes into detail on creating and using interfaces, error handling, and more, you will have a profound understanding of the features that the FOF core classes add to LotusScript.
All example code, including the framework itself, is available for download using the link at the top of this page. By downloading the demo code and following the examples, you gain a full-featured and completely “wired” database that you can use as a solid groundwork for your projects, including FOF-based handlers for forms, views, and even database events such as queryDocumentDelete.
|