371 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
XPages series #14: Using MongoDB’s geo-spatial indexing in XPages apps part 2
Fri, Apr 27th 2012 117
XPages series #14: Using MongoDB’s geo-spatial indexing in XPages apps part 1
Fri, Apr 27th 2012 325
English slides for my Entwicklercamp 2012 session about NoSQL databases
Wed, Apr 4th 2012 140
Download link for my Entwicklercamp 2012 session slides about NoSQL databases (German)
Tue, Mar 27th 2012 113
Speaking at Entwicklercamp 2012 about NoSQL databases
Mon, Mar 19th 2012 115
Icon resources on the web for commercial and non-commercial use
Wed, Feb 8th 2012 312
XPages series #13: XPiNC app development tool
Thu, Feb 2nd 2012 427
Top 10
Lotusphere 2012: download links for session slides
Tue, Jan 17th 2012 578
Lotusphere 2012: Download links for 105 additional session slides
Sun, Jan 22nd 2012 436
XPages series #13: XPiNC app development tool
Thu, Feb 2nd 2012 427
XPages series #12: XAgents and performance bottlenecks
Sun, Jul 17th 2011 343
XPages series #14: Using MongoDB’s geo-spatial indexing in XPages apps part 1
Fri, Apr 27th 2012 325
Icon resources on the web for commercial and non-commercial use
Wed, Feb 8th 2012 312
XPages series #9: How to debug an XPages application
Tue, Jul 20th 2010 182
XPages series #11: Log data changes using beans and the DataObject interface
Fri, Mar 18th 2011 175
Notes 8.5.1: The new Java UI classes and Domino Designer extensibility API
Sun, Oct 11th 2009 170
XPages2Eclipse: New Beta-Build available
Mon, Jul 11th 2011 165


XPages series #13: XPiNC app development tool
Karsten Lehmann    

I was just working on an XPiNC integration of a quite large application and had some trouble getting it to work in the Notes Client (the app was working well on the web already). Finding out why it was not working was even harder in this case than when dealing with "normal" XPages applications, because the application is not based on the Dojo web toolkit, but uses Sencha's Ext JS for the UI and is completely based on our own web app development framework.
The framework does not use XPages design elements at all, but follows a simple REST API architecture with standard servlets to produce the data and user interface.

The benefit of this approach is that web applications can be developed, run and debugged from a pure Eclipse environment. They can even run on an different servlet engine than the Domino server's http task and - thanks to our data abstraction layer - they can even store the whole app data in a non-Domino database and mix/merge data between different database types.

Another benefit is that almost all the code has been written by ourselves. So it's not a kind of blackbox, made by IBM, where it's hard to work around occuring issues, but we are able to track issues down right until the service(HttpServletRequest req, HttpServletResponse response) call coming from the web container.

The downside is of course, that apps developed with the framework do not make use of IBM's XPages Extension Library, that contains various powerful UI controls. So we needed to create them ourselves.

And regarding XPiNC development, there is another downside: JavaScript errors do not get logged/displayed in the Notes Client, unless you register your own global error handler (providing a function for window.onerror).
Normal XPiNC applications do already contain such an error handler (somewhere within the XSP API object), which uses an internal bridge to post the error content to the Notes Client's status bar.

The development tool

To make development of XPiNC applications easier, I have created a small Eclipse plugin that displays three icons in the Client's toolbar:
Image:XPages series #13: XPiNC app development tool


The third icon lauches a piece of code that injects Firebug lite into the currently visible XPage:

        public void run(IAction action) {
                IWorkbenchPart part =
                  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().getActivePart();

                if (part instanceof XspViewPart) {
                        XspViewPart xPart=(XspViewPart)part;
                        XspXulRunnerBrowser browser=xPart.getWebBrowser();
                       
                        HTMLDocument doc=browser.getDocument();
                        NodeList headNodes=doc.getElementsByTagName("head");
                        if (headNodes!=null && headNodes.getLength()>0
                           && headNodes.item(0) instanceof Element) {

                                //add this snippet to the HTML DOM tree:
                                //< script type="text/javascript"
                                // src="https://getfirebug.com/firebug-lite.js" > < /script >
                                String firebugUrl="https://getfirebug.com/firebug-lite-debug.js";
                                Element headNode=(Element) headNodes.item(0);
                                Element scriptNode=doc.createElement("script");
                                scriptNode.setAttribute("type", "text/javascript");
                                scriptNode.setAttribute("src", firebugUrl);
                                headNode.appendChild(scriptNode);
                        }
                }
                else {
                        MessageDialog.openError(Display.getDefault().getActiveShell(), "Error",
                          "This action does only work within an XPiNC application!");
                }
        }


The result looks like this:

Image:XPages series #13: XPiNC app development tool


Using Firebug Lite, you can easily inspect the HTML DOM tree and CSS attributes of the current page. Another very useful feature is the Console API, which you may know already from classic browser development:
it lets you write log/debug messages to the browser console (by calling console.log('...')) and has other nice features like stacktrace dumping of JavaScript calls.

To our surprise we found out that the pure Xulrunner engine, that is used to display XPages in the Notes Client, does not register the global "console" at all. So Firebug lite came to the rescue. You can find all your log messages in the Console tab.

The other two toolbar actions are even more powerful. One lets you define a custom script library URL, e.g. to a script library design element on a public or intranet web server. The other actions will then create a script tag in the current XPage that points to the library. That way, you can inject any code you like into the XPiNC application.

Download

Finally, here is the download link with the Eclipse plugin project, feature project and update site:

xpinc-firebuglite-helper.zip

Hope this helps!


---------------------
http://www.mindoo.com/web/blog.nsf/dx/02.02.2012162412KLEL3Q.htm
Feb 02, 2012
428 hits



Recent Blog Posts
117


XPages series #14: Using MongoDB’s geo-spatial indexing in XPages apps part 2
Fri, Apr 27th 2012 11:37a   Karsten Lehmann
This is part 2 of an article about using MongoDB in Notes/Domino. Click here for part 1. Diving into the code: client side The UI stuff is stored in an NSF database with basic page layout defined in an XPage and the client-side application logic code stored as Dojo class file in the Java perspective of Domino Designer. The Dojo class location is defined and the class is loaded with the following code in the XPage "start.xsp": [read] Keywords: administration domino ibm ldd lotus notes xpages application archive database dojo google java javascript server wiki
325


XPages series #14: Using MongoDB’s geo-spatial indexing in XPages apps part 1
Fri, Apr 27th 2012 11:32a   Karsten Lehmann
This article presents the first demo of my session about NoSQL databases at the German Entwicklercamp conference in March 2012. It demonstrates how the document-oriented NoSQL database MongoDB can be used in an XPages web application for the IBM Lotus Domino server. The rise of location based services Location based services have become quite popular in the past years: Most of the smartphones carry a GPS sensor, and there are a lot of popular apps out there (e.g. Foursquare, Yelp) that use [read] Keywords: acl admin administration domino ibm lotus notes xpages application applications archive database dojo eclipse google interface java javascript mobile openntf security server wiki xml
140


English slides for my Entwicklercamp 2012 session about NoSQL databases
Wed, Apr 4th 2012 4:21p   Karsten Lehmann
As promised, here are the translated files for my NoSQL session at this year's Entwicklercamp (developer camp) conference in Gelsenkirchen, Germany. I am still searching for time to polish the two demos: MongoDb integration in XPages apps and NoSQL integration in XPages apps. Next week is blocked for German holidays. Need to work on the demos afterwards. [read] Keywords: xpages integration
113


Download link for my Entwicklercamp 2012 session slides about NoSQL databases (German)
Tue, Mar 27th 2012 11:12a   Karsten Lehmann
Here are the slides for my session about NoSQL databases at Entwicklercamp 2012 today. For the non-German audience: sorry for the German content, I hope Google translate will help. :-) I plan to translate them to English, but this may take some time. I wil also write blog entries about my two demos: leveraging the MongoDb geo index feature from an XPages application and embedding the Neo4J graph databases in XPages (travelling salesman algorithm to find the best route in a graph). [read] Keywords: xpages application google
115


Speaking at Entwicklercamp 2012 about NoSQL databases
Mon, Mar 19th 2012 2:25a   Karsten Lehmann
Yesterday I submitted my slides for this years Entwicklercamp in Gelsenkirchen, Germany. My session will provide an overview of the NoSQL market for the database types key value stores column oriented databases document oriented databases and graph database It discusses Redis, Apache Cassandra, MongoDB and Neo4j in detail and I will be demo'ing, how to integrate MongoDB's geo-spatial indexing feature and Neo4j's graph search algorithms in XPages applications. Finally, the session compa [read] Keywords: lotus notes xpages applications database
312


Icon resources on the web for commercial and non-commercial use
Wed, Feb 8th 2012 1:02a   Karsten Lehmann
As Web and Notes developers, we often need to find icons of various sizes to use them in our applications. Since I found a new massive resource of free icons yesterdays, I thought it might be a good idea so share some URLs. For commercial applications, we bought the Icon Experience library a few years ago, which contains about 2500+ icons in 7 sizes at a very affordable price: http://www.iconexperience.com Free icons with varying licenses can be found here: http://openiconlibrary [read] Keywords: notes application applications development openntf
428


XPages series #13: XPiNC app development tool
Thu, Feb 2nd 2012 9:19a   Karsten Lehmann
I was just working on an XPiNC integration of a quite large application and had some trouble getting it to work in the Notes Client (the app was working well on the web already). Finding out why it was not working was even harder in this case than when dealing with "normal" XPages applications, because the application is not based on the Dojo web toolkit, but uses Sencha's Ext JS for the UI and is completely based on our own web app development framework. The framework does not use XPages de [read] Keywords: domino ibm notes notes client script library xpages application applications css database development dojo eclipse integration interface javascript openntf server




436


Lotusphere 2012: Download links for 105 additional session slides
Sun, Jan 22nd 2012 3:16p   Karsten Lehmann
I just compared the current state of the Lotusphere 2012 website with my previously released list of session slide download links. I found 105 new slide downloads: ls12_20120122.csv ls12_20120122.html There are still a few missing slide decks, but it's a big step forward. [read] Keywords: lotusphere
578


Lotusphere 2012: download links for session slides
Tue, Jan 17th 2012 9:06a   Karsten Lehmann
I just spent some time to grab the download links of the sessions slides from the Lotusphere 2012 website. Since my Macbook Pro could not get a proper connection to the wireless network in Dolphin (network is quite bad both at Lotusphere and in the Yacht Club we are staying in), I had to do this on the iPhone, because it was the only device that got an IP address. That was fun. ;-) So here are the links to the slides that are available so far, sorted by session ID. Unfortunately, many are sti [read] Keywords: lotusphere firefox iphone macbook network wireless
104


Status report / no session submission for LS12
Mon, Nov 7th 2011 3:24a   Karsten Lehmann
It's been some time since the last blog post in July. The last weeks have been incredibly busy, working five days a week on 3-4 projects at customers on-site does not leave much time for blogging and it does not look like this will change very soon. To give you an impression, here are a few things that we've been working on: Development of an OSGi based web application framework with Ext.js UI Abstraction layer for web applications that unifies data access across document-oriented and re [read] Keywords: domino dxl ibm lotus lotusphere lotusscript notes notes client R7 richtext traveler xpages application applications blogger blogging database development dojo eclipse java properties server websphere websphere portal xml




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition