LotusScript vs. JavaScript: frameworks, code reuse, OO (please help)
So far, I have been exclusively developing for the Lotus Notes client. It is what suits us best, it is what we can sell our customers and thus a logical choice.
Web application development has become much more interesting with the introduction of the XPages and even more so with the ability to use the XPages in the Notes client. Last year, I created our first production XPages application, a simple application that uses a customer supplied ticket ID to do a lookup in our main help desk application and then returns the status to the customer. With all recent talk about the future of Lotus Notes and Project Vulcan, it is evident that the XPages are going to be a developer's tool of choice in the years to come. Which means that in some point in time we will be switching to XPages and JavaScript as our main application delivery platform. It makes sense to me - the XPages seem to lift development to a completely new level and help solve many of nagging problems with classic Notes development. Furthermore, possibility to use same application without any modification whatsoever in both Notes client and web browser is a huge bonus. Which brings me to the topic of this post. Like many others, we have created an application development framework based on the object-oriented features of LotusScript. It did take some time and to a novice Lotus Notes developer it might be more difficult than traditional approach, but in the end it really helps. It becomes easier to develop applications, code is easily reused (simply inherit base classes from a common template!), error fixes get automatically pushed. We have created a rather elaborate set of classes for working with both frontend and backend parts. In the frontend, for example, we have classes that make setting up field validation or field auditing as simple as putting the names of the fields to validate / audit in a special field on the form. In the backend there are classes for reporting, integration with ERP and other Notes databases. If we move completely to XPages, most of these classes will become obsolete and unusable. I know there are ways to wrap LotusScript so that it can be used in XPages, but it is not very elegant, still requires modification to the original LotusScript code and is probably just meant to be an interim step. So, what is alternative to elaborate LotusScript frameworks? JavaScript libraries and Custom Controls surely help, but they don't seem to be as flexible and as powerful as OO-spiced LotusScript. Is Java the only solution? But then, we lose the simplicity (and familiarity to LotusScript developers) of JavaScript. On the other hand, that could be the just the right reason to finally sit down and learn Java properly. I am interested to learn what much more experienced XPages developers (and there are many of those!) think about this. Please, share your thoughts. I am sure this will be of interest to many others.