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
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
Save the form
Now you need to create the lookup view, create a view called byKeyword
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.
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.
‘
And in my XPage I have added an Combobox
And in the values tab click on the “Add Formula Item” button
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!!!
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
Click on new Repository at the right hand side of the UI
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
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
Copy this URL into your application and clone the repository.
And you are ready to get the most out of your development.
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.
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.
How many paper based-routines does your company have?
If you are lucky you can answer none on this question, but are you sure?
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
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 thatIBM Domino is a great tool to create these types of applications that’s why my companyQNova Systemshave 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.
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.
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.
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
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.
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.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.
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
Select general -> file system to import files and folders
Browse for the from folder, any subfolder will be the top folder when imported into web content in this case bootstrap
And then your files and folders look like this after the import
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.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.