Feed aggregator
Quickly move to Vala (a tutorial for Java refugees)
#Source Files
Java: *.java
Vala: *.vala
#Compilation
Java: compiled to JVM byte code (.class files)
$ javac SourceFile1.java SourceFile2.java
Vala: compiled to native code via C code as intermediate code
$ valac source1.vala source2.vala -o program
#
Vala's standard object system is GObject, compiled Vala libraries are valid C libraries.
.....
Where to put named queries in JPA?
JPQL is an object oriented query language that is based on the simplicity of SQL. The problem with such a language is where to store the query definition. Traditionally there have been 2 solutions. So having the choice between those two, which one do we choose? Actually, it appears there is a third solution, which is for some reason quite often overlooked by many people.
Video: Blind Programming Project in NetBeans IDE
Compile and Run Code Online In More Than 40 Programming Languages
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows you to compile and run code online in more than 40 programming languages.
Java desktop links of the week, September 6
Wow, it’s September already! This year is flying by, and JavaOne is right on the door step. This week there is a bunch of interesting news, in both the Swing and JavaFX worlds.
Spring v. RedHat v. Oracle
Remember when monster movies jumped the shark they did that battle of all monsters movie where Gamera came flying in on Godzilla vs. Baby Kong? Was like a monster version of a Vegas drag show. The Java world is reaching that stage. Here are a few thoughts on the various parties (just did some of this, so this is more technology focused).
Scala, JSF 2, and NetBeans
I am working on a web site that will help students practice their Scala programming skills. As I labored along, writing my JSF app code, I thought “this is silly—why not practice Scala at the same time?” But I like JSF and wasn't ready to jump to Lift or Vaadin.
With Eclipse, this isn't all that hard. Install the Java plugin. Make a dynamic web project in the usual way, using the Java EE perspective. Then, switch to the Scala perspective, right-click on the project, and, if all planets are aligned correctly, you will get a menu item “Add Scala nature”. (If they are not, see here for a manual approach.) Add your managed beans as Scala classes. Finally, switch back to the Java EE perspective, select the project properties, and add the Scala library JAR as a Java EE module dependency.
Know the JVM Series – 1 – The Uncaught Exception Handler
The Java API, backed by the JVM provides tons of features which are often overlooked by developers, mainly due to the lack of reading material and resources regarding these APIs. This is the first part of an article series which discusses such features. In this article, the Uncaught Exception Handlers are discussed.
My issues with Spring
One of those de-facto standards appears to be Spring. There is little doubt, that inversion of control, or dependency injection, can be a great tool to decouple concrete dependencies. But Spring introduces just as many problems as it solves, and here's my take on why.
Open Source Android Apps for Developers: Android-opencv
Android-opencv is an open source Android project which is an attempt at a modern port of OpenCV to Android. The developers are using recent trunk sources from OpenCV and building them with a modified Android NDK, by crystax. The crystax ndk has support for STL and exceptions, and so fits the new OpenCV structure nicely.
A few lessons learnt preparing to write a DLL - in C, C# and Java!
I started out thinking that I couldn't create a DLL in Java. So I cursed the JVM and Windows. I mixed it up with C and C# and got results. I even pondered Clojure-CLR. But shock of shocks, with research I discovered that I could do it EASILY in Java too! But with a twist - Java on the CLR! Simple POC code and instructions supplied.
Android Code Best Practices and Teaching Java
I guess I have a set of stupid questions, stupid as in I should have asked them sooner. These questions concern Android Code Best practices.
If you look at either Android Source code for Android default applications or for example the ReplicaIsland Game you see certain patterns. One, hard to encapsulate and decouple as in the bean/service pattern concepts not used. Two, the MVC pattern non encapsulated.
First Quick Look at CDI (of JEE6)
As I push farther into this document, though, I‘m kind of overcome by the thought that Enterprise dev is turning dependency injection into its version of string theory. The purported advantages of DI are that you make explicit the wiring up of components. But DI came in on the XML boom where we had cabinets of interconnects that were nameable and traceable. Ok, argument makes sense: pull the random uses of new out of the code. Also, wire together compound components into bigger units (something language does not deal with exceptionally well because there is no concept of a component in any languages that are out there). So doing bean definitions in XML that had subcomponent wirings explicitly laid out made sense. Problem was, XML became its own nightmare and people decided annotations made more sense. So it‘s ‘ok, let‘s go back into the code,‘ begging the question ‘um, how are we better off than we were when we used to do this in the code?‘
JavaOne Sessions Schedule Completed - First Impression, Some Criticism
- The window in the left lower corner is way to small. Even on high resolution it was hard to see all sessions at a glance
- There is no clean separation between the conferences - so you get overwhelmed with sessions. There should be a clear separations between JavaOne and Oracle Develop. I would like to be able to explicitly choose between conferences. It was not only hard to find the JavaOne talks, but also Oracle Develop like e.g MySQL and virtualization because of this interference as well.
- Its really hard to find the time slots. I used the try-and-error strategy, but was time intensive
- I didn't managed to find a direct link to the talks. I always have to use the advance search to find my own talks. (a bit REST could be a solution for this problem)
- Why nothing happens on Wednesday after 5 p.m.? I miss the BoFs
See you, however, at JavaOne. If you think Java EE 6 is complicated, slow or whatever - prepare your questions and attend my talk: S319369 The Feel of Java EE 6: Interactive Onstage Hacking (Wednesday). I will spend 30 seconds with slides and 55 minutes in the IDE and implement functional Java EE application with CDI, JPA, Servlets 3, JSF 2, REST, EJB 3.1, some mocks and units test without using any generators, prepared templates, wizards or other unfair stuff :-).
I will probably deploy it ~100 times - and you will not even noticed that. I'm seriously thinking about implementing a Schedule Builder during this session :-).
Open Source Android Apps for Developers: Android-dalvik-vm-on-java
Android-dalvik-vm-on-java is an open source Android project which aims to develop a pure Java implementation of the Android’s Dalvik virtual machine.
Java Best Practices – String performance and Exact String Matching
Continuing our series of articles concerning proposed practices while working with the Java programming language, we are going to talk about String performance tunning. We will focus on how to handle String creation, String alteration and String matching operations efficiently. Furthermore we will provide our own implementations of the most commonly used algorithms for Exact String Matching. Many of these algorithms can achieve far more superior performance compared to the naive approach for exact String matching available with the Java Development Kit. This article concludes with a performance comparison between the aforementioned Exact String Matching algorithms.
Using RabbitMQ, Spring AMQP and Spring Integration
I've recently done a proof of concept using RabbitMQ, Spring AMQP and Spring Integration. This post will describe how each of these open source technologies along with some enterprise integration patterns were used to replace legacy code making it easier to maintain, easier to debug and faster.
3D Graphics in Java (OpenGL JOGL)
A few lessons on setting up a JOGL template in Eclipse and an introduction to 3D graphics systems. Some basic lessons covering how to draw some coloured 2D shapes in JOGL.
JBehave 3.0 released
JBehave 3.0 was released yesterday (finally!!). I’m thrilled to have donated the Multi-tennant Spring Security example (which has been updated to JBehave 3). That example is now part of the many examples that are included in JBehave. Looking to update the presentation on my website to explain some of the new features that make up JBehave 3.0. Congrats to Mauro and Paul on all their hard work!
