Posts tagged with "Java"

Apr 11th, 2014

3 Good Reasons to Avoid Arrays in Java Interfaces

toArray performance

If you still find yourself defining methods like this public String[] getParameters(); in an interface, you should think again. Arrays are not just old-fashioned, there are good reasons to avoid exposing them. In this article, I’ll try to summarize the main drawbacks of using arrays in Java APIs. Let me start with the perhaps most [...]

7 Comments
Mar 24th, 2014

How to use SWT with Java 8

java8_logo

As you might have noticed, Java 8 was released last week ;). Most programers consider Java 8 the biggest change to the Java programming language ever made. This is mostly because of lambda expressions, default methods and streams. As an SWT/RAP/Tabris coder, the first thing that came to my mind was: “How can this make my [...]

1 Comment
Feb 10th, 2014

SWT Best Practices: Changing Fonts

Here is a widespread way of creating a label with a bold font: Everything seems to be fine with this code. A Label is created with the default font “Arial”, the default size “12″ and our desired style “BOLD”. So what’s the problem with this snippet? With the above code that creates a BOLD font, you [...]

7 Comments
Feb 4th, 2014

Step by Step: How to bring JAX-RS and OSGi together

014-run-in-browser

Most of the server-side Java systems I built over the last years had the following requirements: They should be modular to be highly extendable and of course they should have a REST API to lower the integration barrier for other systems. If you have similar requirements you probably choose two standards/technologies. For the modular part [...]

6 Comments
Jan 7th, 2014

OSGi JAX-RS Connector 3.2 released

sse

Today we are proud to release the OSGi JAX-RS Connector 3.2. A lot has happened since the 3.1 release back in October 2013. This post will give you an overview of the new and noteworthy things included in the 3.2 release. We upgraded the underlying Jersey library to 2.5 which was released back in December. [...]

11 Comments
Nov 27th, 2013

Minimal JSON 0.9.1 available on Maven Central

JSON parser benchmark

Earlier this year I’ve introduced Minimal JSON, a slim and fast Java library for reading and writing JSON. In contrast to object mappers such as Gson or Jackson, Minimal JSON does not more than reading a JSON text into a memory-efficient Java representation that can be accessed, modified and serialized to JSON again. You can [...]

Leave a Comment
Nov 6th, 2013

Get rid of your StringUtils!

5480421664_b545d6083c_n

Probably every Java developer has developed at least one String utility class in his life. Need a proof? Feed "java StringUtil" to your favorite search engine – I found 20 different implementations among the first 30 search hits only! There is a simple reason for that – Strings are used quite frequently in common Java [...]

9 Comments
Oct 25th, 2013

Continuous Deployment with Docker and Virgo

The post “Automated installation of Virgo with Docker” described how to build and run a Docker container with Virgo inside. Today I’ll describe an easy way of continuously deploying applications into such a Virgo running inside an isolated Docker container. In a regular Virgo installation we would simply drop our application bundle into the pickup [...]

Leave a Comment
Oct 1st, 2013

OSGi JAX-RS Connector 3.1 released

connector

Earlier this year in June we released the 3.0 version of the OSGi JAX-RS Connector together with JAX-RS 2.0. Since then a lot has happened in the project and we decided to do a 3.1 release. Below are the important features and changes that made it into 3.0 and 3.1. If you’re not familiar with [...]

4 Comments