Search DominoPower's 11,437 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Doing more in Lotuscript with Notes.Net class libraries (continued)

Now let's look at some examples.

NotesFTP
NotesFTP is implemented as a single Lotuscript class library. I can't say more about the value of using this than is offered by the author, Paul Ray:

If you've ever implemented FTP functionality in your applications using LotusScript, chances are it was done by making a call to the Shell function and running an FTP executable against a batch (.BAT) file containing FTP commands. Having passwords stored on the file system, even temporarily, can make an Administrator cringe, and "shelling" out to the command line is something many seasoned Developers do not want a part of.

NotesFTP provides a mechanism that overcomes both of these hurdles. For one, usernames and passwords can be kept in the confines of a Notes/Domino LotusScript module (e.g., agent), so they are secure. Secondly, the FTP calls are made "in process" rather than by launching a separate executable to do so, making the code more robust and efficient.

NotesFTP is also easy to use. Since it is implemented as a LotusScript Class, you are sheltered from making calls directly to the Win32 Internet API, and thus do not need to be concerned with the details surrounding calls to DLLs. Instead, the details are all encapsulated in an object that you manipulate.

As he says, it works by making calls to the Microsoft Internet Functions API (application programming interface), which is in WinInet.DLL. That file comes with Internet Explorer, so that means that if you want to use it in server-based applications, like I did, you need to have Internet Explorer installed on the server. Once I did that, it all worked for me just as documented, and it was real easy to write code that worked first time. In fact, the only issue I have with the library is that the documentation omits to describe the method GetFile. A quick check of the script library itself showed that GetFile and PutFile have the same parameters. I can easily live with this.

NotesTemplate
This class has just two properties, but it could be a real time-saver to many administrators. With the standard NotesDatabase class, the properties DesignTemplateName and Templatename give access to the template name that a database inherits from, and for templates, the name the template is. But these are read-only properties. Daniel Alvers' class enables you to update these values. I have used this as part of a mail upgrade project to enable me to modify the template names on mail databases without having to go and do each one by hand. Daniel wrote it to help a project of standardizing template names at his company. It's one of those things that you hardly ever need, but when you do need it, it will save you so much time and effort.

NotesUserActivity
Another class by Daniel Alvers gives access to the User Activity table in a Notes database--the same data that you see when you hit the User Detail button on the "i" tab of the database properties box. I've used this information to generate activity reports for a database, so that we can see that the database is being used, how often, and by whom. This class presents the data in the same order as in the dialog box, last entry first and in descending date order. This enables you to see the most current data first, indeed finding out who last accessed the database, and when, is real easy. Just as with looking at the dialog box, you need to filter out the servers from the real users. I'd do a NotesView.GetAllEntriesByKey using the activity entry name as key on the directory's $Servers view. If you get no returned value, it means it's not a server.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
Adding Quick Highlighter support to IBM Lotus Notes Domino Wiki, Weblog, or Webpage
Remember Young Admins...there are 2 files
WebSphere Portal 6.1.0.2 and Lotus Domino 8.5
The CKEditor - with Domino
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login