Introduction to Angular 2 - The fundamentals of Components

Although the internals of Angular 2 are still changing a lot, the public API for building components is already quite stable. In this post we will go through on how we can build components with this new version of Angular, based on some code examples (the code is available here…

The main goals of Angular 2 and how they will be achieved

Angular 2 is currently still in Alpha/Developer Preview, but the main functionality and the core documentation are both already available. Let's gather here what is so far known about the design goals of Angular 2, and how they are planned to be implemented: Mains goals of Angular 2 Simpler…

What every Angular project likely needs - and a Gulp build to provide it

Starting an AngularJs project also means choosing a whole toolchain that goes along with Angular. In this blog post we will propose a set of tools that a new Angular project will likely need, and present a simple Gulp build that provides those features. Let's go over the following topics…

Why Angular is not only for single page web apps

AngularJs is often seen as a viable solution for building full scale single page web applications. Although that is a good use case for Angular, in this post we will explore how the framework can also be used to incrementally add functionality to any web page in general, in some…

Javascript debugging tips using the Chrome Dev Tools, deb.js and more

In this blog post we will go over some useful tips and tricks for debugging client-side Javascript using the Chrome Dev Tools. We will focus on situations where we actually don't know where to put the breakpoint in the first place. Let's go over the following topics: Find out what…

Web App Architecture - the Spring MVC - AngularJs stack

Spring MVC and AngularJs together make for a really productive and appealing frontend development stack for building form-intensive web applications. In this blog post we will see how a form-intensive web app can be built using these technologies, and compare such approach with other available options. A fully functional and…

Solving ORM - Keep the O, Drop the R, no need for the M

ORM has a simple, production-ready solution hiding in plain sight in the Java world. Let’s go through it in this post, alongside with the following topics: ORM / Hibernate in 2014 - the word on the street ORM is still the Vietnam of Computer Science ORM has 2 main goals…

Jar Hell made Easy - Demystifying the classpath with jHades

Some of the hardest problems a Java Developer will ever have to face are classpath errors: ClassNotFoundException, NoClassDefFoundError, Jar Hell, Xerces Hell and company. In this post we will go through the root causes of these problems, and see how a minimal tool (JHades) can help solving them quickly. We…

The Java Origins of Angular JS: Angular vs JSF vs GWT

A superheroic Javascript framework needs a good origin story. Let's try to patch it together, while going over the use of Angular JS in the enterprise Java world and the Angular take on MVC. This post will go over the following topics, and end with an example: The Java Origins…

Javascript for Java Developers

This post will go over the Javascript language from the point of view of a Java developer, focusing on the differences between the two languages and the frequent pain points. We will go over the following: Objects Only, No Classes Functions are just Values The 'this' Keyword Classic vs Prototypal…

Really Understanding Javascript Closures

This post will explain in a simple way how Javascript Closures work. We will go over these topics and frequently asked questions: What is a Javascript Closure What is the reason behind the name 'Closure' Actually viewing closures in a debugger how to reason about closures while coding the most…

How does Spring @Transactional Really Work?

In this post we will do a deep dive into Spring transaction management. We will go over on how does @Transactional really works under the hood. Other upcoming posts will include: how to use features like propagation and isolation what are the main pitfalls and how to avoid them JPA…

Java 8 Optional: How to Use it

Java 8 comes with a new Optional type, similar to what is available in other languages. This post will go over how this new type is meant to be used, namely what is it's main use case. What is the Optional type? Optional is a new container type that wraps…

Performance Tuning of Spring/Hibernate Applications

For most typical Spring/Hibernate enterprise applications, the application performance depends almost entirely on the performance of it's persistence layer. This post will go over how to confirm that we are in presence of a 'database-bound' application, and then walk through 7 frequently used 'quick-win' tips that can help improve…

Spring/Hibernate improved SQL logging with log4jdbc

Hibernate provides SQL logging out of the box, but such logging only shows prepared statements, and not the actual SQL queries sent to the database. It also does not log the execution time of each query, which is useful for performance troubleshooting. This blog post will go over how to…

Hibernate Debugging - Finding the origin of a Query

It's not always immediate why and in which part of the program is Hibernate generating a given SQL query, especially if we are dealing with code that we did not write ourselves. This post will go over how to configure Hibernate query logging, and use that together with other tricks…

Pitfalls of the Hibernate Second-Level / Query Caches

This post will go through how to setup the Hibernate Second-Level and Query caches, how they work and what are their most common pitfalls. The Hibernate second level cache is an application level cache for storing entity data. The query cache is a separate cache that stores query results only…

Open Session In View Design Tradeoffs

The Open Session in View (OSIV) pattern gives rise to different opinions in the Java development community. Let's go over OSIV and some of the pros and cons of this pattern. The problem The problem that OSIV solves is a mismatch between the Hibernate concept of session and it's lifecycle…