Trifork Blog

AngularJS directives for C3.js chart library

No Comments

Vagrant Logo

For one of our projects we wanted to create some nice charts. Feels like something you often want but do not do because it takes to much time. This time we really needed it. I had prior experience with Highcharts, which is also a nice library. But this time we wanted more control. We had a look at D3.js library, a very nice library but so many options and a lot to do yourself. Than we found c3.js, check the blog post by Roberto: Creating charts with C3.js. Since I do a lot with AngularJS, I wanted to integrate these c3.js charts with AngularJS. I wrote another blogpost on that: Using C3js with AngularJS. Through twitter Abdullah Diaa mentioned that it would be great to have directives for these charts. That is were we start in this blogpost. I am going to describe the first version of a directive I have created to make it even easier to create these chart using AngularJS.

Read the rest of this entry »

Posted in: AngularJS

Trainings at GOTO Academy - AngularJS, Spring, Axon, iBeacon

No Comments

Vagrant Logo

Take a look at the upcoming trainings schedule at GOTO Academy.

We will also have FREE evening events on the topics iBeacon, AngularJS. Stay tuned!

FREE EVENTS

Read the rest of this entry »

Posted in: Education | Spring | Training

Scaling images - Quirks and tricks

3 Comments

In one of our projects we created functionality to upload images. These images can, after being uploaded, be viewed on a grid or on  a detail page. The grid shows a thumbnail and the detail page shows a medium variant of the image. To create these variants we have used java ImageIO, imgscalr, ImageMagick (im4java) and Exiftool. Sounds like quite a few libraries to create two different sized images, but it’s the result of trying to support as many images as possible and provide a good user experience. In this blog post I will explain how and why we have used these libraries to solve the problems we encountered.

Process flow (Click for larger view)

Read the rest of this entry »

Posted in: Custom Development

The Spock Framework

No Comments

Groovy Logo

In one of my current projects, I started to play around with Groovy and was fascinated how groovy this language is. I got more curious about the way to perform testing and started googling around a little bit. My google research showed me several frameworks to test groovy applications. One of these frameworks is the Spock framework. Spock is created for testing Java and Groovy applications. It has a very clear syntax that is easy to read and it comes with a JUnit runner that ensures you can use it with any of your existing tooling. Furthermore, Spock combines the best features of proven tools like JUnit, jMock, and RSpec, and innovates on top of them. In the first part of the blog I am going to explain how you get started with the Spock framework and how a test method looks like. After that I am going to show how you can use Spock with the Geb framework and what the difference is between testing with Spock alone and Spock combined with Geb. In the end a conclusion is given.

Read the rest of this entry »

Posted in: Groovy

Creating charts with C3.js

4 Comments

Trifork LogoEverybody remembers that project where you need to display some data in a chart. When you select a library to create these charts you will obviously have a few requirements. One of the requirements will probably be that the charts must look good to impress your customer and if they don’t look the way you want, they must be at least be easy to style. But the most important requirement will be that the code to achieve your goal must be minimal and easy to understand. So one of the well known JavaScript library to create all kind of charts is D3.js. This library provided us the option to create a simple line chart with a tooltip that shows some data. So we thought that this would be a good fit for our project and started to create a chart. But wait… I see you thinking.. the title said C3.js and now you’re using D3.js?! Keep on reading to find out why! Read the rest of this entry »

Posted in: Custom Development | Frontend

Trifork NewsBites - July 2014

No Comments

Trifork Logo

Dear reader,

The international software development conference GOTO, designed for software developers, IT architects and project managers was back on June 18th-20th at the Beurs van Berlage, Amsterdam. Trifork, GOTO Academy and Axon had each a stand there. 

On June 26th-27th Allard Buijze gave a training on the Axon framework. On July 10th we held a Docker MeetUp in our Trifork office in Amsterdam. Below we relate these events and provide further information about upcoming trainings and more.

Read the rest of this entry »

Posted in: Conference | Frontend | Knowledge | Mobile | Newsletter | Spring | Training

Angular Directives, a beginners guide - part 2

No Comments

Angular logo

In my previous blog post (part 1) about Angular Directives, I provided you with an introduction into what Directives are and how to use them. The short recap is that you can use Directives to add markers to a DOM element and then tell the AngularJS compiler to add behavior or modify that element. In this blog post, I will discuss the two remaining directive types (class and comment).
Read the rest of this entry »

Posted in: AngularJS | Custom Development | Frontend

How to manage your Docker runtime config with Vagrant

No Comments

Vagrant LogoIn this short blog I will show you how to manage a Docker container using Vagrant. Since version 1.6 Vagrant supports Docker as a provider, next to existing providers for VirtualBox and AWS. With the new Docker support Vagrant boxes can be started way faster. In turn Vagrant makes Docker easier to use since its runtime configuration can be stored in the Vagrantfile. You won't have to add runtime parameters on the command line any time you want to start a container. Read on if you like to see how I create a Vagrantfile for an existing Docker image from Quinten's Docker cookbooks collection.

Read the rest of this entry »

Posted in: Custom Development | DevOps

My Goto Amsterdam 2014

No Comments

Trifork Logo

People who have worked with me know I'm a bit of a technical conservative. I'm very wary of quickly adopting the latest fads and trends because I've seen the collective hype and the following disillusionment too many times, including software being built with the then-latest-hype framework or platform and a year later being stuck with now-obsolete technology that only the original developers and a handful of other people still have any real experience with.

For the same reason I've avoided software tech conferences in the past years. A few visits to conferences several years ago on each occasion left me with feeling that I'd heard a lot about a lot, but that it wasn't really going to improve my daily software development work.

Luckily, Goto Amsterdam 2014 was different.

Many, if not all, of the talks were relevant to my actual, day to day, software development job. I learned about looking at Agile in a different way. I heard people speak on real life problems being solved with actual, current, widely adopted technology. I even listened to talks that weren't really that much about software development at all.

So let me walk you through my Goto Friday.

Read the rest of this entry »

Posted in: Agile | Conference | General

How to Remotely Debug Application Running on Tomcat From Within Intellij IDEA

2 Comments

Intellij IdeaThis post would look into how to tackle and debug issues in scenarios where they only occur in production (or other remote environment) but not in development environment. As anybody who has been in this kind of situation would acknowledge, trying to pinpoint the cause of these kind of "issues" might quickly end up being a practice at taking shots in the dark: a very time-consuming and inefficient process.

It was this kind of situation I recently found myself, where, I had to rectify certain issues that were occurring in the production environment but could not be reproduced on the development machine.

Fortunately enough, the said issues could be reproduced in the testing environments (which is as close to the production environment as possible). But having the issues reproducible in the test environment was good In that it confirms the issues needed to be fixed, but it was of little help in actually tracking the issues down, finding the cause and fixing it. Relying just on log outputs was not enough...What if I could debug the test environment from my machine?

Read the rest of this entry »

Posted in: From The Trenches | Java