Entries

[Angular2]="{{'Hello, World!'}}"

As I mentioned in my recent blog post Angular 2 is a complete rewrite. Many concepts that are known from Angular 1.x are gone or changed dramatically. Angular 2 looks like a completely different framework: no DDO , no $scope , no angular.module and completely rewritten binding and change detection (no ng-model ). Update (1/4/2016) - This blog post is not maintained. The concepts are still valid, but the code may be outdated. If you want to learn how to use up-to-date Angular2 with TypeScript and Gulp, please read this blog post (regularly updated): Quickstart: Angular2 with TypeScript and Gulp Although Angular 2 is still work in progress many new features have already been revealed. In this blog post I will share some basic concepts of the framework via code samples that I presented during my lecture at InfoShare 2015. Please note the code is created with Angular 2 Alpha 26 . Angular 2 is built with… TypeScript (1.5) TypeScript is a typed superset of JavaScript t...

Angular2 a gentle introduction

Angular 1.x Angular 1.x is the most popular Front-end framework these days. Last year we decided to adopt it in some of Goyello new projects. Today we have some experience to share. At the same time we are closely looking at the next generation of the framework. Update (1/4/2016) - If you want to learn how to use up-to-date Angular2 with TypeScript and Gulp, please read my this blog post (regularly updated): Quickstart: Angular2 with TypeScript and Gulp Game changer It is extremely easy to get started with Angular 1.x. It provides clear separation of presentation, data and application logic which is greatly appreciated especially by back-end developers as myself. Two-way data binding is one of the most appreciated features of the framework. The dependency injection makes it possible to modularize the code and test it in isolation. Directives are great way of creating reusable components and use them across the application with ease. As a result, people love and admire ...

Groovier Spring Boot Integration Testing

Recently I had a chance to use Groovy’s groovy.json.JsonSlurper in a soapUI REST project. The usage scenario in soapUI (in particular, soapUI Open Source) was very simple: in a Groovy assertion, load the content of a response into a variable and than verify it like this: import groovy.json.JsonSlurper; def slurper = new JsonSlurper() def result = slurper.parseText(messageExchange.responseContent) assert result.incidentType == 'Lorem ipsum' This works well in soapUI. But what about Spring Boot integration tests? Can I make integration testing of REST API groovier?

JUnit: Testing Exceptions with Java 8 and AssertJ 3.0.0

AssertJ 3.0.0 release for Java 8 makes testing exceptions much easier than before. In one of my previous blog post I described how to utilize plain Java 8 to achieve this, but with AssertJ 3.0.0 much of the code I created may be removed. Warning: this blog post contains mostly the code examples.

JAX-RS 2.x vs Spring MVC: Returning an XML representation of a list of objects

JSON is King as it goes to all kinds of REST* APIs, but still you may need to expose multiple representations, including XML. With both JAX-RS and Spring MVC this is very simple. Actually, the only thing to do is to annotate POJOs returned from the API call with JAXB annotation and that’s it. But when it goes to serializing a list of objects, JAX-RS will do a bit better than Spring MVC, in my opinion. Let’s see.