I recently wrote about some of the things that could be done to minimize the differences between writing LotusScript and JavaScript code. These technique hopefully can help reduce the number of mistakes made in writing code when switching between languages - a fact of life for Notes 8.5.1 developers who develop both Notes Classic and XPage applications. Having written LotusScript code for over 13 years I still find myself making some dumb mistakes over and over each and every time I write JavaScript/SSJS code. Here are my top 10 mistakes:- 10) The first "S" in SSJS stands for "Server". I have to stop designing solutions that run solely on the client and devise strategies that work when the server code is isolated from the user. 9) Forgetting that because of the flexibility of the language is so great, the SSJS editor will not find most of my dumb mistakes for me when I compile my code. 8) Forgetting that if I use == for a logical comparison that JavaScript will automatically convert both sides of the comparison to the same data type (usually string). So if I don't want the number 1 to be the same as the string "1" I need to use ===. 7) Remembering to add () at the end of each method call to get the value returned by the method rather than a pointer to the method itself 6) Understanding the differences between how an array operates versus a vector 5) Remembering that a switch statement needs a break statement to be added ton stop the code falling into my next case. 4) Handling the subtle differences between a variable who's value is undefined versus a null value and and am empty string 3) Forgetting the difference between an assignment statement (=) and an equality comparison (==) 2) Getting the case of my statements correct (e.g. if statement is all lowercase but Array is proper case),and all my variable names etc correct. And the number one mistake I keep making is..... 1) When I think I need assistance in how to use a particular SSJS statement or the various SSJS classes I keep thinking I can find useful information in the new Eclipse online help! (duh)
It took a while but I have now managed to complete one of my goals for 2009 and create profiles for the initial 50 members of Lotus Legends. These people are not designed to represent the "Top 50" but rather represent a cross-section of the many people I consider should qualify for such a title. I would like to thank the many people who have assisted by offering names and biographic information. I plan to extend the list further in 2010 - perhaps to reach a goal of 100. So please keep forwarding me more names and/or biographic information for yourself or others you consider worthy members. What better way to thank that hard-working and deserving colleague of yours than to have him included as a Lotus Legend. Alan Lepofsky Andre Guirard Andrew Pollack Bastian Wieczorek Ben Langhinrichs Bill Buchan Bill Ernest Bob Balaban Bruce Elgort Bruce Lill Carl Tyler Chris Blatnick Chris Brandlehner Chris Miller Chris Toohey Daniel Nashed Declan Lynch Ed Brill Elguji Software Gabriella Davis Gary Devendorf Jake Howlett John Head Julian Robichaux Kathleen McGivney Lotus911 Ludwig Nastansky Marie Scott Mary Beth Raven Matt White Mikkel Heisterberg Mitch Cohen Nathan T Freeman Niklas Heidloff Patrick Kwinten Paul Mooney Prominic Ray Ozzie Rob Novak Rocky Oliver Stan Rogers Stephan Wissel Steve Castledine Steve McDonagh Thomas Bahn Tim Tripcony Ulrich Krause Vince Schuurman Warren Elsmore Yancy Lent Note: You will only see 49 profiles on-line as one rather shy and retiring member of our community has asked me to not feature him - even though he is certainly one of the most deserving ;)
During the 20 year history of Lotus Notes there have been three .5
releases of the product. Each time they seem to have coincided with a
period of great change within the product..... ;
The first .5 release was Notes 4.5. The era of the Internet had
arrived. Notes 4.5 marked the start of the transformation of the Notes
product from being a Notes client only platform to one that could be
used for building applications for both a thick (Notes) and thin
(Domino/Web) client. Its release was followed by Notes R5 which gave
us new design elements such as framesets, pages, and outlines.
Components that could not only help deliver Web applications but also
allowed the Notes client to deliver design patterns that were becoming
popular with Web development. ;
The next .5 release was Notes 6.5. Again a period of great change for
our product. The official views of IBM differ from that of some
members of the community about this period. But to me Notes 6.5
represented the start of a push by IBM to redirect the 100 Million+
Notes users towards other IBM products and away from Notes itself.
Notes 6.5 offered Sametime integration. This was followed by Notes 7 -
the big nothing release - which offered companies the chance to migrate
from NSF to DB2. This was the era in which Websphere, Workplace, and
even Quickplace were to receive most of IBM's attention. But for some
reason the yellow faithful didn't drink the kool-aide and stuck with
Notes. ;
The latest .5 release was Notes 8.5. And again it seems like this .5
release forms part of another period of great change for Lotus Notes.
With 8.5 (and 8.5.1) we have seem the transformation to an Eclipse
platform almost completed. We have seen a new Design element - XPages
born and with it a push towards the adoption of JavaScript (including
SSJS). I have commented a lot over the past 2 years about the
significance of this release. It could be argued that 8.5 represents
an adjustment by IBM to the strategy it tried (but fell short) with
6.5. And while we may not all be 100% convinced by this new strategy,
as Notes developers we all need to pay close attention to the changes
being made to the product we all love.... ;
In many ways I am expecting Lotusphere 2010 to be one of the more
significant ones for Notes Developers. I have no idea how much of
their strategy IBM plan to disclose when the yellow faithful gather in
Orlando next month. But I will be paying just as much attention to
what they don't say as much as what they do. ;
A few days ago I read an interview with Ray Ozzie. In the interview he stated-
The
greatest amount of value that Lotus Notes ever provided, besides the email
infrastructure, was as a rapid application development platform that people at
the edge of the organization - in a business unit - could use to whip up an
application that solved their problem instantly. Just-in-time, disposable
solutions. As Notes was more embraced as central infrastructure, IT buyers
demanded that end-user design capabilities be re-shaped to target the needs of
professional developers. Notes environments became "locked down", and
people closest to the needs lost their ability to do "self-service"
solution development.
;
Consider this my Lotusphere prediction #3. The announcements at
Lotusphere for Notes 8.5.2 and Note 9 are likely to reinforce a push by
IBM to take the Notes development platform away from an end-user
development platform to one which is focused on the full-time
application developer. Perhaps an even bolder jump than the ones
started with 8.5.0 Central to this will most likely be DDE, Xpages,
and Eclipse. I will be looking for what is said (or not said) about
the future of LotusScript - look for announcement to extend JavaScript
(and possibly) Java into the space now dominated by LotusScript. I
will also be looking for indications of the role of the thick (Notes)
client versus a push towards thin (Web) client development. Again look
for what is said (or not said) about Notes Classic (forms, views,
framesets). APIs will dominate as part of a strategy to broaden the
appeal of Notes development beyond its traditional base. A move away
from casual business users toward mainstream IT development. ;
Will this be a good thing for Lotus Notes - only time will tell. But
if the changes are successful in making Lotus Notes/Domino a serious
development platform respected by IT departments we Notes developers
have the chance to get in on the action and be part of that
transformation. Whether we like it or not, what we will be doing in
3-5 years time may be influenced by what was started with 8.5 and
continued on with what is announced at Lotusphere 2010.
For quite some time now I have felt there was an opportunity/need for at least one more Community resource to supplement the many great community resources that already exist. So last week I took the first step and registered a new domain yellowverse.com. What Is Yellowverse.Com? Well at the moment it is nothing. But let's start by defining what it is not....
It is not going to be a repository for Notes applications or code snippets - We already have OpenNTF for that.
It is not going to be a place you can suggest ideas for promoting ideas about enhancing Lotus products - We already have ideajam for that.
It is not going to be a host for personal blogs and blog aggregation - We already have Planet Lotus and BleedYellow (and others) for that.
It is not going to be an implementation of Lotus Connections for the community - We already have Green House and Bleedyellow for that.
It is not going to be a forum for technical questions and answers - We already have the Notes.Net forums for that
It is not going to be a resource devoted to Business Partners - Most BPs are already well covered.
Building Bridges The key goal of this new resource should be to build bridges rather than create yet another island. Membership will be open to everyone, but will especially focus on addressing the needs of those members of the Notes community that do not have access to dedicated resources to collaborate on a daily basis. Resource Signposts Ultimately I would like to see all community resources do this. But yellowverse.com will lead the way by providing links to the many great resources out there that service the needs of developers and administrators of Lotus products. Developer/Admin Tools Building on some of my work with the .Domino Framework project, I would like to see a Notes database that contains a consolidation of the many (free) tools that can be used by Notes developers (and administrators) on a day to day basis. A property generator for OOP, LS2HTML, XLST for Notes Classic to XPages, View icons, Open Source graphics library etc. Where possible these tools will also be available as on-line resources at the Web site. Presentation Library A library of presentations donated by members of the Lotus Community. These could be presentations given at Lotusphere, LUGs or even presentations developed but never used. Group Blogs We already have The XPages Blog. Taking this concept one step further I would like to see the resource promote a series of technical blogs in which a group of recognized experts within the community contribute on a regular basis. e.g. The LotusScript Blog. The Notes Classic Blog, The Notes Standard Blog, and The Notes Strategy Blog. The Yellow University
I see huge potential for a library of (Youtube?) videos
that promote Notes development and provide how-tos for Novice
programmers, Gurus-only and all points between. Collaboration A place in which members of the community can come together and share and discuss information, ideas, and questions. Where possible I am hoping to integrate this collaboration with the other community resources. Profiles Extending the concept of Lotus Legends to the next level we can allow members of the Notes community to maintain profiles. The goal will be to facilitate the exchange of some of this information with other resources such as bleedyellow, OpenNTF, ideajam, Linked-In etc. We will also include a resume section to help put members of the community in touch each other and (hopefully) potential employers. A Showcase Yellowverse.com should be a showcase for what is possible with Lotus Notes (Basic, Standard and XPages). It should also be a showcase for its members and what they are capable of producing. All Active members will be allowed to showcase their own products & services. An International Resource At least one goal I have is to attract members from as many countries as possible. My hope is to find enough international members to make this a multilingual resource. NEXT STEPS...... I am looking for people who would like to help in getting a project like this off the ground. I am looking for participation at various levels:-
I am looking for those dedicated people out there that already have their own blogs, Web sites, Notes tools etc that would be interested in moving at least part of their efforts from an individual focus to become part of a group effort.
I am looking for members of the Notes community who have not yet become active members but would like to start getting involved in some small way.
I am looking for Lotus Legends who would like to offer a small part of their time to share their expertise, ideas and perhaps add some content on an on-going basis.
I am looking for one or more business partners that might consider hosting the Web site (and associate blogs etc.).
I am looking for people with ideas about what they need from the yellowverse and what may be missing with what is out there now.
I am looking for people who could offer to translate blogs and other technical resources into other languages (e.g. please feel free to reblog this blog entry into other languages).
And for those of you who just like window shopping... When the site is up and running I would like you to start using this resources and provide some feedback on what we are doing right and wrong.
Please leave your ideas with comments to this blog. Contact me via e-mail (ktree19@gmail.com), or look for me at Lotusphere...
A special thanks to those members of the community for nominating names, especially the many great names I otherwise might have missed. If you have more names and/or bios for more deserving members please let me know. Also if the bios of existing Legends are in any way incorrect or missing notable contributions please also let me know.
When I first relocated from Australia to the USA one of the many things I had to learn was driving on the "other" side of the road. After a while it began to feel natural but then when I returned to Australia for a visit I had to get used to driving on a different side all over again. The experience is somewhat similar to learning to program SSJS and then returning to LotusScript. Suddenly I find myself making mistakes with my LotusScript code as a result of trying to use SSJS syntax.
What I have found is that there are a few ways to reduce the difference between the syntax of the two languages so that switching between the two does not cause as many issues. The following are a few tips to consider when writing LS/SSJS that can reduce the mistakes made when switching between the two languages. These can also assist when copying code from one to the other:-
1) Try/Catch
I have blogged about this before. In SSJS the error handler is always identified by the catch statement. In LS you can assign any label to to your errorhandler. So why not use On Error Goto Catch.
2) If Then Else
In SSJS the If condition is enclosed in parentheses. In LS this is optional - If (condition) Thenstatement. So if you get in the habit of doing this with LS code you will be less likely to forget when writing SSJS. The same can also apply to other LS conditional statements such as While.
3) Single Line If
If you have a single statement to execute for an if or a single statement for both the if and else it is possible to write this in LS on a single line and drop the End If statement e.g. If (condition) Thenstatement1Elsestatement2. It is also possible in SSJS to write such statements on a single line.
4) Variable Names
SSJS is case sensitive for many things, INCLUDING variable names. Most JavaScript developers adopt the practice of using camel casing for variable name (eg. employeeNumber). With LS variable names are NOT case sensitive. So consider adopting camel casing for variable names in your LS code to get into the habit.
5) Field Names
In LS field names are somewhat case insensitive. When creating fields in LS the field name is usually created using the casing provided but it is always possible to access the field using any case. e.g. I can create a new field on a document with the field name BODY but still access it by doing NotesDocument.GetItemValue("Body"). When writing SSJS the case always seems to matter so it is important to ensure when writing LS code that you use a convention for the casing of field names so that when writing SSJS code you are not left trying to guess what the true field name is.
6) Comments
When writing lengthy comments in LS consider writing them in the format where the comment starts with '/* and ends with ' */. This provides a degree of consistency with the /* and */ syntax of SSJS. It also has the added benefit of being consistent with the requirements for using Mikkel Hesiterberg's excellent LotusScript.doc tool to document your LS code.
7) Immediate If
SSJS supports an immediate if statement in the form ((condition)?truevalue:falsevalue). LS does not have a native form of this statement. To get into the habbit of coding using immediate ifs consider creating and immediate if function as part of a standard LS library.
And finally, for those of you with sadistic tendencies. When writing with LS stop using the LS debugger to debug your code. That way you can endure the same pain we all do when trying to debug our SSJS code :)
Out of the box the Notes client does not support the importing of PDF files into Rich Text fields. However, somewhere between Notes 6.0 and Notes 8.5 the Word import utility was changed so that it could process PDF files. If you take a PDF File or Attachment and save it with a .doc extension then it becomes possible to import a representation of a PDF file into a rich text field using the Word import. It is not a perfect representation but is can often be good enough to meet the needs of some applications.
Note: This can only take place via the Notes Client using the Notes Client Import option, or programattically with LotusScript using the NotesUIDocument.Import() method
E.g. With LotusScript try something like this:-
Try:OnErrorGoto Catch
Set Body = Source.Document.GetFirstItem("Body")Filename$= atfTempDir()+"\attachment.doc"Forall o In Body.EmbeddedObjects
If(o.Type=EMBED_ATTACHMENT)ThenCall o.ExtractFIle(FileName$)Call Source.Import("Microsoft Word",FileName$)EndIfEndForallCall Source.Save()ExitSub
Catch:StopExitSub
To ensure recognition is spread across the globe I have completed profiles for four more Lotus Legends. This time these great members of the yellowverse all represent Europe.
Mikkel Hesiterberg
Steve Castledine
Thomas Bahn
Vince Schuurman
Being an Australian I am also hoping to have a few Aussies (and maybe a Kiwi or two) added soon. And if anyone out there has information about other corners of the yellowverse please let me know as much as you can.
Information about these and other Lotus Legends can be seen at www.dominoframework.com (under Lotus Legends)
Each week I am trying to spend a little time finding out more about the great many people who have helped to make the yellowverse such a great community. My research has identified three additional members that seem to have all the right stuff to be considered Lotus Legends. Please join me in recognizing the great efforts of these three new inductees:-
Andrew Pollack
Ben Langhinrichs
Marie Scott
I am still gathering material on another 10+ people but if there is anyone out there with any suggested names for legends, additional background material or corrections on the initial 30 members please let me know.
One of my favorite software programs (outside of Lotus Notes) is Intuit's Quicken. I like the look/feel of a thick client product. I like the way it integrates seamlessly with the Internet. I like that I can get the latest information off the Internet without the need to switch to a separate browser. I like the ease with which fixes are downloaded an applied. I especially like knowing that a new version will be available the same time each year and I can either decide to upgrade to use the new features or hold off for another 12 months. I even like the way they cross-promote their other products & services in a way that doesn't get in the way but I know the information is there if I am interested in learning more.
There are times when I wish my other favorite thick client, Lotus Notes was a little more like Intuit.....
Wouldn't it be nice if as a Notes developer I could access and download the latest fixes to my designer client without the need to have to wait for my entire organization to deploy a new version of the Notes client. As an Administrator it would be nice to get fixes for my administrator client and have my administrator client also manage downloads of hot-fixes for my Domino servers.
It would also be nice if I knew the next release of Lotus Notes (and SameTime) was to be released on March 1 each and every year. After all, how many companies have the resources to upgrade their Notes/Domino infrasructure more than once a year. I could plan my year using a new Yellow calendar that starts on New Yellow Day (March 1). Notes development for the year can be planned knowing the timetable for each and every new release. If I was lucky enough to attend Lotusphere six weeks before, I could see demos of the latest beta and attend presentations that explain how I can make the most out of the next release. I could then go back to my company and help decide if this release is one that is needed. If our company is an early adopter we can plan each March to test applications for the upgrade. If I work for a more conservative company we would probably do this at the end of the year after a few more of the bugs have been found and resolved. Major release of applications could be planned around whether I wanted to wait to take advantage of new features or not. Domino infrastructure changes can be planned for the quieter periods when no new release is planned. And most important of all, I wouldn't have to stress out about what the next release of Lotus Notes would be called.. it would simply be Lotus Notes 2010 etc.
I finally found some time to do some research on some more members of our great community. As a result I have completed profiles for two more members of the Lotus Legends community:-
Andre Guirard
Rob Novak
The profiles for these and the growing list of Lotus Legends can be reviewed atwww.dominoframework.com (under Lotus Legends).
As always, please forward the names (and any details) of any other deserving folk in our community that I have not yet recognized.
My aplogies to those of you who are attempting to read my blog entries using IE. It appears that there is a technical glitch with my blog that is causing the blog entries to not appear via Internet Explorer. The great folk at Lotus911 are presently investigating. Hold the phone...... if you are using IE you probably can't read this to find out anyway! Oh well.... let's hope the issue is fixed soon.
With Lotusphere
2010 just round the corner now the yellowverse will soon explode with
a wealth of new information about what IBM has planned for Lotus
Notes 8.5.2, 9.0 and beyond. I have already made a few predictions here and here.
:
The abstracts for
many of the LS sessions have now been made available. These provide
a few more insights into what may be coming soon to your corner
of the yellowverse.
AD110
Unleash the Power of Xpages
promises to be a very exciting sessions for Xpage enthusiasts as its
explains how a new XPage public API can be used to connect native
controls such as scrolling grids or outlines to an Xpage. The API
also promises to open up additional data sources (think relational!),
REST services, and Sametime awareness.
In AD101
DDE Full Speed Ahead, Maureen Leland and Peter Janzen will be
discussing DDE and how the Eclipse foundation will soon allow DDE to
move into “hyperdrive” (no specifics given).
A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box. The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.