Kotlin and TornadoFX

Kotlin and TornadoFX

Kotlin

As I have changed the JSON for configure the SmartCSV.fx from my own Schema to JSON Table Schema, I had to provide a converter for existing configurations.

I wanted to write less code than I typically do in Java and learn something new. Therefor I started a new project in Kotlin a programming language invented by JetBrains, the people behind the excellent IntelliJ IDEA IDE.

To make my life even easier, I use klaxon a JSON parser for Kotlin, which allows a very simple way to access JSON artefacts.

{  
  "headers": { "list": ["COLUMN 1","COLUMN 2","..."] }
}
val headers = root.

Read More

SmartCSV.fx version 0.9

SmartCSV.fx version 0.9

The newest version of SmartCSV.fx has some major changes.

Support of JSON Table Schema

With version 0.8 the application supports a subset of the JSON Table Schema defined by Open Knowledge International.

Dan Fowler draws my attention to the spec of JSON Table Schema.

@frosch95 Hi! Great work! Have you seen our spec for defining a schema in JSON for CSV data? specs.frictionlessdata.io/json-table-sch…

And I noticed that the most of my verification rules were the same as in the spec. So I decided to switch from my own JSON definition to the JSON Table Schema.

Read More

SmartCSV.fx version 0.6

SmartCSV.fx version 0.6

As the interest in the project grows, I revisited the validation algorithm and refactored it.

Uniqueness rule in version 0.5

animated gif with uniqueness rule in action

I introduced an uniqueness feature in version 0.5. This was the first validation, which has to include all the other values in a column for the check. This validation is slower than the validation of a single value against a simple rule. So I decided to try to improve the performance.

Old code

The old version of the validation algorithm walks through every possible validation rule and asks the configuration if the validation is active for the current

Read More

SmartCSV.fx version 0.4

SmartCSV.fx version 0.4

A lot changed since the first version of SmartCSV.fx and I am near a version 1.0!

Background validation with sidebar

To support the user in finding the validation errors, I added a sidebar with error marker and mouse over error explanations. This is something IntelliJ IDEA uses heavily in their IDE. When something is wrong, a red marker is shown on the side and a click on the marker scrolls the table directly to the error line.

animated gif of validation error side bar

In the first versions, I realized that the validation stopped the application from working, when there are some thousand lines to

Read More

SmartCSV.fx

SmartCSV.fx

Description

A simple JavaFX application to load, save and edit a CSV file and provide a JSON configuration for columns to check the values in the columns.

Motivation

At work I have the need to fix wrong CSV files from customers. It is hard to find the errors and fix them in a texteditor, even in a “normal” CSV editor. So I decided to write this simple JavaFX application.

JSON Configuration

{  
  "COLUMN NAME 1": { 
    "integer" : true, 
    "not empty" : true, 
    "maxlength" : 4, 
    "minlength" : 4 
  }, 
  "COLUMN NAME 2": { 
    "groovy" : "value.contains('a')? 'true' : 'no a inside'", 
    "alphanumeric" : true 
  }, 
  "COLUMN NAME 3": { 
    "date"

Read More

GeoFroggerFX 2.0 Development Preview

GeoFroggerFX 2.0 Development Preview

I rewrote the GeoFroggerFX application for several reasons.

1. Data Storage Performance

I was very unhappy with the performance of the H2 JPA version and tried some other data storages.
The first alternative attempt was in using the OrientDB as an object database. The performance got better but not good enough. Still had to wait more than a minute for inserting and/or updating 10.000 caches (also including waypoints).

As an object database seemed to be a good solution, I tried db4o. It performed a lot better than OrientDB and I thought this is the solution for GeoFroggerFX, but

Read More