193 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Building the Release Definition
Wed, Apr 5th 2017 6
Creating A Dummy Service In Rancher
Tue, Apr 4th 2017 8
Adding A Dockerfile to the project
Mon, Apr 3rd 2017 9
Getting Your Rancher API Keys
Fri, Mar 31st 2017 5
Defining Your VSTS Build
Thu, Mar 30th 2017 7
A VSTS Build Agent For Rancher
Wed, Mar 29th 2017 12
Extending Your Rancher Environments
Tue, Mar 28th 2017 6
Top 10
A VSTS Build Agent For Rancher
Wed, Mar 29th 2017 12
AJAX and ThymeLeaf For Modal Dialogs
Fri, Mar 24th 2017 10
Controlling The Frontend
Wed, Mar 8th 2017 9
Setting Up Your Rancher Infrastructure
Mon, Mar 27th 2017 9
Adding A Dockerfile to the project
Mon, Apr 3rd 2017 9
Getting started with IntelliJ
Wed, Feb 22nd 2017 8
Add The People By Location Page
Fri, Mar 17th 2017 8
Creating A Dummy Service In Rancher
Tue, Apr 4th 2017 8
Deploying Your Applications
Mon, Feb 13th 2017 7
Mapping Out Your Ideas
Mon, Feb 27th 2017 7


Declan Sciolla-Lynch
Blog Title Dec's Dom Blog
Blog Description Domino, Java, DevOps and more...
Blog URL http://www.qtzar.com
RSS Feed http://www.qtzar.com/feed/
Validate Feed feedvalidator.org or validator.w3.org
Feed Last Checked Apr 05, 2017 12:30:44 PM EST. Realtime Update:
Location


Recent Blog Posts
6
Building the Release Definition
Wed, Apr 5th 2017 12:30p   Declan Lynch
The Release definition in VSTS allows you to define the steps needed to be taken to deploy a build of your application to your deployment environments. On the Releases tab of your project you click on the ‘New Definition’ button and then select the ‘Empty’ profile. On the next screen it will automatically fill in your current VSTS project and the VSTS build definition so you can just go ahead and click Create. First things first is rename the autogenerated definition nam
8
Creating A Dummy Service In Rancher
Tue, Apr 4th 2017 12:30p   Declan Lynch
The last thing that we need to do before we can create the deployment scripts is to create a dummy service in Rancher that we can then replace with our deployed application. We need to do this because our deployment scripts need to reference a service id and will fail if the id doesn’t exist yet. In the Rancher interface create a new ‘Stack’ for your applications. Stacks are a way to organize different applications together. Give your stack a name and click on the create butto
9
Adding A Dockerfile to the project
Mon, Apr 3rd 2017 12:30p   Declan Lynch
Before we can deploy anything to Rancher it needs to be in a docker image so I’ll be asking my VSTS scripts to build a docker image that can then be uploaded to a Docker container/image repository before being deployed to the Rancher server. To create the Docker image I need a Dockerfile added to the project and I need to also tell my build script to copy it to a location that the release script can access. First I will create a new folder in my project under src/main called ‘docker&
5
Getting Your Rancher API Keys
Fri, Mar 31st 2017 12:30p   Declan Lynch
Before we can start the process of automatically deploying our application to Rancher we need to setup the API access keys that will allow you to use the Rancher Command Line Interface and API. Load up Rancher and log in as your administrator account and make sure that you are in the correct environment ( you will need to do this process in each environment that you will be deploying to ) and then go to the API menu. There are two kinds of API keys in Rancher. There are Account Keys and Environm
7
Defining Your VSTS Build
Thu, Mar 30th 2017 12:30p   Declan Lynch
The build definition in VSTS is designed to build and compile your code and then take the resulting build and save them to an artifact store. You can create build definitions for Visual Studio applications, XCode applications, Android applications and, of course, Java applications. In VSTS go to the Build & Release section of your project and then make sure you are on the Builds tab. Click on the New Definition button to get started. You should see a list of predefined build templates, th
12
A VSTS Build Agent For Rancher
Wed, Mar 29th 2017 12:30p   Declan Lynch
By default Visual Studio Team Services provides you with one hosted pipeline and one private pipeline when you are using the free services. You can add additional pipelines at a cost of $15 a month if you need them however a single pipeline should work ok for a small team. The private pipeline is something that you run on your own infrastructure and Microsoft provides pipeline agents that will run on Windows, OS X and Linux machines. These agents will listen to your VSTS account and accept jobs
6
Extending Your Rancher Environments
Tue, Mar 28th 2017 4:30p   Declan Lynch
In the last post we setup the Rancher server and added our first Rancher Host. One of the nice features of Rancher is that you can setup multiple environments so that you can keep your Development testing system separate from your QA system and separate from the Production system yet keep a single Rancher server orchestrating it all. Click on the ‘Environment’ tab and select the option to ‘Manage Environments’ The first thing I’m going to do is rename the Default e
9
Setting Up Your Rancher Infrastructure
Mon, Mar 27th 2017 9:30p   Declan Lynch
Before we can build and deploy our application we will need to first setup the infrastructure. I’ve decided that I’m going to be using Docker as the container service and Rancher as the orchestration layer. This blog post is just a quick overview of how to create a basic demo Docker/Rancher infrastructure. If you are considering using Docker/Rancher for production that I would highly encourage you to do plenty of additional research beyond this posting before setting anything up. Fo
10
AJAX and ThymeLeaf For Modal Dialogs
Fri, Mar 24th 2017 8:30p   Declan Lynch
The final part of the basic phonebook application is being able to click on a person and see details about them. For this part I’ve decided for now not to open a new page but to open the persons details in a modal dialog box on the current screen just so I can demo how to do ajax calls using Spring and Thymeleaf. First of all I need a PersonController which will populate the modelmap with the selected persons attributes and then return a thymeleaf page. This controller is very simple an
7
Highlighting The Selected Area With Thymeleaf
Thu, Mar 23rd 2017 4:30p   Declan Lynch
Now that I have pulled the side navigation menu out in to its own reusable code fragment I can now make a small adjustment to it to highlight the currently selected option in the navigator. In the Domino/XPage world this would be the script that you write to add a css class to a menu item using the selected property. For the bootstrap based side navigator that I am using in this application you can add a background color to the side navigator by adding a css class of ‘active’ to the
6
Reuse More Code With ThymeLeaf Layouts
Wed, Mar 22nd 2017 12:30p   Declan Lynch
As you saw in the last entry you can use ThymeLeaf Fragments to split out reusable parts of your html pages so that you can just drop them in where needed just like Custom Controls in XPages. Another great XPage concept was using a Custom Control to design the main layout of your page and then drop the content for the page that you are displaying in to a facet on that custom control. With an add-on to ThymeLeaf, which is automatically supplied when using ThymeLeaf with SpringBoot, this is also e
4
Introducing ThymeLeaf Fragments
Tue, Mar 21st 2017 12:30p   Declan Lynch
When I created my people by location page I just copied the entire home page of the application. I now want to make a few changes to the side navigator but if I leave things as they are now I would have to make those changes in all pages that share the side navigator. In the XPages world we had custom controls which could be used to break your page in to separate components and ThymeLeaf has a similar concept called Fragments. Under my templates folder I’m going to create a new folder cal
3
Adding More Fake Data
Mon, Mar 20th 2017 12:30p   Declan Lynch
In the last entry we added our new People By Location page and when we looked at in the the browser is was fairly empty apart from the one test user. Not very easy to do any proper testing with just one entry. You COULD if you wanted add a bunch more test users manually but what if you wanted to test with a few thousand users, that would be a lot of copy/pasting. Thankfully there is an easier way using a Data Faker. First I need to add a new dependency to my pom file for the JavaFaker project o
8
Add The People By Location Page
Fri, Mar 17th 2017 12:30p   Declan Lynch
Now that the controller is created and has been committed to our source control it is time to create the page that is associated with it. I’ve started by copying the home.html page to it’s own file called location.html (to match the string returned by the controller in the last entry). I’ll break this in to components in a later part but for now a quick copy is all I need to get the exact same layout as the home page. For the list of peoples details I’ve decided to use Da
4
Adding The People By Location Controller
Thu, Mar 16th 2017 12:30p   Declan Lynch
Now that we have the main landing page of the application created it is time to build our next page. To start the process of I have gone to VSTS and dragged the ‘See All Staff In A Single Location’ story over to the Active column. I can now return to IntelliJ and start building my next controller. I’m going to add a new controller class to the application called LocationController. Don;t forget to annotate the called with the @Controller annotation so that Spring MVC will pick
5
Adding Locations Data To The UI
Wed, Mar 15th 2017 12:30p   Declan Lynch
Now that we have our demo data and we have confirmed that it exists when we start the application it is time to add it to the Thymeleaf based UI. First we need to add it to the data model that is used when the page is rendered. If we return to our HomeController class we need to make a couple of changes. First we need to get access to the LocationRepository bean. We do this by adding an Autowired reference the bean using the same method that we did when building the demo data. Then we need to ad
1
Checking Your Demo Data
Tue, Mar 14th 2017 6:30p   Declan Lynch
Now that we have the demo data how do we know that it is actually working and getting in to the database. It would be rather pointless trying to add the data to the UI if there is no data to add. If you are using a persistent datasource then you can just use whatever databases tools you normally use to check the tables, but in our case we are using an in-memory database that disappears when the application is exited. Thankfully, however, the H2 in-memory database does have an admin console and S
3
Adding Some Demo Data
Mon, Mar 13th 2017 12:30p   Declan Lynch
Before we can start displaying data in our application we need to add some demo data. You could point the data source to be an external persistent data source that contains test data instead of using an in-memory data source that is lost each time to stop the application or you could load up the in-memory data source with demo data each time the application is started by using either a sql file containing statements to add the data or by writing a script that runs when the application starts th
3
Adding Bootstrap To The Frontend
Fri, Mar 10th 2017 1:30p   Declan Lynch
Web applications need more than just html. You also need CSS, JavaScript, Images maybe even Fonts. All of these can be added to the resources/static folder in your SpringBoot application. Here I have added a phonebook.css file that will hold the custom css needed for my application. And then you can reference them in your html file. If you look carefully you will notice that there are TWO references to my phonebook.css file. The first is a normal href and it points to a path relative to where
4
Starting The Frontend
Thu, Mar 9th 2017 1:30p   Declan Lynch
For the frontend we are going to be using Thymeleaf. When you add Thymeleaf to your project using the spring-boot-thymeleaf-starter you will get support for both Thymeleaf V2.x and Thymeleaf V3.x. By default the V2.x support is activated by the starter but if you want to use V3.x then you can easily add some properties to your pom.xml file. I want to use V3… Once you have updated the pom.xml file it it time to create the applications first page. This is done in the resources/templates fol
9
Controlling The Frontend
Wed, Mar 8th 2017 1:30p   Declan Lynch
Before we can start building our frontend we need to tell our Spring Boot application how to handle the incoming requests and what html page to display. This is done using Spring MVC which we added when we picked the spring-boot-starter-web dependency in the Spring Initializer. This dependency adds a built in tomcat web server that is configured with a set of defaults and sets up the application to scan for special classes that have been annotated with @Controller When a class is annotated with
2
Extending Your Entity Repositories
Tue, Mar 7th 2017 1:30p   Declan Lynch
Now that the basic CRUD interface is working it would be nice if we could extend the interface to make it even more useful. What if we wanted to return a list of all the locations in a particular state or if we wanted to find all the people who are in a particular location? These sound like queries that you would normally write in SQL with something like ‘SELECT * FROM Locations WHERE State =”PA” ‘. To do this in Spring Boot and Spring Data Repositories you can use the si
4
Thats just a load of CRUD
Mon, Mar 6th 2017 1:30p   Declan Lynch
CRUD stands for Create, Read, Update and Delete which are probably the most basic of things that you can do to a piece of data. Spring Boot gives you a very easy way to setup an interface between your application logic and your data entities that can provide this CRUD interface without making you write a ton of code with what is known as a repository. A repository is just a set of data entities, So for our application we will need two repositories, one for the Location entity and one for the Pe
2
Pushing your changes to GIT on VSTS
Fri, Mar 3rd 2017 1:30p   Declan Lynch
So we have created our first two code changes and you are now ready to commit them to git. My rule is to commit often as this gives you a much better granularity for figuring out when bugs are introduced to the code and then being about to revert just those small changesets. To commit your changes select the VCS menu in IntelliJ and click on Commit. You should see a dialog box similar to the one above which shows the two new classes you have added to your application. You can then fill in the c
3
Person Persons People
Thu, Mar 2nd 2017 1:30p   Declan Lynch
Now that the Location class has been created it is time to create our Person class. As the name suggests it represents a single person in the data store. This class is very similar to the Location class so I will not go in to too much details. Just don’t forget the @Entity and @Id annotations. Make sure you have the constructors created and also your Getters and Setters. You may notice that I have not setup any relationships between the tables. Technically I am using an SQL  database so
3
A view in to your data
Wed, Mar 1st 2017 1:30p   Declan Lynch
In the Domino world the data store is part of the application container. When building your app you will invariably start by creating your forms and views to hold the basic structure of the data. For this Spring Boot based application I am going to start with the same step of building my data. Two of the dependencies that I selected from the Spring Boot Initializer were spring-boot-starter-data-jpa and com.h2database. You can see these in your pom.xml file in the root of your project structur
5
Branching Out On Your Story
Tue, Feb 28th 2017 1:30p   Declan Lynch
Before you start writing code you should create a branch to add the code to in your git repository. You could decide to create the branch directly in your IDE if it has Git support, or if you are using an external tool like Git Tower or SourceTree you could create the branch there. I’m going to use VSTS to create my working branch and then pull that branch down to IntelliJ IDEA just to show you an alternative method. In the story you just dragged over to the Active column you will see a s
7
Mapping Out Your Ideas
Mon, Feb 27th 2017 1:30p   Declan Lynch
Before we start slinging code around it would probably be a good idea to map out a few concepts and requirements. I’m going to use the VSTS work section to do this. I will create requirements for each idea that I have and then later as I’m working on my code I can link these requirements with the code commits. If you have never worked with Agile, Scrum, Waterfall or Kanban before the idea behind it is that each indivisible piece of work is laid out in what is known as a User Story. A
3
Committing The Code To VSTS
Fri, Feb 24th 2017 1:39p   Declan Lynch
So we have a new project in IntelliJ with the starter layout provided by the Spring Initializer and we have an empty git repository in VSTS. We now have to link the two of these together so that all your future code changes have a place to live. First we need to tell IntelliJ that this is a git repository. The easy way to do this is use the VCS menu. Yes there is an option to ‘Import into Team Services Git’ and you would probably think that this would be the best option to select b
8
Getting started with IntelliJ
Wed, Feb 22nd 2017 12:03p   Declan Lynch
Now that the project is ready over in VSTS it is time to start the project in your IDE. The choice of IDE is really a personal preference, I am going to be using IntelliJ IDEA Ultimate (the community version does not have the Spring Initializer). If you are using Eclipse I will recommend that you look at the Spring Tools Suite. Start up IntelliJ and click the option to create a new Project. Select the Spring Initializer from the list of project types and then click Next. Give your project som
4
Getting started with VisualStudio Team Services
Mon, Feb 20th 2017 2:23p   Declan Lynch
Before I even start writing any code I am going to set up a new project in Microsoft Visual Studio Team Services. If you do not have a source control repository and issue tracking system yet then I would highly recommend looking at VSTS. It really can give you a full end to end pipeline so that you can take that idea you have had for the next big application all the way from being written on the back of beer mat to an automatically deployed application with VSTS helping in all the steps in-betwe
1
And So We Find Ourselves Back At The Start Again…
Fri, Feb 17th 2017 3:33p   Declan Lynch
A very long time ago I wrote a fifty something long blog series about learning XPages where I wrote a simple phonebook type application. It was pretty well received and probably helped a few people get on the road to writing XPage style applications. It was basic, it didn’t involve any Java backend stuff and I know if I was doing it again in XPages I would do it completely different. Now we have a brand new development stack and I find myself back at the starting blocks again but this time
3
Putting It All Together
Wed, Feb 15th 2017 1:50p   Declan Lynch
Replacing Domino as your application environment is not an easy swap of one product for another. There is no one product that can do everything that Domino can do. Some can get close but nothing can give you every part of the puzzle. To that end here are pieces that we have decided to move forward with. Backend Code Java with the Spring Boot framework with an aim towards writing microservice style applications. Frontend Thymeleaf Java Templating Engine running inside a Spring Boot based jar fi
7
Deploying Your Applications
Mon, Feb 13th 2017 7:16p   Declan Lynch
So you have decided what you will write your application in, both backend and frontend, you have decided where you will store the source code and how you will track issues, you have figured out your authentication and authorization solution, all that is missing now is somewhere to actually run the application so people can use it. In the Domino world this was a simple solution, just put the NSF on the server, but when you leave the Domino world it because probably one of the hardest decisions. F
3
Managing your source code and issue tracking
Fri, Feb 10th 2017 1:22p   Declan Lynch
If you are part of a team of developers and you are not using source control then you really need to start, if you are a sole developer and you are not using source control then you also really need to start. Source control is your friend, it will record all your code changes, it will merge in changes from different team members and allow you to manage new features and hot fixes with ease. Alongside source control you also need to look at a system to manage your issue tracking and it is always a
6
Who Are You?
Wed, Feb 8th 2017 1:31p   Declan Lynch
In the Domino world we had the NAB (Notes Address Book) or Domino Directory as it eventually became known as. The NAB stored everything, from server configurations to policy setups and of course People and Groups. Each individual NSF had its own Access Control List (ACL) that would list who had access to the NSF and what level of access they had, also in the ACL was a mechanism to assign roles against the people and groups listed in the ACL. The NAB specified who you were and the ACL specified w
2
But what about the data?
Mon, Feb 6th 2017 3:02p   Declan Lynch
In the Domino world we had a nice, easy to use, built in noSQL datastore in the NSF alongside your application, or you could easily code your application to use data from a different NSF if you wanted to separate the datastore from the frontend. Either way it was easy to use and easy to access. So how do you go about deciding on a data store for a new development track? My first suggestion is to look at any other datastores that you are working with in your company. If you have a team of DBAs th
6
Deciding on a frontend
Fri, Feb 3rd 2017 1:20p   Declan Lynch
Building web apps means that you need a front end that the users will interact with. With Domino the answer was XPages ( or for the hardcore old school developers you could use forms and views and pages with passthru html ) but when moving to a new development stack XPages is no longer an option so what can you use… There are two schools of thought around fronted development. There is the client side rendering group and then there is the server-side rendering group. For client side renderi
3
What language should I move to?
Wed, Feb 1st 2017 3:41p   Declan Lynch
I really thought that this would be a simple question. The answer is obviously Java. We have Java skills from using XPages so it just makes sense to answer this question with Java… Except then you look at the java world and realize that there are different flavors of Java, you have standard plain Java, you have JavaEE and then there is the Spring ecosystem. You might even think about Scala, Kotlin or even Groovy with Grails as java based frameworks to pick from. However, before you even an
5
Replacing The Pillars Of Domino
Mon, Jan 30th 2017 3:00p   Declan Lynch
As I mentioned in the previous post Domino provides many capabilities out of the box. When moving to a different development stack you need to think about the different things that Domino provides and then replace them with similar services. I’ve broken down the main capabilities in Domino to a number of areas… Code Language, Authentication/Authorization, Build Systems, Deployment Servers, Data Storage. Before you can start thinking of replacing Domino you will need to come up with r
2
You don’t know what you’ve got till it’s gone
Fri, Jan 27th 2017 7:46p   Declan Lynch
A lot has changed since I last wrote a blog post. One of the biggest changes career-wise has been a decision by the company I work for to move away from IBM Domino and switch to a different platform for all future and new development. We had already started the process of switching all our users to Office365 for email so keeping Domino around just didn’t make a lot of sense. Thankfully I was given the reigns in deciding what direction we should move to in a post Domino world and given our
4
Hello… Hello… Is this thing still on?
Fri, Jan 27th 2017 6:16p   Declan Lynch
Testing, Testing, One Two Three…
3
Getting To The Java Roots of XPages – Part 14
Mon, Mar 18th 2013 1:30p   Declan Lynch
Adding additional methods to an existing class by extending it is not the only thing that you can do with Extends. You can also override existing methods in the extended class. In our StaffInfo class the getInternetAddress will return a simple internet email address like jbloggs@somecorp.xyz but for your application you need it to look like ‘Joe Bloggs ‘. Now you COULD create a new method just like the getReversedName() method in the last part but then you would have to go back to th
2
Getting To The Java Roots of XPages – Part 13
Fri, Mar 15th 2013 1:30p   Declan Lynch
In todays part I’m going to talk about Extending a class in Java. The concept is very simple, There is an existing class that does 90% of what you need it to do but your application needs some extra functionality to get it to 100%. If you have access to the code for the original class you could just add some additional methods to it to get that extra 10% but in a lot of cases you may not have that access or maybe you do have the access but that code is on a different update cycle and you n
3
Getting To The Java Roots of XPages – Part 12
Thu, Mar 14th 2013 1:30p   Declan Lynch
So following on from the last part I now have two packages in the scary.java.demo package, StaffInfo and AboutMe. Both of these classes do pretty much the exact same thing, AboutMe goes to the nab and gets your information while StaffInfo goes to the nab and gets the info for the selected person. As mentioned this introduces a maintenance issue, if the place you lookup staff info changes you will need to change two classes, wouldn’t it be better if you just needed to change one. You can do
1
Getting To The Java Roots of XPages – Part 11
Wed, Mar 13th 2013 1:30p   Declan Lynch
So far I’ve been dealing with a very simple class which just gets the current users information from the NAB, While this is useful wouldn’t it be better if I could get this info for any staff member? To do this I have created a new class in my java package called StaffInfo. It is VERY similar to the original MyInfo class, in fact all I did was copy the code from that class and make a few minor changes to remove the references to ‘my’. Here is the entire class fro your rev
1
Getting To The Java Roots of XPages – Part 10
Tue, Mar 12th 2013 1:30p   Declan Lynch
If I wanted to add some more methods to my class to get additional details it could be as easy as duplicating the code I already have and end up with something like this for each method. public String getMyIFirstName() { if (myFirstName == null) { Session session = null; Database thisDB = null; Database nabDB = null; View nabView = null; Document nabDoc = null; Name tmpName = null; try { session = ExtLibUtil.getCurrentSession(); thisDB = session.getCurrentDatabase(); na
4
Getting To The Java Roots of XPages – Part 9
Mon, Mar 11th 2013 1:30p   Declan Lynch
In the last part we looked at recycling domino handles in java but I mentioned that the class has some other serious issues. The biggest problem that I see now is that every time the getMyInternetAddress method is called it has to access the nab and get the document and return the value. If I was using this method multiple times on the same page then that would mean multiple calls to the nab and multiple calls to the document and multiple calls to the getItemValueString etc. Unless your internet




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition