
Login
Home
Members
Partners
Collaboration
Resources
Newsletters
Events
|
| 
| 
| Developer Tips February 2010 ( HTML ) | |
Dev Tips February 2010
 |
February/2010 |
| In This Issue |
Newsletter archive available here.
|
| |
| WELCOME BACK TO REALITY |
| By Rob McDonagh |
|
Whether you attend physically or only vicariously, the end of Lotusphere is always a major milestone in the year. The online world always fills up with great presentations, exciting announcements, and potentially damaging photos.
Before we get to our Lotusphere coverage, guest author Gary Devendorf kicks off this month's newsletter with a how-to article on the automated creation of a SharePoint List based on the scheme and data of a Domino web View. Next up, Tom brings back the goods from Lotusphere. If you're wondering what you should be learning (and you should be), Tom has you covered. Tom also fills us in on what in the world Project Vulcan is all about and, more importantly, what it means to developers. Hint: the words "Live long and prosper" are not involved, though there IS a Spock sighting. As usual, Tom's articles fall into the Must Read category.
My own meager contributions to your edification this month revolve around choices. On the one hand, there are multiple ways to deal with XML data in Notes, so I did my best to thoroughly confuse the issue. Also, there are decisions to make when you're faced with the CEO's new iPad (yes, I said iPad). Your choice: read up on it now or suffer later.
On a final note, this will be my final note. Sorry, couldn't resist the bad joke. Seriously, I'm handing off the chore of putting up with Tom as a co-writer (I kid, I kid, Tom is everything you could wish for and much more). Picking up the baton will be Ms. Kathy Brown (aka @kjbrown13, as the poor Twitter servers are all too well aware). Kathy spoke at this past Lotusphere and received rave reviews. She has also written for THE VIEW and maintains a (masochistic?) blog about running and Notes Development. Please welcome her. And be polite. That means you!
|
 |
With Quest's free Notes application analysis tool, you can:
- Find Notes databases across the enterprise
- Classify applications according to attributes
- Analyze application usage and data
|
Quest's free Notes application analysis tool is available with no restrictions, and includes 30 days of free technical support.
Download it today.
|
| |
| CREATING A SHAREPOINT LIST, WITH DATA, BASED ON A LOTUS NOTES "VIEW" IN LESS THAN 10 MINUTES |
| By Gary Devendorf |
|
This is the first of a series of articles that show you how to get the most out of your Lotus Notes applications by extending their reach and functionality using standards. This first article demonstrates, step by step, the automated creation of a SharePoint List based on the scheme and data of a Domino web View. Thanks to the built-in URL commands found in Domino, this is extremely easy. So spend a few minutes learning these methods and you will greatly increase your ability to use Notes/Domino data in a heterogeneous environment. It's true that this article shows Notes data copied to SharePoint and migrated back into Notes. In the subsequent articles we will surface, not copy, Domino data in a SharePoint site and link it to non-Notes data.
Many Lotus Notes/Domino users suffer from the misperception that it is closed and proprietary just because much of its functionality pre-dated standards. In truth, Lotus Notes' embrace of standards like XML and web services makes it an integrator's dream and the following demonstration proves it. The URLs shown are to my public Domino server so you can try it yourself. However, I encourage you to try it on your Notes databases. At the end of this article I will discuss the advantages and limitations of this method.
First let's look at our Notes database in a web browser. Here is a "Web View" of a basic Notes database (Orders.nsf) "http://www.msdomino.net/orders.nsf/customer%20orders?openview"
This URL is actually a "URL command" for the Domino server. Notice the Server name, Database name and View name in the URL. After the "?" the command "openview" is used. (Note: this is a built-in function of a Domino Server with the HTTP task running.)
Click to Enlarge
Now we change the "openview" command to the "ReadViewEntries" URL Command to retrieve an XML version of the View.
Note |
The "&count=-1" parameter requests all documents in the View. However, this is still limited to 1000 by a default server setting. For ways around this limit, please click here. |
Click to Enlarge
This gives us an XML version the data found in the View. For more information on Domino URL commands, look in Lotus Notes help documentation. The default format of ReadViewEntries XML is not easy to work with. We will address this soon.
The ReadViewEntries URL gives us a window to our database data as defined by a View. Next we will use this window to pull a snapshot of the data using Access 2007.
We start Access 2007 and create an empty database.
Click to Enlarge
Next, in your new blank Access database, on the ribbon under the "External Data" tab, in the "Import" section, select "XML File".
Click to Enlarge
A dialog appears asking for the source of the XML. Here we enter the URL for our URL command "ReadViewEntries" and click OK.
Click to Enlarge
The wizard imports the data and shows a tree view of the schema which does not contain the data we want. We will need to apply a Transform. Click "Transform..."
The wizard will ask you for the location of an XSLT file. You can download mine here.
Put it on your file system then click the "Add..." button and navigate to the XSLT file. Once the file is added, you can select it and click "OK".
This is what my XSLT looks like (I took a transform that created HTML and changed it to create nice XML)
Click to Enlarge
Now we have our XML data in a format Access 2007 likes. Click OK. (note: I have used this transform with many technologies not just Access)
You are then prompted to save these import steps
Click to Enlarge
Here, just click Close.
Now we have an Access 2007 relational database table called "viewentry" with our Notes Data in it.
Click to Enlarge
Here you have the opportunity to go into the Database Design and set the Field data types. (i.e. Number, Date, Time, String). This way you can easily cast the data into the desired format. This is not required but is a good way to find bad data.
Click to Enlarge
Finally, with our "viewentry" table selected, we pick "SharePoint List" from the "Export" section of the "External Data" ribbon tab. You are asked for the address of a SharePoint Site to create the new list in. (I like to use my "MySite" URL.) Enter the URL of a SharePoint site and click OK.
Click to Enlarge
By default, the wizard opens the new SharePoint list in a Datasheet View. In the Datasheet View, we can edit, sort, and filter data.
Click to Enlarge
Using the "Actions" menu, pick "show in standard view" to see a standard list view.
Click to Enlarge
Standard View:
Click to Enlarge
Here is the list seen in a standard view after configuring the view to show the "Modified By" and "Created By" fields. They are SharePoint built-in fields and the values are set to whoever ran the process.
Click to Enlarge
Also a default web form has been automatically created for the orders.
Click to Enlarge
To bring this data back to a Notes database, we can save the view as an Excel spreadsheet. Use the "Actions" menu to "Export to Spreadsheet".
Click to Enlarge
The result is an Excel spreadsheet:
Click to Enlarge
In Excel you can "Save a copy of the document" in "Other Formats".
Click to Enlarge
Click to Enlarge
"Text (Tab delimited)(*.txt)" and "CSV (Comma delimited)(*.csv)" formats both should work according to the Lotus Notes help documentation on importing.
Let's talk about the value and limitations of this process. It's a great demo to show the openness of Lotus Notes/Domino without doing anything special to the server especially when admins won't let you put any code on their servers. It's a jumpstart in using SharePoint by creating a populated list you can use to try SharePoint reporting, workflow, web UI, linking data, and other services provided by SharePoint. The moved data can be exposed to enterprise wide search, life cycle management, check-in/check-out, sorting/filtering/grouping and more. In any case, it good to know you can do this. However, we are limited by what you can put in a Notes View. Data validation, code logic, audit trail information and form UI are not moved. If you need these things, there are tools available to help you move or recreate them in a SharePoint environment. One I've been involved with is the Quest Notes Migrator for SharePoint.
In the rest of the articles in this series we will show live Domino data in SharePoint, LotusScript, linked data and cool UI tricks. These methods are easy and increase the value of your Notes applications and your skills.
|
|
About the Author
Gary Devendorf is currently a Subject Matter Expert (SME) on Lotus Notes applications at Microsoft, spending his time creating demos of integration and migration between Lotus Notes and Microsoft products. Many of his demos can be found at Interoptips.com. In prior positions Gary was a Product Manager at IBM Lotus, a Product Manager at Lotus/Iris/IBM covering the application development features of Lotus Notes/Domino (LotusScript, Domino Designer, web service, toolkits and more). He is the author of the GaryDev blog, a frequent speaker at technical events, and a long time Lotus technical expert with a thorough technical knowledge of SharePoint.
|
| |
| SPONSORED BY THE VIEW'S ADMIN2010 AND LOTUS DEVELOPER2010 |
| |
 |
Get the most from your Lotus investment! Reserve your seat to be a part of the premier events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. No marketing, No fluff. Just in-depth technical training that you can put to use on the job right away! One registration gets you into THE VIEW´s Admin2010 and Lotus Developer2010.
|
|
| |
| POST-LOTUSPHERE ... WHAT TO LEARN NEXT? |
| By Thomas "Duffbert" Duff |
|
So Lotusphere is but a fresh memory at this point, and my mind still mulls over what I saw and heard during my week in Orlando. Of course, there's all the buzz over what Project Vulcan is and is not, how mobile devices are important, etc. But one of the main points I (and most other developers) come back to is this:
What new skills might I need to learn to stay relevant in the Lotus world?
Based on what I heard at Lotusphere, there are a couple of different answers to that question.
I attended a mini-keynote session on the application development strategy moving forward at Lotus. The prime message they wanted to get across was two-fold, in my opinion. First, all your current skills will remain relevant. Second, learning web development skills will be crucial to your advancing forward with the capabilities of the software.
First, they stressed that all of our current skills will remain relevant. There will be no dropping of @Formula language, LotusScript, Java, etc. What you have worked hard to learn will still be of value going forward. This is an important point, as we've all lived through the "LotusScript is dead" arguments year after year. There will be continuity as we move forward, so no area is dropped off the face of the development map.
You can take this a bit broader, also. Your Notes skills will be applicable as we move towards hybrid applications that work both in the cloud and on-premise (or even in both places.) Your portal development skills will allow you to work in this model. Same for social software (Connections), Symphony, etc. The goal here is to make sure that all the development platforms under the Lotus umbrella can work together to create the business value applications that we've been known for over the years.
The second point, learning web development skills, is where you can start now to position yourself nicely for the future. When it came to the part of the keynote where they talked about the base for the future, the main skills in our world were XPages, JavaScript, HTML5, CSS3, Dojo, and REST.
Put simply, start learning XPages now if you have not already done so. This is the foundation of what you'll see many of the new features designed around. And finding resources for this learning isn't difficult. Declan Lynch has created an extensive series on how to code in XPages. There's a blog solely focused on XPage development. Planet Lotus has numerous blog entries each week on the topic. So there isn't much to prevent you from getting your feet wet. And doing so NOW will make sure you don't fall behind when it becomes a requirement moving forward.
HTML5 and CSS3 are the new standards that will add a great deal more functionality to web pages than they currently have without extensive libraries and frameworks. You will have to dig a bit deeper to find that information at this current point in time, as the books and such have not yet hit the shelves. But it looks like O'Reilly will have a couple books on the subjects in the next two months, so keep an eye out there.
Dojo is pretty easy to get started with, as it is a long-time scripting framework that has a fair amount of open community support. REST, the interface for calling and consuming web services, is also a well-recognized standard that you can easily start using and learning. You shouldn't have any problems finding learning sources for either of those.
As you can see ... Lotus is making a commitment to use open standard technologies moving forward, which benefits us in two ways. One, it makes it easier to find materials to help us learn the skills we need. And two, it also makes it possible for those traditionally outside of the Lotus world to start working with Notes. And in my opinion, getting more input and creativity from outside the traditional Notes community is a great thing.
So, be encouraged that what you know right now isn't going to drift into irrelevance with the next release of Notes. But also know that to continue to maximize your skillset, there *are* some new things you need to learn. Start now and help lead others to greater accomplishments. It'll help you solidify what you learned, and you'll earn major karma points in the process.
|
| |
| SPONSORED BY THE VIEW |
|   |
|
|
Developing an e-discovery plan to help your organization become better prepared for the challenges of the e-discovery process is a daunting task. Having a process to locate and present electronic business communications is a MUST for every industry.
Join us for our next online meeting and this presentation from Denny Russell, Senior Product Support Specialist, Marta Farensbach, Senior Product Manager, E-discovery Division, and Harvey Coblin, Product Manager, Discovery Attender, Sherpa Software. These leading e-discovery experts will provide an introduction to the key areas involved in the e-discovery process and load you up with helpful information and best practices so you can develop an e-discovery capability for your organization. Check out the presentation and:
- Uncover the key e-discovery issues you need to understand today and in the future
- See what's working now for organizations like yours in solving the biggest e-discovery challenges
- Understand the capabilities you need to avoid unnecessary legal risks and e-discovery costs
- Find out how e-discovery can help you manage and avoid employee misbehavior and legal actions, comply with its regulatory obligations, preserve intellectual property, and avoid embarrassing data loss or leaks.
If you have been considering the best course of action for your company on this important subject, join us for this informative event and get control of e-discovery for your organization. Understand why e-discovery is important, gain insights into the issues and regulations that are most pertinent, and then start creating strategies, capabilities, and technologies to meet needs that will also help manage corporate data properly.
This presentation is free to LotusUserGroup.org members but requires pre-registration. Register today!
The Domino Administrator Documentation Team in the IBM Lotus Information Development Center is looking at restructuring some of the Admin Help and wants your feedback on how you use the documentation today. Join Amy Smith, Notes and Domino Information Architect, Cara Viktorov, Information Development Usability Feedback Lead, and the writers from the Domino Administrator Information Development team in this moderated forum and be a critical part of the team's decisions about the direction for this doc set. Post your use cases, give the team your suggestions, and look for specific questions about usage and restructuring as the week progresses. Join in, ask questions, and provide feedback.
The Domino Administrator Documentation Team will be monitoring this forum and looking for your feedback the week of February 22nd. You can take part in this important forum.
Lotusphere Comes to You ONLINE is a premier on-line event series featuring newly updated presentations from Lotusphere 2010. Designed to bring anyone who couldn't get to Orlando the critical information and the excitement they missed, this FREE online series will help you get more from your existing IT investment and boost collaboration across your enterprise.
Join us online for these webinars to learn more about the latest exciting news and announcements from Lotus. The sessions are free but will require pre-registration. The sessions will begin in March and registration will open soon. Keep an eye out in this newsletter and on our site for more details and the announcement of the opening of registration.
|
| |
| POST-LOTUSPHERE ... SO WHAT IS THIS VULCAN STUFF? |
| By Thomas "Duffbert" Duff |
|
Probably the hottest announcement coming out of Lotusphere 2010 was the creation of Project Vulcan. No, the announcement was not made by William Shatner, although I'm guessing Leonard Nimoy might be the new odds-on favorite for OGS special guest for Lotusphere 2011. But other than a cool geeky name, just what IS Project Vulcan?
Barb Mosher of CMSWire had a nice lead-in on her story about Project Vulcan:
"At Lotusphere this week, they unveiled a new project that will be the 'blueprint for the future of collaboration'. Building on existing capabilities, this blueprint - called Project Vulcan — will demonstrate the convergence of:
- Cloud and On-premise computing
- Collaborative business apps and social networks
- Delivery across all channels and devices including desktop, mobile and netbooks
The project, which is actually the next generation of Lotus collaboration software, includes the combination of social and business analytics, something you definitely need to include in your collaborative business applications."
Like many developers, I immediately wanted to see what it looked like and how it ran under the covers. Ed Brill has posted one of the few screen shots of what a Project Vulcan "inbox" might look like in the future. As you will see, there's a whole new emphasis on going beyond "email" and into the social networking aspect of the daily information you receive and the interactions you have with others.
But again, this is still rather vague for the developers ... how does it work?
Generally speaking, you need to start imagining the parts of Lotus being loosely coupled services that can be mixed and mashed across products. Features which are currently thought of as Connections could be made part of a Notes application. A Notes application may read data both from an on-premise database and also from a cloud application to create what is being increasingly referred to as a "hybrid application." You become less concerned with how the data is being served up to you, as well as the "normal" platform where the feature would reside. Instead, you look to use those features as building blocks to bring the data together in ways you might not currently imagine. When you start to think in those terms, it becomes a pretty cool concept.
The other thing you need to remember when you start wrapping your mind around Project Vulcan is that it's not a new "product" that you buy, nor is it a platform that new Lotus products will run on. Instead, it's a vision, a blueprint if you will, of where the Lotus brands are headed in terms of architecture and capabilities. Don't ever expect to see a Lotus Vulcan download in PartnerWorld that is the release of what was announced. That's not what this is. Instead, think about your current products (like the Notes client) becoming "vulcanized" so that you can easily pull in features and data that aren't traditionally part of Notes.
My inner cynic has to state the obvious, though. I can't ignore the 800 pound gorilla wandering around the room, as in "so is this another Workplace?" Is Project Vulcan yet another "two lane highway" that will confuse clients and cause even more damage in the marketplace? Is this the death of the Notes client? In a word (that word being my opinion), no.
Being that Project Vulcan is a vision and blueprint for how collaboration should unfold in the upcoming years, it's not as if Lotus is trying to sell a whole new product designed to either replace Notes or target an "underserved" market. Instead, it's more of a statement that says "here are the features we think Notes will need in the upcoming years in order to stay on the bleeding edge of the collaboration discussion." Put that way, I don't see Project Vulcan having any downside at all. At worst, we get a few flashy features and we're on to something else. But at best, we get a whole new way to create and deliver business value to our customers. And that's what it's all about at the end of the day.
Going forward, keep your ears and eyes open for Project Vulcan references and follow along with where Lotus is going with the concept. I would think that for the next 12 to 24 months, those types of articles will allow you to stay on the forefront of the Lotus trends and momentum.
|
| |
| XML PARSING: DOM VS. SAX |
| By Rob McDonagh |
|
Like all good Notes/Domino developers, you've browsed the release notes and help files to see what new toys Lotus has given you. You've noticed there are classes in LotusScript that have to do with XML, right? You may have been wondering, though, why there are so many of them. The answer is that there are two primary methods of parsing XML: DOM and SAX.
DOM stands for Document Object Model. It is a World Wide Web Consortium (W3C) specification that applies to both HTML and XML documents. So if you are a web developer who has written JavaScript to manipulate the content of a web page dynamically (DHTML), you've been manipulating the DOM of an HTML document. Also, if you've written LotusScript that works with Notes views, documents and items, you've sort of been using a DOM for Lotus Notes (no, it's not included in the specification).
When you work with the DOM, you deal with XML data in a tree structure, proceeding from one node to the next. In LotusScript, you use the NotesDOMParser to begin. For example, this is the quick example from the online help that shows how you get access to the Document representation of the XML data source:
Dim domparser As NotesDOMParser
Dim domdoc As NotesDOMDocumentNode
Set domParser = session.CreateDOMParser(inputStream, outputStream)
Call domParser.Process
Set domdoc = domparser.Document
In this case, the entire XML tree is being returned. The NotesDOMDocumentNode object has a property called FirstChild, which, as you might expect, returns the first child of the tree. Walking the tree is very similar to navigating NotesViewEntries.
SAX stands for Simple API for XML. SAX uses an event-driven model to parse an XML document. When you use the SAX parser, you write code defining how these events should be handled. In LotusScript, the NotesSAXParser contains several events, such as: SAXStartElement; SAXEndElement; SAXStartDocument; and SAXEndDocument (there are others, including dedicated error handlers). Each event you reference requires a LotusScript subroutine:
Set saxParser=session.CreateSAXParser(xml_in, xml_out)
On Event SAX_EndDocument From saxParser Call SAXEndDocument
On Event SAX_EndElement From saxParser Call SAXEndElement
On Event SAX_StartDocument From saxParser Call SAXStartDocument
On Event SAX_StartElement From saxParser Call SAXStartElement
You might then have a subroutine like:
Sub SAXEndDocument (Source As Notessaxparser)
'This is where we do whatever it is we need to do
End Sub
So which one do you use in a given situation? First, if you haven't already done so, you should try them both. You may find that one of them is extremely intuitive while the other is completely incomprehensible. I have to admit that the DOM makes infinitely more sense to me than SAX. If everything else is equal, I will always use the DOM.
Aside from your personal comfort level, the major reason to use SAX is that you are dealing with a very large data source. SAX parses the XML in a stream, which means that larger XML files will not slow it down by chewing up massive amounts of memory. On the other hand, you can only parse in one direction using SAX, so you cannot go back to a previous part of the XML. The DOM allows you to walk the tree in any direction or order you choose, but the drawback is that it does require you to read in the entire XML file before taking any action. Large amounts of XML will parse faster and with much lower resource utilization if you use SAX.
Whatever you do, just remember: never parse an XML file as if it was just a really big string. Seriously. And yes, there are still people who do this. Let the parsers do the work for you.
|
| |
| iPHONE, iTOUCH, iPAD: WHY DO WE CARE? |
| By Rob McDonagh |
|
You may have noticed, unless you've been in outer space, that Apple has announced a new device. They're calling it the iPad, and despite the obvious snarky references to certain other products (no, I will not explain why "Shouldn't it have wings?" is funny), Apple's success with the iPhone and iTouch gives it a certain amount of credibility before it even ships. For application developers, though, the market success and appeal of Apple's family of mobile and semi-mobile devices raises a question. The question isn't "Should I build applications that support them?" but rather "How do I build applications for them?" If you're asking yourself that question, I have good news and better news.
First, you should know that there is more than one way to skin a cat. You can develop native applications for these devices, and you can also develop web applications that target them. Serious developers are making both choices for valid reasons. Each has advantages and disadvantages.
Web applications have a perception problem. They are perceived as painfully slow on mobile devices, at least on questionable networks, but that perception is not necessarily accurate anymore. On the devices mentioned above, web sites will be displayed using Apple's Mobile version of Safari, the browser built on top of WebKit. WebKit is a rendering engine that is used in quite a few mobile devices already (Palm Pre, Android, Nokia, and even RIM's BlackBerry) and the list is growing. Of course, these devices have differences, screen resolutions being the most obvious example, so developing an application for WebKit doesn't automatically make your application work perfectly on every mobile device. It gives you quite a head start, though. For example, WebKit supports HTML5, which includes both enhanced caching and local data storage. On an HTML5 device, an offline web application for mobile devices is no longer a pipe dream. An offline application that synchronized data changes in the background could perform quite well in even the worst network conditions. As usual, though, it's up to the application developer to turn a possibility into a reality.
Native applications have more cachet, but they also have a much steeper learning curve. Building a true native application involves using Apple's XCode development environment and learning the Objective C language. Now, if you're an experienced developer who has learned many different languages and you don't have any issues with object-oriented programming, that may not slow you down much. Many developers (many good developers), though, will have trouble. Also, XCode only runs on a Mac. So if you prefer to do your development on Windows or Linux, you're out of luck.
Sounds like I want you to write web applications, right? Well, that depends. Only native applications have access to Apple's APIs to communicate with device hardware. If your application needs to use the camera or the GPS, you're looking at a native application. Also, despite the advances in WebKit, there are still some visual effects that are either impossible or much more difficult than they should be. If you're writing a game, you're probably going to need a native application.
We're Notes Domino developers here, though. We write business applications. We understand what it means to make an application work offline. We know about synchronizing data. So web applications do seem to be the best fit. The big exception, as mentioned above, would be the need for hardware support from the device itself. If you write your application to support WebKit you'll have an easier time deploying it to a variety of devices, and we all know that while our companies want to be standardized, we always wind up supporting multiple devices.
So here's my advice to you: brush up on HTML5 and WebKit development so you'll be ready to build a killer app when the boss walks in with her iPad in a few months.
|
| |
| MEMBERSHIP AND SITE INFORMATION |
| |
|
This newsletter is a benefit of membership in LotusUserGroup.org. This newsletter mails monthly. If you wish to subscribe and you are not a member, go here for your free membership and to subscribe. If you are already a member and wish to subscribe, log in at Manage My Account and update your profile to include the newsletter.
Let us know what we can do to help you achieve your goals. Send us
email or Contact us from the home page at:
http://www.lotususergroup.org.
Want to sponsor the Developer Tips Newsletter?
Contact our Partner Relations Department or call 1-781-751-8734.
|
|
|

| 
| 
Site hosted by

Copyright © Wellesley Information Services and LotusUserGroup. All rights reserved. Email: usergroupinfo@lotususergroup.org
LotusUserGroup, 20 Carematrix Drive, Dedham, MA 02026, USA.
Sales and Customer Service: 1.781.751.8755
|
|