XPages runtime in Bluemix goes Beta

On January 21st IBM announced that the XPages Runtime as entering the beta release phase. The announcement was posted on developerworks By Brian Gleeson – https://developer.ibm.com/bluemix/2016/01/21/announcing-beta-release-ibm-xpages-runtime/ This signifies a very important milestone in the process of becoming a fully fledged member of the Bluemix family of capabilities.

What does Beta mean?

Well first of all the runtime now appears on the main catalog and no longer hidden in the experimental section. You can find it in the main catalog under Runtimes and when you create a new application is part of the list of runtimes available.

b1

b2

Beta also means that there is an expectation of reliability within the cloud. Going through the Beta phase means that although IBM are not fully committed to their SLAs for delivery quite yet, they are basically expecting the runtime to perform as if it was. This means a more reliable availability, and more importantly, IBM cannot just “make changes and take stuff down” as they feel like it. Being experimental means that there is no guarantee of it even being there tomorrow.

Beta means that we can start to talk to customers about it as a real possibility. Once again, Beta means that IBM is expecting people to actually start to create prototype applications which can be used in real discussions for Application Modernization and migration scenarios.

Beta means that the end goal initial release is now much clearer. Going through the experimental phase we have seen a large number of improvements and changes to both the runtime and the OpenNTF Extension Library releases support the programmatic interaction with it. IBM’s intention is to support a hybrid model with the release of XPage in Bluemix. Currently, we do not know the future of the XPagesNoSQL service but that is still experimental.

IBM is pressing forward with the release of the runtime and the Hybrid model. For more information on this, check out another post by Brian on YoutTube (https://youtu.be/WsjQ4hjJ10E). The Hybrid model means the ability to run a trusted server in the Bluemix container and having it securely interact with your Domino server(s) back within the corporate environment. This means the data and authentication model does not leave the company, while the runtime can be used to take advantage of all the cloud foundry capabilities like fail-over, multi-instance deployments and much more.

Beta means that this is real people – most of the investment by the XPages development team, under the guidance of Pete Janzen has been in preparing XPages for Bluemix. This is a significant step in the product evolution. I fully expect that more information will be released in the App.Next presentation to be given at Connect 2016. Hopefully the expected deadline for the full release date will be shared.

More announcements coming soon

For those of you going to Connect make sure you check out the sessions on the XPages runtime and Bluemix

1529: IBM Domino App.Next – Broadening Your Horizons with Bluemix

1075: The XPages of Things: Integrate Bluemix with Your XPages Applications for a World of Possibilities

XPages in Bluemix: Creating a searchable REST service

In this article I will demonstrate how we can set up a new searchable REST service in an Bluemix XPages environment.

Introduction

This article was driven by a question on Twitter from Paul Ramos (@parf82) who asked how to search a database in Bluemix. The answer is of course, in the same way that you search it not in Bluemix, using an FTSearch. The more pertinent questions is really how to make the XPages runtime find the application to search in the first place.

Creating the base application

If you follow this video by Brian Gleeson you will be able to create your first application in Bluemix. Once you have that you can manipulate the environment to your hearts content. There are multiple, documented, methods for updating your XPages environment in Bluemix, I prefer to create a Git repository. As Toby and I demonstrated in the socialbizug webcast you can download the application design, manipulate it and send it back to Bluemix as one.

Manipulating the boilerplate

I have the initial boilerplate code cloned to my local hard drive.

bl1

First step it to edit the Manifest and get rid of the Boilerplate application. Why, you ask? Well this way you have the manifest and everything else configured for you nicely. You can do this from scratch but I generally find this mentally easier to work through.

bl2

I renames the application from todo_design to xpages_design.

I took a design copy of my extjs database and saved it in the git repo folder. The database can be seen at (http://demo.xomino.com/xomino/extjs.nsf) which is at it’s heart just a modified fakenames.nsf database (http://www.xpagescheatsheet.com) from David Leedy.

The reason I chose this database is that it contains a lot of REST services already in a normal XPages environment.

bl6

I then had to create a copy of the database itself in the Bluemix NoSQL environment.

bl4

bl5

Quick review

We now have the database split into two separate pieces

  1. The data on slaney/bluemix
    1. https://xpages-domino.ng.bluemix.net//bluemix/PSC_Playground/Hybrid/extjs.nsf/ByName-First
  2. The design xpages_design.nsf – currently in my local git repo

Putting the data directly on slaney – very possible and works in a view as expected

bl7

But if we try and access an XPage – it doesn’t work – which is what we would expect.

Accessing the data from the XPages runtime

Back in our xpages_design database we are going to create a normal REST service – but we have to use the new BluemixContext object to find out the path for the service (https://www.ng.bluemix.net/docs/services/XPagesNoSQLDatabase/index.html#xpservice_portexisting).

 

				<xe:restService id="restService3" pathInfo="byFirstNameBlue">
					<xe:this.service>
						<xe:viewJsonService viewName="ByName-First" start="0" count="100" defaultColumns="true" databaseName="#{javascript:bluemixContext.isRunningOnBluemix()? bluemixContext.getDataService().getHost()+'!!' + bluemixContext.getDataService().getRootDir() + 'extjs.nsf' : 'extjs.nsf'}">
						</xe:viewJsonService>
					</xe:this.service>
				</xe:restService>

The bluemixContext values are derived from the VCAP_Services variables made available to the XPages in Bluemix service through Cloud Foundry. An example is shown here – it is available from the Bluemix dashboard for your XPages by clicking on the ^ arrow on your NoSQL database service.

t1

Viewing the result

Once we have pushed the REST service design changes back up to Bluemix we should be able to see them. Once we correctly create the URL to the rest service. In this case “xpages_design.nsf/xRestService.xsp/byFirstNameBlue”

http://xpages.mybluemix.net/xpages_design.nsf/xRestService.xsp/byFirstNameBlue

 

We are able to demonstrate the new searchable REST service by manually modifying the URL and adding search parameters:

http://xpages.mybluemix.net/xpages_design.nsf/xRestService.xsp/byFirstNameBlue?open&search=smith

 

 

Conclusion

In this article we have seen that we are still able to use the XPages out of the box rest service to communicate between the design database and the “data” database. All the out of the box functionality is available as if it were an on premises application. We also saw the usage of the new bluemixContext to find out where the data database resides within Bluemix.

 

 

MWLUG 2015 – IBM Bluemix: Expand Your Horizons – Coolest demo ever !

In two weeks time Ryan Baxter and I will be taking the stage to talk about IBM Bluemix and how Domino/XPages developers have a whole new vista of opportunities open to this in IBM Bluemix.

I look forward to seeing many old friends and new faces there – please stick around to the end for what will hopefully be,

The coolest demonstration in the history of MWLUG

When?

Thursday August 20th – 4:00pm AD105: IBM Bluemix: Expand Your Horizons

Abstract

As a developer, you always need to add new tools to your developer tool belt.  Bluemix gives you many options to take what you already know and build upon it, allowing you to continuously reinvent yourself and your apps. Whether you are an XPages developer looking to leverage new technologies like Watson or Docker, or you want to start exploring new languages and frameworks like the MEAN stack, Bluemix has something to offer you.  Using the powerful deployment models and integration services in Bluemix, it is also easy to build solutions that combine the new with the old making it easy to build upon the work you have already done.  Expand your horizons, improve yourself and join us for a whirlwind tour of what Bluemix has to offer you!

 

Be there – or hear about it from your friends……….

An introduction to creating applications in the Bluemix environment – now available

socbizug


An introduction to creating applications in the Bluemix environment


If you missed our recent webcast, “An introduction to creating Domino applications in the Bluemix environment”, don’t worry – it’s now available on-demand. You can view both the video replay and presentation easily right from your desk.

Watch this webcast and learn how to:

  • Easily get Bluemix up and running and how to create you own XPages applications quickly
  • Integrate with the other services available within the Bluemix ecosystem
  • Maximize the new and exciting possibilities this integration opens up to the Domino community            
   
unnamed

 

XPages in Bluemix (experimental) is live

XPages is now available as an experimental release in Bluemix. As of July 2015, anyone can sign up for a free Bluemix account and try out the new XPages in the cloud capability.

What does Experimental mean?

Within Bluemix there are three levels of capability “completeness”. Experimental, Beta and Production ready. Experimental has no Service Level Agreement, no promise of availability and the code base can change at any time without notice. The reason IBM uses this level of completeness is to test drive an application’s capabilities and to elicit feedback from users. They understand that XPages in Bluemix is different than what we are used to on premesis. There is some getting used to the difference in coding patterns when we want to to “@DbName()” for example is now – bluemixContext.getDataService().findDBName().

So experimental means is that it is not production ready and IBM is honest and open about it. For me, it is better to have something than nothing and exciting to thing that in some small way I might be able to help drive the direction of the platform in this manner. Don’t forget – so can you !

Capabilities

The current version of XPages release on day 1 does not have all the same features as an on premises installation. For one, as a developer you do not have direct access to the server, you do not have programmatic access to the server. Your code will run as a designer, but never as an administrator. You cannot have multiple databases on the same application route. This means that many on premises application cannot just be ported straight to Bluemix. Notes client applications will not run in Bluemix (oh well eh……..)

And at the same time there are features and capabilities within Bluemix that are not available  on premises. Some examples are:

  • Scaling you application and running it on multiple instances
  • Automatic failure and restart if the application crashes (which is does, this is experimental after all)
  • Integration with a multitude of services that do not exist on premises
  • Git source control integration at the click of a button
  • Devops capabilities like:
    • Automatic Build and deploy
    • Monitoring and Diagnostics
    • API Monitoring tools
  • Hybrid capabilities
    • The ability to run an XPage application securely, in the cloud, while accessing data securely through an encrypted tunnel back inside the enterprise.
  • and the list goes on……
  • Watson
  • Twitter
  • and on…..

Feedback for IBM

If you have any questions and or would like to get more information on XPages in Bluemix there are a number of ways you can do that:

So how can I get started?

  • Go to http://www.bluemix,net
  • Sign up for a 30 day free trial
  • Follow the instructions and guides shown below
  • Watch videos, read blogs and learn

I started using Bluemix so that I could prepare for XPages arrival, but also so that I could learn new technologies like nodejs and cloudant. As I mentioned before, I strongly recommend you take this as an opportunity to broaden your horizons and learn something new.

Resources

To get you going here are some resources to check out for more information

Enjoy

 

XPages in Bluemix – Pushing new changes via Bluemix git repository

In this article I will look at modifying the out of the box boilerplate application and starting to look at the tooling around the new XPages in Bluemix capability. I will specifically talk about the use of the Bluemix integrated git repository.

Introduction

In the previous article I walked through the basic steps of creating the boilerplate XPages application in Bluemix. So let’s look at what we created and how we can mess with it 🙂

The Dashboard

Looking at the dashboard for our new boilerplate application we can start to see a number of items. On the top right there is an option to Add Git

h2

Continuing will create a git repository within the Bluemix integrated jazz hub repository. Once complete you will see a link to the new repo

h3

Clicking on the link will take you to the repo page

h4

We can immediately see from this image that it is not quite what we normally expect from a “source control repo” for XPages development. The entire NSF is part of the repo……but let’s go with it.

Click on the “Git URL” link to get the URL for the repo

h5

I use source tree for this part of the process – Clone New and use the URL for the repo – you will have to log into IBM as well

h6

Once complete you will have the repo locally – it can then be opened in Domino Designer

h7 h8

 

As we have seen before – we have the to do boilerplate application – to which we can add a new simple XPage

h9

h10

Note

You must be using the notes ID provided by bluemix for your notes applications.

Build and then close the application in designer

Within Sourcetree – we commit the changes in the master branch and push to repo

h11

h12

Once that is complete we can refresh the jazz hub repo page and see the committed change

h13

When we created this repo in Bluemix, the automatic build and deploy tasks were created as well – so clicking on the “Build and Deploy” tab on the top right takes us the deploy page where we can see this in action

h14

Once that is complete we can go over to our application http://hub.mybluemix.net/ToDo_design.nsf/marky.xsp and there it is

h15

Conclusion

Using this method we are able to upload a new XPage into the application without using the built in tooling in OpenNTF release v13

Caveats

I did have a build issue, don’t know why (experimental code) but clicking the redeploy button fixed it.

Don’t forget to build before you send to Bleumix (duh Marky)

I am not sure I recommend this manner of deploying an application to Bluemix via this method – I just wanted to see if it was possible.

 

 

 

XPages in Bluemix – Looking at the application dashboard

In this article I will explain the XPages in Bluemix application dashboard and what is available to the developer from the Bluemix web interface.

The Dashboard

Once you have created your new XPages application in Bluemix it will appear on the “Dashboard” with a weird spacecraft for an icon.

b6

Clicking on the box will review a lot about your application

b11

Link to the application

Clicking on the link at the top left will open your application in a new window

Clicking on the pencil next to it allows you to edit and / or create an additional subdomain for the application (yes it can have many)

b12

Add Git

Clicking on this link will automatically create a source control site for this application

b13

Memory allocated ($$$)

By default the application has 512M allocated to it. Once XPages in Bluemix goes live this will become more significant – this is the number by which Bluemix determines how much you get charged each month. Throughout Bluemix you are charged by the GigaByte hour. That is the number of Gigabytes utilized by a running application each hour. so in this case 512M for an hour is 0.5 Gigabyte hours. Over a typical month that is 720 hours, or 360GBHours. The free allocation is typically 375hours. So this one application running for a month is all you would have “free”. You can reduce this value through the menu, but what you need will be based on your application. Right now (July 2015) XPages is free – keep an eye on it !!!

VCAP services

On the bottom of the smaller box for IBM XPages NoSQL Database you will see a down arrow – if you click on it you will see what are called the “VCAP” services. These are the Cloud Foundry Environmental Variables.

“Environment variables are the means by which the Cloud Foundry runtime communicates with a deployed application about its environment. This page describes the environment variables that Droplet Execution Agents (DEAs) and buildpacks set for applications.”

b14

This JSON construct is critical to telling Bluemix how the XPages boilerplate application works. When you use the self selection to deploy the application all this information is created on the fly. Looking at the labels for the data they should be relatively self explanatory for a Domino developer.

 

 

 

 

 

XPages in Bluemix – where is the design and where is the data?

Digging into the code for the example database – aaaah memories – but I digress…..as normal I am mostly blogging this for my own notes and if someone else happens to get something out of it – great 😀

Design and Data are separate?

So the design and the data are separate – well kinda – in fact “some” of the design is separate and “all” of the data is. Following the instructions on how to deploy the starter code and mess with it I managed to change the database and add a new XPage.

BTW for those who cannot find “Start Coding” it is here….took me ages to find it in front of my nose

b1

Notes client

So the database look like this in the notes client – pretty normal

c1

and viewing the design of this database we can see forms, views and No XPages of worth

c2

The data can be changed through the notes client and immediately represented on the website

c3

The Design

Looking at the boilerplate code which was downloaded from starter code we can see – no data, no form, no views – but there are the XPages

c4

New design elements

So I created a XPage in the Design database and followed the instructions on deploying the new code – it worked

c5

Adding a new form to the VIEW database, failed.

Adding a new form to the DESIGN database worked just fine

c6

 

Conclusion – So where is everything again?

Views and Data are in the NoSQL database

XPages and Forms and in the Design database

There is a lot to learn here……..and a lot of questions….

Creating my first true XPages in Bluemix application

In this post I will document my attempt to create my first XPages application in Bluemix. I will be following the documentation (ish) and also clicking around to see what happens. This was written July 2015 and is likely out of date soon after.

OpenNTF

I installed the new ExtLib by downloading the last release, then in designer installing the new eclipse plugin. This is not necessary for the sake of this post but will be later.

Bluemix

Go to the Catalog, then scroll to the bottom and select “Looking for more”

b1

Then from the next page select the XPages Web Starter

b2

 

You will then get the screen to create the instance – over on the right give it a name – in this case I called it xpages

b3

Select Create

and you will get a screen telling you it is being created

b4

b5

 

Click on the “Dashboard” link at the top

b6

Click on the box for the new application (xpages in this case)

b7

Then we click on our new application link at the top – http://xpages.bluemix.net and there we have it.

b8

 

Conclusion

Setting up our first application was a very simple set of clicking options. This is cloud – self service deployment of services and capabilities.

IBM Bluemix – take your skills to the cloud

This article was originally posted on SocialBizUg.org and is being reposted with permission (Feb 2016)

Hi!

For whose of you who do not know me. my name is Mark Roden and for those who do not know me I am a Web Developer for PSC Group LLC in Chicago,IL.

I have been awarded the honor of being an IBM Champion for 2014 and 2015. You can find out much more information about me on my blog – http://www.xomino.com and you find me on twitter @MarkyRoden

My Evolution

My career has been built on Lotus Notes, Domino and in the last 4 years XPages. I call myself a web developer because that is what I do, I build websites.

What my progression through Domino and XPages has taught me is that evolution and progression as a developer is essential, necessary and a lot easier than having to deal with other people forcing you to adapt on their time frame.

Everyone is different, some are drawn to the logic of a database interaction some to the user experience and some in the middle. Many classic Notes developers kinda fell into it without having a classic programming background. The great thing was Notes was the Model (Data), the View (Notes form) and the Controller (LotusScript) all at the same time. This made life easier, quicker and ultimately served the point of Rapid Application Development.

Today “RAD” is often done using tools which don’t require any programming whatsoever. With online tools like Quickbase and a host of others, users are able to create websites which collect and process data, run basic workflows, send emails and perform tasks, without programmers. But there is still a pervasive need for programmers, to automate those tasks which cannot be simplified to a couple of screens and an approve button.

Programming The Future Cloud

Cloud is something which has been around forever. From Compuserve to yahoo mail, cloud as a service has existed for decades. What has changed is not only a better marketing strategy of managed services, but a general acceptance that connectivity, security and critical business services can be run on other people’s networks.

Cloud is many thing to many people, Software as a Service (SaaS), Infrastructure as a Service (IaaS) and Platform as a Service (Paas). In our XPages world the cloud we have been able to use for a while not is Softlayer which is really IaaS. Someone else provides the hardware and network connectivity, but you have to run the server and patch it yourself. Platform as a Service takes care of that as well for you. With a PaaS you are entirely responsible for how “much” of a server you need, not the server itself. For more on what is cloud check out this link (http://www.ibm.com/cloud-computing/us/en/what-is-cloud-computing.html)

IBM Bluemix

IBM Bluemix is a Platform as a Service (mostly) cloud offering and XPages is coming to it. In June 2015 IBM will release XPages in two available forms within Bluemix. The release will be “experimental” which means

  1. Free
  2. Not perfect yet but in principle functional.

XPages will be offered as a “Build Pack” which means you can use the underlying XPages JSF runtime to build your apps on it, and it will also be offered as purely a data storage NSF. This means that you will be able to use a non-XPages buildpack to be able to run your web server/application server and use Domino as a data store.

To find out more about IBM Bluemix you can sign up for a free account at http://www.bluemix.net – for at least the next 6 months the XPages runtime and data store will be free to use without limitations. Once it goes from Beta to production ready the cost will be based on usage.

Your Evolution

Going back to my original point of evolving as a developer, this is an amazing opportunity to be able to play with something completely new, while at the same time using something which is completely familiar. Ignoring all the business benefits of a PaaS for the moment and focusing solely on a personal growth perspective, this is an amazing opportunity to learn.

Within the Bluemix environment, one of the things I have learned to appreciate is the working tutorials which are provided. IBM is also pumping out lots and lots of example blog posts and code samples so that you can begin to learn all the cool features.

If you have been struggling with XPages and or the idea of writing Java – no worries!! Bluemix gives you an opportunity and a chance to still work with something you know, the data model (Domino data), and at the same time learn something new like node.js (A powerful, scalable web server coded entirely in JavaScript).

Evolve yourself, it will be the best decision you have made in years.