Posting data from notes documents with java agent to PHP file - lotus-notes

With Ibm notes I got a Java Agent which posts fields from 50.000 notes documents to a website which has a PHP file. It does a single post per document. Eventually this PHP file does some job on that documents.
After a few thousand documents my Notes crashes. In the log file I can't find anything. Can't Notes handle this?

You're probably missing at least one required call to the recycle() method of some of the objects you're using. See here.
And also consider switching to use the OpenNTF Domino API instead. (Actually, I think the github home for it is better for you to check out than the OpenNTF site.) One of the improvements it makes over the standard API from IBM is that it handles the recycling for you, so you won't have problems with running out of that pesky back-end storage allocated by the Notes C API underneath the Java layer.

Trying to make easier Lotus Notes development with Java, I started an Open Source project some years ago, http://riverframework.org.
It supports the native IBM Java libraries and OpenNTF Domino API. The framework handles the recycling too. Because of time, I couldn't keep working on it, but the last version was stable. I used it in real projects.
HTH,

Related

XPages for iPhone6: Which controls or framework do you use?

Just got a request for a fresh XPages project where an existing traditional Domino Web application should be modernized and mobilified (iPhone 6 being the target).
I'm comfortable with Boostrap, especially Mark Leuksinks add-on, and that is my first gut feeling.
On the other hand I'm aware of specific Mobile Controls, both from IBM and from Teamstudio, and was wondering if there is a 'best way' you would recommend.
I can pretty much control everything on the server. I'm aiming for quickest effect for minimum effort.
TeamStudio tools are good if you want offline or do other development that does offline (XControls can also be used online, so could give consistent look and feel and development experience).
XPages Mobile Controls require a single XPage in order to get transitions. So if it's a large application, that can make the XPage quite cumbersome. You need to become comfortable with the settings on each mobile page, to know when to refresh and when not to.
If you're familiar with Bootstrap and can "encourage" the end users towards your preference, then as a developer, that would make sense to me (leveraging existing skills means quicker development).
If you're comfortable with Bootstrap and responsive design, we'd certainly encourage going down that route. I take it you are aware that Bootstrap is now part of the XPages Extension Library on OpenNTF ? It was first released there in Nov 2014 and has been continuously updated since. And it will migrate to the core XPages runtime as part of the next GA release
I would use the DAS components and let Domino read/write JSON and implement the frontend using the IONIC framework. It uses AngularJS as JS framework, is conceptually not that different from Bootstrap l, but has all the hooks (using Cordova) to use native phone features.

How is your approach for creating your own set of controls aka own Extensions Library?

What is your approach for creating your own set of controls aka own Extensions Library? After a few years of Xpages development we have a huge set of controls that are general purpose for building UI, some web services etc. (Probably as most other developers.) When we start a new project now we have to copy the entire stuff from one database to new one which involves controls, jars, css, images, JAVA code ... and then you completely loose control to maintain some central version of this controls & codes, everything is scattered among several projects/databases and things get messy fast.
We have thought about creating our own extension library as described here
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Master_Table_of_Contents_for_XPages_Extensibility_APIs_Developer_Guide but there is not enough documentation for this topic and the entire development process is quite complicated (at least seems to me. I tried two times based on docs above going through eclipse plugin project -> feature project -> update site and still having some bugs around)
What is your experience and approach for creating and maintaining shared Xpages controls in your Domino environment? Is there some hidden feature we miss here that can help us?
Take a look at the XSP Starter Kit on OpenNTF and the XPages SDK to setup an eclipse environment for plugin development. You'll also want Eclipse IDE for RCP and RAP Developers. Install the starter kit and SDK into eclipse and you should be all set.
The starter kit is a sample plugin with all kinds of examples of phase listeners, components, etc. Once you want to deploy your plugin, create an update site from within eclipse and use the Update Site NSF available on your server install to place your update site. Once that's done, you can replicate that NSF to any other servers that may need the plugin.
For more information about the starter kit, take a look at this slide deck. There is also a github project for the starter kit. Documentation for the XPages SDK can be found here. And a video for setting up the SDK is available on youtube. Lastly, here's the documentation for setting up the update site NSF.
While we haven't gotten to that yet in XPages, our model for regular Notes design elements is to have a central template that contains the elements that are shared, with those specific design elements marked to inherit from that template. Sometimes, a database inherits design elements from two different central templates.
That way, those centrally controlled design elements remain the same in all databases.
I would recommend looking at some example's on github for how they have library/components setup. One of the more simpler examples that has just a single component built into a Library is Steve Pridemore's App Layout Extension...https://github.com/DominoDev, Another good one is Nathan Freeman's Starterkit: https://github.com/the-ntf/xspstarterkit. Hopefully these will help you get the file structure down on which files you need and how they work.

Do you have to deploy plugins to the Notes Client?

I would like to know whether plugins (such as the OpenNTF Extension Library) need to be manually installed on any Notes Client that will be using an XPages in the Notes Client Application (XPiNC) that is dependent upon those plugins.
According to the Mastering XPages book, page 500 in the XPages in the Notes Client Chapter:
XULRunner will cache the usual resources used on the XPage but the Java classes still need to be loaded across the network for each new notes session
I understood this to mean that if there are plugins, such as the OpenNTF extension library, that they would be sent across to the Notes Client so that these dependencies would be resolved, allowing the user to use the application in the notes client, without worrying about having updating or not.
I have configured the UpdateSite.nsf on the server (8.5.3) for the dynamic loading of plugins when the HTTP server starts, this is working fine for the XPages being accessed through a web browser. However only clients that have had the 8.5.3 Upgrade pack applied (which includes the OpenNTF Ext Library), are able to access the application using the client.
It seems to me that it will be very cumbersome. The benefit of XPages would be gradual migration from the Client to Web, but to have to worry about plugin dependencies on everyones machine would be a backwards step?
Yes! You have to install extension lib plugins on clients for xpinc. You can use the update pack given by IBM or create a widget, put it in your widget catalog and then deploy it using policies or ask users to do it manually.
Stephen H Wissel has listed the steps to do this on his
blog. http://www.wissel.net/blog/d6plinks/SHWL-8GZM9A
You have to deploy the plugins to the client,
if you want to use the plugins in XPINC apps, as far as I know.

Lotus Notes Application, Web Based Converting

Does anyone have tips or an ebook that can give me a good foundation on how to create applications in lotus notes using web browsers instead of clients. Links or tips are much appreciated.
Thanks!
Books are a good starter. But you'll find there is alot more to it than you see in books. So, here is a quick list of places to look.
Books
You've got these options for books (all downloadable as eBooks to)
Classic Web development prior to Notes 8.5 -- Reviews here and here
Latest Web stuff with Xpages if you have Notes 8.5+ (kindle/paper)
There are IBM wiki's (html). But have found the IBM wiki experience underwhelming. (The adjectives "half-ar$ed" and "piece-meal" comes to mind alot when reading these.)
IBM's redbook site (pdf/html) has better produced content than the wiki's.
Sites
One of the best web development tip/technique sites for the trickier problems is codestore.net and nsftools.com
OpenNtf a well used site for free code and solutions written by alot of smart people.
Quite a few good bloggers have "coagulated" on planetLotus
Try Searching for XPages in Google. Or start here
If you enable http on the server, you should be able to see your domino applications from the web. You then need to modify them to make them a bit more web friendly. The basic technique for this is to have 2 design elements with the same alias, hide one from notes and the other from the web. This will make it a bit easier to make it functional from both the client and the web browser.
Other functionality which makes this a bit easier would be 'Pass through HTML', the Domino CGI Variables and the 'WebQueryOpen' and 'WebQuerySave' events. As Jasper points out, XPages is the new sparkling way to do this, but it might not be an option for existing systems (It requires the latest version of Domino server). Good Luck!
What version of Domino are you running? If it's an 8.5 variant, I would suggest you use XPages to bring your old client apps to the web (XPages are not an option in releases prior to 8.5).
As to how you go about this, that's well beyond the scope of an answer on Stack Overflow: it's a book in and of itself! To learn about web development with XPages, I suggest visiting some of the well-known sites out there, and perhaps picking up a course or two. Here are some links:
http://xpages101.net
http://www.qtzar.com/blogs/qtzar.nsf/htdocs/LearningXPages.htm
http://notesin9.com/
(Also, IBM publish a book on XPages development, although I've not read it).
With regards "classic" Domino development, your best bet is to view your existing Notes app in a web browser and then start hacking on the default HTML generated (which is nasty). The best single resource out there for classic Domino web development tips and hacks is Jake Howlett's Codestore
Start small, build yourself a small database with a subset of data and explore what you can do. I've been a notes client developer for 10+ years and doing domino web work for last three or four years and still on steep learning curve. Its a very powerful platform but you also need to know html as on many occasions the html that you see in the browser helped me pin down the faults in my application code.

Examples of Struts2 applications

I am working on a static analysis for detecting security vulnerabilities in web applications, and I am looking for some web applications to run my analysis on.
More specifically I am right now looking for open-source web applications that use the Struts2 framework, but I have a hard time finding such applications.
Does anyone know of some more or less complete and open-source web applications written using Struts2 (or possibly just plain JSP)?
The very complete and stable Struts2 application i use for log file analysis is KonaKart. The advantage is that you can set it up on your server, including demo data and configure it and use it as you wish.
In terms of openness:
"Only the customizable parts of KonaKart are open source. These include the Struts action classes and
forms, the JSPs, the payment modules, order total modules, shipping modules and the GWT One Page
Checkout code. They are shipped under the GNU Lesser General Public License."
If you need 100% open source it is not for you.
Projects Using WebWork or Struts2
https://cwiki.apache.org/S2WIKI/projects-using-webwork-or-struts2.html
Others
http://api.cnn.com/
http://www.allhomes.com.au/
Check these tutorials. there downloads are available. link1, link2

Resources