How to prepare the MacBook Pro for Java development and more

Well, I’ve recently gone to the “silver” side and acquired a MacBook Pro to use it for development when I am not at my PC. By development I mean here mainly Java + Javascript development. So I’ve written this post to remember what I had to install/configure to achieve this goal.

I need to mention that until now I’ve been a user of Windows (XP/7) and Linux (Ubuntu/Mint/Cent OS) operation systems.

At the time of this writing MacBook Pro runs on OS X Yosemite Version 10.10.5. The new version El Capitan was available, but I didn’t do the upgrade first because it had to many bad reviews…

Continue reading

Kugel, JAVA, Programmiersprache, Sprache, plattformunabhängig

Basics of scaling Java EE applications

To be honest, ‘scalability’ is an exhaustive topic and generally not well understood. More often than not, its assumed to be same as High Availability. I have seen both novice programmers and ‘experienced’ architects suggest ‘clustering‘ as the solution for scalability and HA. There is actually nothing wrong with it, but the problem is that it is often done by googling rather than actually understanding the application itself 😉

I do not claim to be an ‘expert’, just by writing this post 😉 It just (briefly) lays out some strategies for scaling Java EE applications in general. Continue reading


AngularJS Tutorial: A Beginner’s Guide to AngularJS


Since I first started using AngularJS several years ago, it has become the most popular single-page application (SPA) framework for the JavaScript language. AngularJS makes it easy to solve simple problems fast, yet has enough features to enable development teams to build complex large-scale applications.

This tutorial aims to introduce a complete beginner to AngularJS by explaining fundamental concepts and building a sample application. The application will be a simplified admin area for a multi-author blog. Continue reading


Angular 1 vs Angular 2 – a high-level comparison

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 to reason about
  • Angular 1 vs Angular 2 change detection
  • More transparent internals with Zones
  • Improved stack traces
  • Much improved performance (and why)
  • Improved modularity
  • Improved Dependency injection
  • Web component friendly (how and why)
  • Support for Shadow DOM
  • Support for native mobile rendering in Android and iOs
  • Support for server side rendering
  • Improved testability
  • Migration path to Angular 2
  • Conclusions

Continue reading

Logo MySQL

How does the MySQL JDBC driver handle prepared statements

Prepared statement types

While researching for the Statement Caching chapter in my High-Performance Java Persistence book, I got the chance to compare how Oracle, SQL Server, PostgreSQL and MySQL handle prepare statements.

Thanks to Jess Balint (MySQL JDBC driver contributor), who gave a wonderful answer on StackOverflow, I managed to get a better understanding of how MySQL handles prepared statements from a database performance point of view.

Basically, there are two ways of preparing a statement: on the server-side or on the client-side. Continue reading


Node.js Tutorial

Node.js Tutorial: A Beginner’s Guide

In this tutorial, I’ll teach you the basics of Node.js. Not only will you learn what Node is and what you can do with it, but you’ll see Node in action. We’ll build a simple application for a video rental store using Node, Express, Angular and MongoDB.

At a minimum, I’m assuming you have some web development experience. So you should know a bit of Javascript, HTML, and CSS, and have some familiarity with a web application framework such as ASP.NET MVC, PHP, Python or Rails. As far as Node, Express, Angular and MongoDB are concerned, I’m assuming you’re a beginner and that’s why you’re reading this tutorial. So, I’ll cover all these technologies from the ground up. If you do happen to have some experience with Angular and MongoDB, you can read this tutorial faster. Continue reading


Are you getting worked up over code duplication?

As programmers, we have long learned that Duplication is the Ultimate Sin of programming. Even considering to duplicate something is almost unthinkable.

But removing duplication introduces dependencies. If you and I use the reuse the same piece of code instead of duplicating it, changes I make may affect you. This effect can anything from beneficial (I fixed a bug you also needed fixing) to benign (I added a new feature that you’re not using) to detrimental (I want it to work in a way that’s no good for you).

When we have dependencies, we have to think: “Perhaps I shouldn’t add that feature – what if breaks something for someone else?” “Damn the torpedoes, I’m hacking it in!” or “Perhaps I’ll just make a fork for my changes and we’ll merge later”. Continue reading

Kugel, JAVA, Programmiersprache, Sprache, plattformunabhängig

Run java web apps in embedded containers with Maven, Jetty and Tomcat

While developing java web applications is very practical to have quick feedback from a “real” environment. In this post I’ll explore how to run a java web application with Maven in an embedded container be it Jetty or Tomcat.  I’ll show how I have configured them for the development of podcastpedia project backing the Podcastpedia.org website.

Octocat Source code for this post is available on Github - podcastpedia.org is an open source project.

Continue reading


A fresh look on accessing database on JVM platform: Slick from Typesafe

In today’s post we are going to open our mind, step away from traditional Java EE / Java SE JPA-based stack (which I think is great) and take a refreshing look on how to access database in your Java applications using the new kid on the block: Slick 2.1 from Typesafe. So if JPA is so great, why bother? Well, sometimes you need to do very simple things and there is no need to bring the complete, well modeled persistence layer for that. In here Slick shines. Continue reading