What can we expect from Apple today and where can I watch the event?

  • IOS 8 with Release around the 15:th of September – Ultra high
  • a new IPhone with larger screen – Very high
  • NFC and iPay, apples take on mobile payments – High
  • iWatch, the only watch you ever need – Medium
  • iHealthband, a wristband that monitor you health – Medium
  • a new Corporate appstore with IBM – Low
  • New IPad – Low
  • New Apple TV, with appstore – Low
  • New iPod – Low
  • iGlasses, Apples take on the Google glasses – Low

You can watch the Apple Live event from this URL
but you need an IPhone, iPad or Mac OSX with Safari to watch.

What would you like to see Apple release today, write a comment.

Evolving the easy XPage keyword bean

The first part of the easy keyword bean can be found here

When working with keywords in XPages your application could greatly take advantage of the possibilities in the XPage Engine. Thru caching of data, What do I mean with caching?

Well today the keyword bean is located in viewScope and that means that it lives only on the current page that is opened. If you move the bean to applicationscope and add some caching functionality we only need to go into the database if the keyword never have been fetched before.

But there is a problem when moving things into applicationscope that is multi user access, and that can easily be solved using synchronization or threadsafe objects.

Another thing is that you need to maintain is keyword updates because they need to be maintained but that is also easy to solve because if you write the Keyword edit save using XPages that you can update the keyword when saving a keyword.

OK so how do we change the code so we get a common applicationscope keyword bean.

first we add a Global CacheObject and next we check against the GlobalCache Object before accessing the database. And we also need a recache option for a certain keyword to get it refreshed when you have saved a keyword.

Let’s Look at some code

we start by importing java.util.concurrent.ConcurrentHashMap and setting up the hasmap object as a cache object. I use the concurrenthashmap to get a threadsafe Cache object in my application scope bean.

We also need to change the object from static to be an ordinary Java object because it will live in the applicationscope. Another thing we also need to implement is serializable if the server want to store the object on disk for any reason.

Let’s move over to the getKeyword function. What we need to do is to check if the keyword is in cache and if it is, return the cached data. If it isn’t found get the data like before and store it in cache and return the data.

And because I call getKeword from the function getKeywordString I only need to change getKeyword when implementing this new functionality.

The last thing we need to add is the recache function, and that one will be a function that clears the data in cache so the next request to get the data will do it from the database.

I almost forgot, we need to change our managebean also and move if from viewScope to Application Scope in the faces-configt.xml file

If you want the full code for this check out this xSnippet on openntf.org

Creating an easy XPage keyword bean

Flexibility in applications is always a great thing, to adapt the application to the business needs without recoding things. And if adding this flexibility can be done without lots of code, you will probably use it.

This is one way of creating a keyword data bean for you XPages.

Start by creating a form named Keyword, in this form add the fields Name and Data, add the multivalue checkbox in the datafield question079

 

 

 

Save the form

Now you need to create the lookup view, create a view called byKeyword

question080

 

 

 

 

Add 2 columns name and data. The name column should display the name of the Namefield and it must be sorted and the second view should show the data field, Save the new view.

Let move over to the interesting code, create a new java class named FormHelper and place it in a package, I call mine com.xpagedeveloper.

question081

 

 

 

 

 

 

 

 

I create two functions, the first one will return return a vector with the data from the keyword.

And my Second function returns string from the array separated with a string of your choice

After I add the bean init setup in the faces-context.xml in the WebContent\WEB-INF folder from the package explorer.

Now it’s very simple to get keyword values to you fields and functions inside your XPages.

Create a Keyword using the Keyword form, in this case I’ve created a Keyword named Category and added some values to it.

Snap2

 

 

 

And in my XPage I have added an Combobox

question094

 

 

 

 

 

 

 

 

And in the values tab click on the “Add Formula Item” button

question095

 

 

 

 

 

 

 

And write the following code

question096

question097

 

 

 

 

 

 

 

 
If you want the full code for the bean, it can be found here as an xSnippet

Now your XPage application is more flexible without lots of code.

Take the time and show some appreciation for someone, I will!!!

It’s that time of the year where IBM want you to nominate the people that bring the ICS Community forward. There are several ways of doing this, an IBM Champion could be someone that helps people on stackoverflow, share projects on openntf.org or just some great xSnippets. Perhaps someone of the great bloggers  on Planetlotus.org. Or perhaps one of the great people how speak at conferences like IBM Connect or some local event.

Nominate a IBM Champion now, it’s a great way to show that you like what some people do and what the IBM Champion Community does. You can nominate more than one Champion and you don’t have to fill out all fields, the reason why and perhaps some links to content is probably good.

Take the time and show some appreciation for someone, I will!!!

 

Creating your first XPage Repository using GitBlit

If you read my last article about setting up your own GitBlit Server with Domino credentials this is the next step. Creating your first repository and pushing up an xpage application to the server.

Login to your git blit server and click on the repositories tab

Snap64

 

 
 

Click on new Repository at the right hand side of the UI

Snap66

Give your new repository a name, and write a description if you like.
There is lot’s of other options that you can setup but they are not needed for this example.

Click on the access permission tab

Snap71

 

Add owners to the repository, change the access restrictions so your users can view, clone and push.

Also change the authorization control for the users. Now your repository is ready to be saved, so Click on Save.

When the repository is saved, it’s time to get the Repository URL that we need to clone the repository.

Click on your prefered git client software, my prefered client is SourceTree
Snap68

 

 

 

 

 

 

Copy this URL into your application and clone the repository.

And you are ready to get the most out of your development.

Internet of things is that something to care about

Finally is the revolution here, since I’ve started as a developer I have waited for this. Integration of things is really interesting. And will help us a lot, you might say why should my coffee maker be connected to the internet?

The answer to that is how many times have you asked yourself, did I turn off the coffee maker. That’s only one thing, add sensors to everything in your house and you can start to get an alarm if there is an water leakage, a fire is starting, the sensors can be added into so many things in houses, cars and electronics.

And the great thing is that the connected sensors can be used for private and company use and because the cost isn’t that high for the sensors we will start seeing lots of these both at work and at home. And then we also have wearables that can monitor your health or why don’t we have a sensor that will vibrate so you don’t hit your head in a low door post like a parking sensor for humans.

This is some very interesting IoT platforms to follow

Arduino – This is a great platform to create your own IoT platform, there is hundreds of IoT and sensor projects already created.

Espruino – an hardware board like Arduino but this board has Javascript as the language to develop software that runs on the board. Great for developers that doesn’t want to learn yet another language.

Little Bits – Another great platform to create great things fast. They have now released cloud bits that you can connect using IFTTT

Little bits have lots of bits that dies different tasks. But the latest two makes them more interesting that that is the cloudbit and the arduino bit.

It’s Lego for Internet of Things.

NEST – The newly Google bought smart thermostat company. This will probably be the start for the Google connected house.

20140727-093143-34303123.jpg

bluemix

IBM BlueMix has an IOT communication capabilities so this is also an interesting platform that you should keep a close eye on.

 

 

 

My conslusion is that YES, Internet of Things is very much something to care about as an developer because the system you create will with most certainty connect to things or wearables in some way.

If you have some more interesting IOT:s that you want to share please comment.

Why you should move all routines to an application

How many paper based-routines does your company have?

If you are lucky you can answer none on this question, but are you sure?

paperbased

  • What about vacations
  • When you are sick
  • Expence report
  • Time report
  • Purcase requests
  • Travel expense requests
  • Performance Appraisals (PA)

And there is probably lots more routines

If you still can say no, then your company has came very far and you are one of the lucky few employees that can work 100% digital.

These are some reasons why your company should move towards getting these routines/reports into an electronic workflow if your company still have paper-based routines.

These are my top 7 in no specific order.

  • Speed
  • Geographical boundaries
  • Easier reporting
  • Easier to follow up
  • History, who did what and when
  • Handling cost
  • Environment

paperfree

Considerations when moving to an electronic workflow

These are some things that I need is

  • What devices are the users going to use when doing the reporting
  • Create / buy an application that support more than one workflow in the same application
  • Possibility to change the workflow with minimum cost when the business needs change
  • Alarms/ Notifications to the users when certain criterias happens

A flexible system should be able to

  • Easy to adapt the reports/routines into what data you need to collect
  • Handle more that one report/routine type
  • Can handle different access levels
  • Have alarms when things need attention
  • Can export reports, so you can do statistics
  • Easy to search for reports

I could probably add some more things but these are the most important one, if you ask me. The great thing is that IBM Domino is a great tool to create these types of applications that’s why my company QNova Systems have built all of our applications on this platform and have NO plans of moving away from this platform. Because of the security, rapid development cycle, and document centric data model. We are expanding our suite of applications and will deliver even more corporate applications in the future both for on premise and cloud based deployment. To help companies move away from paper-based work and into a faster and better world, where we don’t cut down trees to print things out, and throw it away.

Go Green with IBM Domino

Go Green With IBM Domino

Another great developer book found

Summer is here and book reading time for me is also here, I’ve read and added this great resource to my desk at work, JQuery and Javascript Phasebook.

JQuery And JavaScript Phasebook

I often like to have all my resources as pdf files but in some cases a reference book can come in handy. Easy to pick up without the need for extra screens (They are full with applications anyway)

This book is one of them, if you develop using jQuery this book has lots of short code snippets that will come in handy when developing using JQuery and Javascript.

 

 

 

The book has the basics of setting up the JQuery framework and start using it to creating Dom nodes, setting css styles,classes. Adding animations to elements and also a little section on how to use JQuery mobile.

And the great part is that the book has quick explanations and then a code snippet that you can test, So you will get a great reference guide and also learn to use jQuery more when you develop new applications.

The books developer audience is developers that isn’t experienced JQuery Developers but what to get started or just started to use JQuery.

Get your own copy here or from amazon

Setup a Free Git server with Domino Credentials in a few minutes

Today I’m going to show you hav to setup you own internal Free Git server in five minutes

Make sure that you have java version 7 installed in you windows server. JRE or JDK any version works. If you don’t have one goto java.com and install the a java jre.

Goto the java download page scroll down to the bottom of the page and download the JCE

Java_JCE

Open up the downloaded zip file and copy the 2 selected files

To the folder lib\security below your java installation folder in my case it was

C:\Program Files\Java\jre7\lib\security you might need to replace existing files nothing to worry about.

This is needed to be able to create the certificates later.

Next step is to  gitblit.com wher your download the Go Git Blit Server for Windows or if you are using Linux or Macosx use that version.

GitBlit

Unzip the zip file in the root to a folder called gitblit or a suitable sub folder, if you change the folder you might need to change url:s in the .cmd files.

Configure GitBlit

We are now going to configure gitblit to use LDAP as authentication method

Open up the file gitblit.properties in the data folder, search for the keyword realm.userService edit this line so the line should look like this realm.userService = com.gitblit.LdapUserService

Setup the connection to the LDAP server

realm.ldap.server=ldap://localhost change the row if your LDAP server isn’t on localhost remember if you want to connect to a domino server and it’s hosted on a windows machine that has AD LDAP on it you need to change the port for the Domino LDAP service.

The syntax if you want to change ip or port is like this ldap://192.168.10.10:399

You also need to change the login user to be able to use the domino LDAP Service

realm.ldap.username = LDAP Manager

realm.ldap.password = your password

To a Domino user and password

Clear the accountBase so it will search all Nodes

realm.ldap.accountBase=

Change the accountPattern to

realm.ldap.accountPattern = (&(objectClass=person)(cn=${username}))

Empty the groupBase to search all nodes for groupsrealm.ldap.groupBase =

And the groupMemberPattern to find groups

realm.ldap.groupMemberPattern = (&(objectClass=group)(member=${dn}))

realm.ldap.admins can be edited to add a admin group from LDAP

change the row realm.ldap.email from email to mail

And the row realm.ldap.uid also to mail

Important last step, search the file for localhost and remove that otherwise gitblit will only operate on localhost and you can access it from another machine

Save the file

Generate SSL Certificate

In the Gitblit folder in my case c:\GitBlit there is a cmd file called authority.cmd (if you have another url you might need to modify the file)

start authority.cmd add the information about your certificate

Write the password for your keystore, write gitblit if you don’t want that password you need to edit the gitblit config file so the password match.

The keystore is generated and the cert admin is opened

Close the Window

Start the Git Blit Server using the gitblit.cmd the server will now start in the window.

Your Git server should be up and running now. Let’s access it thru a browser.

Write https://servername or ipadress or localhost and end the adress with :8443

but if you want to use http instead you need to edit the gitblit.properties and change the row

server.httpPort =0 to have the port for the http server i.e. server.httpPort = 8080

The GitBlit interface will load.

Try to login using your Domino credentials

When you have logged in, logout again and login using the standard admin user

username: admin password: admin

and assign yourself as an administrator and change the password of the default admin

Login with your user again

Now your ready to create your first repository

Next step is to connect your git client to the repository. Some clients like sourcetree needs a special setup to accept ssl that is created using a self cert. But that is for the next post.

Importing a Files and folders into a IBM Domino database

I saw a question today inside a linkedin forum about how to import files and folders into a Domino database and there are several ways on how to do this. Check out these three ways of importing files and folders into your nsf file.

1. Import the files into the webcontent folder using package explorer. using import

Snap17

 

 

 

 

 

 

 

 

Select general -> file system to import files and folders

eclipse file import

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Browse for the from folder, any subfolder will be the top folder when imported into web content in this case bootstrap

eclipse file system import

And then your files and folders look like this after the import

Snap20

 

 

 

 

2. Enable the database for webdav then you can connect to the database using windows and upload the folder/file structure into domino. Super simple and quite easy to maintain. (Link to how to setup this or this old Codestore post)

3. Build an agent that will import the file resource using dxl check out this TLCC article in how to import using DXL.