Showing posts with label XPages. Show all posts
Showing posts with label XPages. Show all posts

Sunday, 31 January 2016

XPages on IBM Bluemix - working with wrong ID file

This is an easy one, but I still think it is worth mentioning all the different findings about a new technology like IBM Bluemix. During my tests with XPages on IBM Bluemix, I once made a little mistake. I forgot to switch to the IBM Bluemix ID file before I started modifying the design of the Bluemix app.



Obviously this is easily possible within Domino Designer. I was also able to deploy my changes to IBM Bluemix, but the new XPage could not be called due to an access issue we know from our good old domino environment too!


Signing the design element and another deployment to Bluemix solved the issue.
Good old Domino security - makes perfectly sense to me :-) It would be really nice to have an option to sign the design during the deployment process though!
(BTW: this is a rather old post which was still unpublished - but I think the deployment process is still the same)

Monday, 20 July 2015

Limitations with multiple instances of XPages applications on IBM Bluemix

I discovered some "limitations" or caveats while I was playing with XPages on IBM Bluemix tonight. I setup two instances of the To Do Boilerplate.

The first thing that annoyed me is that the import of the Bluemix Starter code of the second instance replaced the NSF of my first To Do app. The good news is that Domino Designer asks before the app will be overwritten :-)
If you choose "No", the Starter code won't be imported and you won't loose any data.
One disadvantage for XPages on Bluemix at the moment seems to be that the import always imports into the root folder of your Notes-Data-Directory. This will hopefully be fixed in a future version so that we can import projects into subdirectories. For other Bluemix apps the documentation explains that a developer should create a new subfolder to which he or she can extract the code to. The integration for XPages / Domino is a bit different from that process so this issue seems to be specific for XPages.

Another limitation or issue that came to my attention is that if you setup multiple instances of the same XPages Boilerplate these databases share the same ReplicaID. My two instances both have the ReplicaID 80257E5A:004A751B - and replication of the databases is enabled.


I am wondering if the ReplicaID is bound to the organisation or space or if it is shared across all instances of this Boilerplate. Furthermore I am not sure if this just due to the fact that XPages is still in experimental code. In my opinion this is something IBM should fix for productive use as this can bring lot's of trouble for the developers...(or maybe I am missing something?)

Getting started with XPages on IBM Bluemix - part II

I was able to setup my first XPages Demo Application on IBM Bluemix and prepare everything to start customizing the demo app in Domino Designer. Now I want to get my fingers on the database design

Before you get started with importing the database from Bluemix into Domino Designer, Designer has to be configured to work with Bluemix. In the preferences under "Domino Designer - IBM Bluemix" you can enter the Bluemix Server URL and your username and password (if that option is not available in Domino Designer you first have to install the correct version of the Extension Library).

The URL can be gathered from the "Start Coding" page on your Bluemix dashboard.



Click the "Test Connection" Button and see what happens.
Et Voila, I am connected :-)









Now switch to the IBM Bluemix ID previously downloaded. Otherwise your application will break once you deploy modifications signed with another ID file.

To open the downloaded database from the IBM Bluemix starter code into Domino Designer, click on Tools. There should be a new menue item "Import IBM Bluemix Starter Code".














Select the downloaded Starter code zip file and click next















 After that you have to specify a Bluemix Deployment directory. This will be used for storing the configuration of this app (manifest fle) as well as to store a deployment copy of your database (more on that t later).














Final step is the selection of the organisation and space in Bluemix (in my quick and dirty setup I didn$t setup the organisation properly).














Click Finish and the Bluemix database will be imported into Domino Designer - and can be modified from there.

So what I want to do now is to implement the first customization to my application. Let's create a new XPage and see if that works on the server...








After saving the page I deploy it to Bluemix using the new Bluemix Toolbar Icon











The deployment took a few minutes - as part of the deployment the application will be updated, stopped and started again. So I assume that most of the time is needed for restarting the app (in case of such a small change at least).
















Finally, the deployment was successful.










Now let's see if the new page can be accessed...








Works like a charm :-)

Saturday, 18 July 2015

Getting started with XPages on IBM Bluemix - part I





 Well, finally it is Friday. It's been a busy week with a nice flow of Domino related development work. And tonight I wanted to take the chance to get my fingers on XPages on IBM Bluemix. So this blog post is about the steps it took me to get started...


As I do not want this experimental stuff to interfere with my work related projects I first started to update my private laptop to the latest and greatest releases (Designer 9.0.1 FP4 and XPages Extension Library 901v00_13). After that I spent some time  messing around with my bluemix account and finally creating a new one (it seems my old one has become inactive since I haven't used for too long?). Finally I was able to log in to IBM Bluemix and found the .xsp runtime in the catalog.

Create your Bluemix app
  1. Login to IBM Bluemix at http://www.ibm.com/cloud-computing/bluemix/
  2. Open the Bluemix Catalog
  3. Scroll to the very end of the catalog to the "Bluemix Lab Catalog" (currently XPages on Bluemix are in experimental stage)
  4. I first created the sample todo app from the available boilerplate by selecting the option "XPages Web Starter" in the Boilerplate section. This is the same app as shown at IBM ConnectED 2015 in Orlando.
  5. Specify a name for the app and click create
  6. Wait until the app has been deployed automatically. This will take a couple of minutes (so I guess this is a good time to get a cold beer from the fridge)...
  7. Finally, the app should be up and running:

    And tatataaaa: it can be accessed at http://rum.mybluemix.net/ 

Connect Domino Designer to your IBM Bluemix app
So the next step is to get access to the app from Domino Designer.
  1. In the Dashboard menue click on "Start Coding"
  2. Click on the button "Download Starter Code". This will download a zip file containing the NSF with the application's design as well as an IBM Bluemix manifest file.
     

    BTW: The content of the manifest file can be displayed in Bluemix by clicking on the Environment Variables menue entry.
  3. Additionally you will need to download the ID file to use this NSF and to connect to theBluemix server. The ID File can be accessed from XPages NoSQL Data Service page. To open this page, open the dashboard and click on Services to access the Data Service page.

    and from there click on the "Launch" button on the top right corner.

  4. Download the ID file from the following page - and display the password (f you don't want to guess it... ;-))
Now you are ready for opening the database in Domino Designer - but this will be covered in my next blog post.

Thursday, 16 January 2014

Some thoughts on Source Control Management for XPages development

In my career as a Domino developer I have been playing with various Source Control Managent solutions already. I used TeamStudio Ciao! for many many years and this tool proved to be a life saver in many occasions already. So I owe some drinks to the guys from TeamStudio... (don't tell them!!)

Since IBM started opening Domino Designer in Release 8.5.3 (was it 8.5.2 ???) towards the "standard" SCM systems (Git, SVN, Mercurial) I have been playing with these options a lot. There was quite some pain involved, I lost source code, my repositories lost the link to the NSF/ODP, etc... No pain, no gain! The good news for me: Today I have a working environment which fits my needs :-)
My first steps were with SVN, but I admit that I was not able to get this setup running properly. Additionally, I was not too happy about the centralized approach. That said I started using Mercurial. Finally I ended up using Git, first the implementation in Domino Designer and nowadays using SourceTree. This setup provides me with such a high flexibility with regards to my work-related projects as well with my pet-projects.

The last missing bit so far was a proper SCM system. I have been looking around for a while and playing with various systems. As I am a corporate developer, using a hosted environment was not an option at all. So I was looking for a solution to run my self-hosted SCM server for my code coming from both, work-related projects as well as pet-projects. Finally, I think my journey has ended successfully (or at least I have reached an intermediate stop). I have played with GitLabHQ for a a while now and it looks very promising to me. I got it up and running relatively painless on a local Ubuntu VM. If you are looking for a self-hosted SCM server, I can highly recommend looking into GitLab (it is very focussed on SCM though).
There is a lot of useful information available in- and outside the XPages community. In the upcoming weeks I will describe my environment and approaches and specifically GitLab a little more in detail and hopefully add some more useful bits. So stay tuned!

Saturday, 16 November 2013

iNotes calendar control - a good example to get started

In my previous blog post about the iNotes calendar control, I talked about some issues I was having with the iNotes calendar control which is part of the XPages Extension library. Yes, there are some issues, but to mke a long story short: the control is a great resource. If you want to learn more about this control, I can highly recommend to have look at the latest release of the TeamRoom Template which is deployed to your Lotus IBM Notes client.

If you want to learn more about the iNotes calendar control, check out the calendarView custom control.

BTW: On this control, I experience the same issue with the events as described here.

There is also a TeamRoom project available on OpenNTF (older version). And a demo video by Ed Brill demoing the TeamRoom template. The OpenNTF project description says:

This new TeamRoom OpenNTF 8.5.2 template has been built as a showcase application for the XPages Extension Library.  Approximately 80 different XPages Extension Library controls have been used in the construction of the TeamRoom OpenNTF 8.5.2 template, therefore making it a great learning resource on how to leverage the XPages Extension Library!

In my opinion this hits the nail on the head. This is excatly the reason why everyone learning developing XPages applications (beyond the entry level) should have a look at this template. Additionally this version of the TeamRoom template provides a much better Web UI. So your users might benefit from this template too :-)

Friday, 15 November 2013

XPages iNotes Calendar control - Events oddities

While working in one of our projects with the iNotes calendar control I experienced some oddities with the Events of this control. What I wanted to achieve is that some magic happens when clicking somewhere inside the control - e. g. opening the entry on which the user clicks... Should be pretty straightforward, I was thinking. Stupid me! As usual the devil's in the details.

I started by selecting the control and opening the events view and entered a simle JavaScript in the "onNewEntry" event. The script is supposed to show a message box after  clicking in an empty time slot.
 
In my case the result is that the event just doesn't get fired at all. I tested with FireFox, Google Chrome and even Internet Explorer. After some more testing and playing with the control I noticed an odd behaviour of Domino Designer:
As you can see on the Screenshot above, both events "onNewEntry" and "onOpenEntry" are marked blue which indicates, that there is some code in the event to be executed.  When I opened the "All Properties" view of the control to check the scripts there, I noticed that both events were empty, no script, nada, nil... Switching back to the events view, the scripts were there.





So that got me thinking. Once I entered the same code in an event from the "All Properties" view, the code is executed.

As far as I understand, the "Events" view is kind of buggy for at least this control. Besides the issue described above, I noticed that from the "Events" view I can enter CSJS as well as SSJS and Simple Actions. From the "All Properties" view, only CSJS can be used - and as far as I can see only CSJS is supported. Side note: I am using Domino Designer and Domino Server R 9.0.

 Lesson learned (again): All Properties is where you should do your work!The good news: as soon as you know how to work with this control, it works great :-)

Wednesday, 26 June 2013

XPages Gamification on OpenNTF





Last Sunday I uploaded my first OpenSource project XPages Gamification on OpenNTF. This is my contribution to the Appathon XPages development contest and my first open-sourced application ever.

I am really excited about this new experience: coding an app just for fun (yes, fun!), submitting the code to the community (plus for a judgement). I already can say for sure that it was worth the effort just for my personal experience!


There is still a lot of work to do in many different areas (UI, features, better integration in existing application ecosystems etc...), but I am already working on a first update with first bug fixes and a few more features.  Nevertheless, I am really looking forward to your feedback about my app. 

So this is it: XPages applications now can be gamified :)