Bigdata in your Browser

also in Dutch here Being hired as a java consultant (which is what happens to me a lot) you don’t often encounter SQLite. I never worked with it in an assignment, and my colleagues looked slightly hazy when I asked. Sure, there’s a JDBC driver so no technical hurdles there, but as it typically runs embedded, there’s no connections to open, and just a single user. Although, there are ways around that. [Read More]

Get Enterprisey with Rust part 4 - Constants and regular expressions

This is the fourth part of the series on everyday programming tasks in the average CRUD application. So far we covered: initial setup with axum and postgres, logging and dates input validation on incoming Json objects working with environment variables This time we’re going to look at another humble task: regular expressions and constants (often seen together). !warning! As it turns out this post dives deeper into some rust intricacies than the previous. [Read More]

Get Enterprisey with Rust part 3 - Environments

This is the third installment in our series about dealing with enterprisey needs using rust. part 1 was about the initial setup with axum and postgres, logging and dates. part 2 was devoted to input validation on incoming Json objects. Reading environment variables I realized that the code I put in for part 1 on github already uses the built-in std::env::var function, but I didn’t mention it in the blog. [Read More]

Get Enterprisey with Rust part 2 - Input Validation

Input validation is next on the list of enterprisey features (see also part 1). This will be the only new feature to add in this post because we need to add quite a but of boilerplate (sadly) to get it working. First we need to add a service that will respond to a post request on the same url. Our app definition now looks like this: 1 2 3 let app = Router::new() . [Read More]

Get Enterprisey with Rust

Why not use the coolest language out there to do the things you probably still use Java for? Rust is marketed as a ‘systems language’, whatever that is. It looks to me like a general purpose language, ’turing complete’ and whatnot. There are plenty crates for anything web related. There’s tools for http servers, database connections, logging. We may also want security, monitoring, telemetry, cloud deployment. Do we want end-to-end testing? [Read More]

Let's create an app in webassembly

Web assembly is cool and new and it lacks nice how-to’s for tasks that are by now quite mundane for most web developers. So let’s get started using yew. What is yew? ‘Yew is a modern Rust framework for creating multi-threaded front-end web apps using WebAssembly.’ ( I actually tried several other rust/wasm frameworks, but this is the first that didn’t end in tears and compile errors. The documentation is quite good. [Read More]

On the value of software and pasta

This week some things ‘happened’ to me that made me want to read up on the grander scheme of things, meaning economic value, in particular that of software. I’ll just list them briefly this youtube video which is about a French guy cooking pasta really, states an interesting economic theory, namely that aiming for the highest quality of some product is the best way to create value for all actors in a vaue chain. [Read More]

The rust option

Option is a well known construct in many languages. The first time I saw it was in scala, but soon after it appeared in java8. As java still means my livelyhood, it serves as my main frame of reference. I won’t be covering all the details, because the java type is really a no brainer: it simply wraps a value or nothing and what operations (methods on Optional) do depends on there being a value or not. [Read More]

Rust for Java developers, Introduction

Manifesto ahum.. It is my conviction that rust should should rule the world! Not only because it is cool new technology, but first and foremost because it requires less computing resources (cpu cycles and memory) which also translates to natural resources (electricity). Since large parts of the grid are still powered by fossile, rust in the end is a way to cut back on CO2 emissions! Especially compared to java which is still resource hungry, despites lots and lots of improvements over the years. [Read More]

To Stored Procedure or Not

Or: My personal Object-Relational Mapping Vietnam war story tl;dr Choose the right tool for the job. What that is, well, it depends. The standard reaction of a lot of java developers (add enterprisey language X) to the question: ‘Stored procedures?’ is often a plain ‘No’. The reasoning goes somewhat like this: ‘A database is a dumb datastore that might be swapped out, so we don’t want to add intelligence there.’ At least that is what I heard multiple times in the past, and as you can guess by now: the database is never, ever swapped out. [Read More]