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

 

Marky and John on tour in D.C. next week: 2015-07-28

Next week on Tuesday (July 28th), John Head and I will be in the Maryland / D.C / Virginia area and we would love to talk to Domino/XPages/Modern Web Apps teams about their projects and plans for the future of the platform. This is not intended to be a “can you fix this code for me” kinda trip, but more of a strategic learning experience.

If anyone is interested in meeting up please ping me marky @ myblogname . com

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.

XPages in Bluemix – Experimental is live

Finally – we have XPages in Bluemix. It is currently “Experimental” which means nothing is guaranteed to function as expected, it is basically a good Alpha made available to early adopters for testing. This means that at any time, things could change. The model, the process, the everything. So while there is much to learn, much to play with….

This is absolutely 100% NOT production ready

Here are the links to the documentation

  1. Building apps with the IBM XPages for Bluemix runtime
  2. Getting started with IBM XPages NoSQL Database for Bluemix
  3. The new OpenNTF ExtLib release

 

There is a lot to cover and I know a number of people are looking at it. XPages exists in Bluemix as two completely separate entities.

  1. The XPages runtime based on JSF
  2. The XPages NoSQL data store

Why are they not one NSF like normal??

Tony McGuckin explained it all to me in Orlando back In January. It was one of those surreal conversations where everything he said made sense as it came out of his mouth and yet at the end of the conversation I knew nothing more than – oooo that makes sense………and I am clearly now more stupid than I was 20 minutes ago. Hopefully he will be able to better explain to us some day. 

So here is what I think I understood – it is to do with the way that Cloud Foundry underpins Bluemix. The runtime container which is running on top of Bluemix has to be able to run without the NoSQL data piece. For the sake of uptime failover, scaling and other fundamental aspects of Cloud Foundry I don’t entirely understand, they are separate. A side aspect of this means that the runtime is not dependent on the Notes NSF structure to create applications.

As normal – I have way more questions than answers – so let’s get rocking 🙂

 

 

 

An introduction to creating Domino applications in the Bluemix environment – SocialBizUg Webinar July 23rd

I am very happy to announce that on July 23rd, myself and Toby Samples, will be presenting a SocialBizUg webinar with the illustrious Martin Donnelly.

The topic as the title suggests is an introduction to creating Domino applications in Bluemix.

A link for the event is provided below – We look forward to showing you this exciting new capability.

https://www.socialbizug.org/blogs/ac3c982e-c4bb-4553-ae9c-6633f03e5ee8/entry/July_23_Webcast_An_introduction_to_creating_Domino_applications_in_the_Bluemix_environment?lang=en_us

 

Abstract

Companies are looking to the cloud more and more for cost savings and to facilitate the creation of new modern applications. Join this webcast to find out how Bluemix – IBM’s Platform as a Service (PaaS) cloud offering – can help create applications quickly, securely, and in a scalable manner. Get an introduction to Bluemix, what it offers, and more specifically how XPages and REST play a role key in it.
Join this webcast and learn how to:

  • Easily get Bluemix up and running and how to create your 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.

 

This is the best part of what I do – sharing ideas.

Thanks to David Leedy for taking this at ConnectED in Orlando 2015 – check out the link at the bottom – what you can do with Google Photo is pretty cool apparently.

I was wondering around between sessions and someone came up and started asking me about Angular in XPages (which was the presentation I was giving with Mark Leusink later that day). So I got out the laptop, and set up on on the piano. It was outside of one of the conference rooms and made a convenient place for a demo. This “demo” then grew as other people came over to see what we were talking about.

I met a number of new people and we had a fantastic conversation about XPages, non-XPages, Angular.js and just stuff in general. It gave me an idea that I should just do this more often at any conference – hey, going to be on the piano outside the room at the time – come and talk let’s see where it goes.

Very good memories 🙂

Check out the animated version 🙂

https://goo.gl/photos/unqXJkWyLhvQ6KwC6

 

 

Fixing the XPages R9 dojo define.amd problem once and for all

Last week I blogged about the fact that select2 v4 used define.amd and because of that dojo screws up the jQuery plugin.

This has been a significant issue – not hard to deal with but comes up all the time for XPages eedevelopers.

In the blog post comments Ferry Kranenburg posted a link to a solution he uses which is also an XSnippet. It is brilliant.

What he does in the XSnippet is:

  1. duplicates define.amd to define._amd
  2. deletes define.amd
  3. loads the AMD enabled jquery plugin (successfully)
  4. duplicates define._amd back to define.amd
  5. deletes define._amd

Rather than post the code here I want you all to go to the XSnippet and get it from there – and vote it up while you are there.

f1

Personally I would prefer not to use <xp:this.resources> or at best use them wisely and you could easily write this without using resources should you so chose.

Big Problem – simple and elegant solution – well done Ferry and thanks for Sharing

Now go vote up his XSnippet !!!