I love stack traces. Not because I love errors, but the moment they occur, stack trace is priceless source of information. For instance in web application the stack trace shows you the complete request processing path, from HTTP socket, through filters, servlets, controllers, services, DAOs, etc. - up to the place, where an error occurred. You can read them as a good book, where every event has cause and effect. I even implemented some enhancements in the way Logback prints exceptions, see Logging exceptions root cause first.
Tuesday, 20 March 2012
Monday, 19 March 2012
Defensive Programming: Being Just-Enough Paranoid
Hey, let’s be careful out there.
Sergeant Esterhaus, daily briefing to the force of Hill Street Blues
Git in colour
I've been using Git for a while now, but only today realized I can have coloured output for diff, grep, branch, show-branch and status, without having to hook in any other external tools (like colordiff, for example).
Labels:
Git,
Software Development
GWT Custom Button using UIBinder
Here’s an example on how to create a custom button using UIBinder on GWT.
Labels:
Enterprise Java,
GWT,
UIBinder
Project Configuration with Spring
The .properties files
Considering the following types of environments that we want to cover – dev, staging, production – we will need to create the following properties files: persistence-dev.properties, persistence-staging.properties and persistence-production.properties. In a typical Maven application, these can reside in src/main/resources, but the wherever they are, they will need to be available on the classpath when the application is deployed.
Considering the following types of environments that we want to cover – dev, staging, production – we will need to create the following properties files: persistence-dev.properties, persistence-staging.properties and persistence-production.properties. In a typical Maven application, these can reside in src/main/resources, but the wherever they are, they will need to be available on the classpath when the application is deployed.
Labels:
Enterprise Java,
Spring
Friday, 16 March 2012
Play 2.0: Akka, Rest, Json and dependencies
I've been diving more and more into scala the last couple of months. Scala together with the "Play Framework" provides you with a very effective and quick development environment (as soon as you've grasped the idiosyncrasies of the Scala language, that is).
Labels:
Akka,
Enterprise Java,
JSON,
Play Framework,
RESTful Web Service
Disassembling Tell Don't Ask
In my last blog I defined Tell Don’t Ask (TDA) using a simple shopping cart example. In it the shopping cart was responsible for working out the total cost of the items in the cart as opposed to the client asking for a list of items and then calculating the total cost itself. The TDA example is shown below:
Labels:
Core Java,
Software Development
JavaFX: Creating a Sprite Animation
While most of my posts so far dealt with JavaFX properties and bindings, today I want to write about another part of the JavaFX runtime I also work on: the animation API.
Labels:
Desktop Java,
JavaFX
How Badly Do We Want a New Java Date/Time API?
The current Java.net poll question is, "How critical is it for JSR-310 (new Date and Time API) to be implemented in Java 8?" At the time of my writing of this post, nearly 150 respondents have voted and an overwhelming percentage have answered either "Very" (53%) or "It would be nice, but we can get by using the current classes" (22%).
Labels:
Core Java
Thursday, 15 March 2012
Working with legacy code
Context
Large organisations' systems may have from tens of thousands to a few million lines of code and a good part of those lines is legacy code.
Large organisations' systems may have from tens of thousands to a few million lines of code and a good part of those lines is legacy code.
Labels:
Software Development
The Java EE 6 Example - Galleria
Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic and doesn't solve the real world problems. This is true for the Java EE 6 tutorial. All the other stuff, like most of what Adam Bien publishes are a very tight scoped examples which also doesn't point you to a more complete solution.
FindBugs and JSR-305
Suppose that group of developers work in parallel on parts of big project - some developers are working on service implementation, while others are working on code using this service. Both groups agreed on service API, and started working separately, having in mind the API assumptions...
Wednesday, 14 March 2012
Web Services with JAX-WS on Tomcat
Let us assume an enterprise is maintaining user authentication details in a centralized system. We need to create an AuthenticationService which will take credentials, validate them and return the status. The rest of the applications will use the AuthenticationService to authenticate the Users.
Labels:
Enterprise Java,
JAX-WS,
Tomcat,
Web Services
Key accomplishments of Eclipse over last 10 years
As I have written, Eclipse is celebrating 10 years of open source and community during the month of November. There have been a number of milestones that have shaped the Eclipse community but what have been the major accomplishments? What has Eclipse done to actually change the software industry? Here are what I see as some of the key accomplishments for Eclipse.
Here Is The Main Reason Why You Suck At Interviews
I've talked about interviews from one perspective or another on several occasions, you might even say it is a pet subject of mine. It's fascinating because most people are no good at interviews and when it comes to developer interviews – well; let's just say there is a whole new dimension for us to suck at with coding questions, whiteboards and whatnot.
Labels:
Interview,
Software Development
Apache Thrift Quickstart Tutorial
Thrift is a cross language RPC framework initially developed at Facebook, now open sourced as an Apache project. This post will describe how to write a thrift service and client in different modes such as blocking, non blocking and asynchronous.
Labels:
Enterprise Java,
Thrift
Tuesday, 13 March 2012
Building Rich Clients with JacpFX and JavaFX2
Creating fast and scaling desktop clients is always a challenge, particularly when dealing with a large amount of data and long running tasks. Although Eclipse RCP and Netbeans RCP are established platforms, the idea was to build a lightweight framework that handles components asynchronously, similar to web components. Developers should have less effort on threading topics and should be able to model the applications' message flow on their own. These, and many other ideas resulted in the JacpFX project.
Labels:
Desktop Java,
JacpFX,
JavaFX
Subscribe to:
Posts (Atom)