In previous posts, I’ve covered an Java API called JGIT for working with GIT. Besides the low level APIs, JGIT also supports high level command line like interfaces. If you know how to use the GIT command line, you can use the APIs. Note that it’s different from calling GIT commands or any other commands from Java code.
Here is a sample code I wrote to try out the APIs. Give it a try and you will like these high level APIs. Read more... (279 words, estimated 1:07 mins reading time)
In my previous post, I introduced a sample showing how to use JGIT Java APIs to diff two versions of a same file in repository. The JGIT Java APIs can do more than that – it can actually diff two text files that are not even controlled by GIT.
Here is a short sample code on how to do this. Again, it’s not the main use case for the JGIT APIs. After all, it’s mainly for GIT source control system itself. You can always use other diff APIs for this purpose. However, if you already have JGIT included, this can be handy. Read more... (208 words, estimated 50 secs reading time)
Last week I introduced the JGIT Java API with a simple sample illustrating how to read content from HEAD. If you have multiple versions of a source code or text file, you may want to see their differences. An easy tool for this is the standard diff.
The JGIT Java API has built-in support for you to generate diff between any two versions of a file, be it a source code, properties file, XML file, or any other text files. Here is a sample that shows how to do this. Read more... (304 words, estimated 1:13 mins reading time)
GIT is a source code control system created by Linus and others for managing Linux kernel development. It becomes one of the most popular version control systems especially in the open source community. Most developers use command line or the plugins to IDEs like Eclipse, NetBeans. I think even Microsoft VisualStudio has add-on for connecting to GIT, but I haven’t checked it. Read more... (343 words, estimated 1:22 mins reading time)
If you need to do certain things at certain points of time or intervals, you need scheduling capability. Don’t confuse the scheduling with multi-threading even though you can use multi-threading for scheduling but they are not equivalent. You can use single thread for many different tasks. Simply put, threads are executors, and tasks are jobs to be done by executors. Read more... (498 words, estimated 2:0 mins reading time)
It’s been a while since I touched Web application development in 2009. Before the VMworld 2009, I created a simple Web Application for the keynote that collected the names and email for a raffle to go back stage with the famous foreigner. That Web application was so simple that it’s built using Java Servlet with a static home page. It’s hosted with Terremark (part of Verizon now) Enterprise cloud. Read more... (1062 words, estimated 4:15 mins reading time)
Given the growing popularity of Hadoop, I decided to give it a try by myself. As normal, I searched for a tutorial first and got one by Yahoo, which is based on Hadoop 0.18.0 virtual machine. I knew the current stable version is 1.x, but that is OK because I just wanted to get a big picture and I didn’t want to refuse the convenience of ready-to-use Hadoop virtual machine. Read more... (697 words, estimated 2:47 mins reading time)
As a software professional using Java since its very beginning, I have been following the case regarding Google’s using Java APIs in its Android OS. I don’t want to repeat what has happened so far because you can find these updates by searching the Internet. All I want to say is that the case is pretty educational not only on the technology itself but also on the legal side like patents, copyright. Read more... (385 words, estimated 1:32 mins reading time)
While writing samples for my book VMware VI and vSphere SDK, I developed a Java code formatter within Eclipse. Although there are several built-in formatters like Java conventions, Eclipse, and Eclipse 2.1, I still decided to create my own partially due to the special requirements by Prentice Hall, but mostly due to my personal flavor for Java code. Read more... (573 words, 1 image, estimated 2:18 mins reading time)
While checking out the search engine terms to my blog, I found an interesting one there: “why so many programming languages?” A great question indeed. If you take a look at the Wikipedia page on programming languages, you will be surprised by the number of programming languages today. To give you a hint, the languages are categorized into different sections by their first letters. When I browsed the page, I found most of them were new to me and will definitely remain so in the future. Read more... (592 words, estimated 2:22 mins reading time)
My former colleague Emad Benjamin at VMware has just published a new book on running Java on vSphere. When I was still there, I had the opportunity to review the Chapter 5 of his book.
As many of you know, Emad is a well-known expert on this subject who has spoken at various events like VMworld and helped numerous customers. You can buy his book at Amazon or from publisher directly. Remember to bring it to next year’s VMworld for his autograph.:-) Read more... (435 words, estimated 1:44 mins reading time)
As a developer, I’m always interested in latest development of middleware platforms. Yesterday came a big news from VMware: the vFabric 5 Cloud Application Platform reached GA. For those who might not be familiar with vFabric, it is an integrated suite of middleware for deploying and managing applications.
Note that despite the version number, this is the first release of the vFabric platform. I guess the version 5 may be just for aligning with vSphere 5. Also, this is a suite of products that have been there for a while. Read more... (272 words, estimated 1:05 mins reading time)
There are many programming languages today, sometimes too many to choose from for a new project. The good thing is that there aren’t many main stream programming languages, so picking one is not a daunting task. And almost all main stream languages can achieve similar things, meaning any one of them will work. So in the end it’s really a matter of team preference and sometimes company policy. Read more... (329 words, estimated 1:19 mins reading time)
If you are using, or intend to use, the open source vijava API with Java Web start, you want to read this article carefully.
A community user recently reported an issue in this scenario. His test application was launched via Web Start jnlp. “First, when run a single test thread everything is fine and the VM tasks operate normally. However as soon as we kick off a second test thread while the first test thread Read more... (443 words, estimated 1:46 mins reading time)
After Java 6.0 released in 2006, it’s been 5 years during which Sun Microsystem was sold to Oracle. Today the 7.0 is finally GAed. It includes quite a few changes including small language changes as well as new and improved APIs.
The language changes are mostly small and may not affect you, for example, the switch statement now works with strings. The new try-with-resource statement, which is similar to using statement in C#, helps you with cleaner code, see the difference shown in the following Read more... (323 words, estimated 1:18 mins reading time)
During last 60 some years after computer was invented, there have been hundreds, if not thousands, programming languages. If we include domain specific language (DSLs), which accorinding to Martin Fowler may include regular expression, spreadsheet, etc, the number can be even bigger, not to mention more programming languages continue to emerge.
This would be a big burden if we have to learn all of them. Luckily, we don’t have to. In fact, most of us just need to learn several most popular ones. Even better, these popular languages may look very similar in syntax. As a result, Read more... (493 words, estimated 1:58 mins reading time)
After Shreyas shared his experience with Vaadin in his comment on my previous post, I started to play with the web framework. As it advertises, it’s “a Java framework for building modern web applications that look great, perform well and make you and your users happy.”
Based on my experience, I think it’s a great framework that is very intuitive yet powerful. All you need to do is to write Java code in a similar way to using Java AWT and Swing for standalone applications. The minor different is Read more... (401 words, estimated 1:36 mins reading time)
Using GWT for Java developers is mostly Read more... (436 words, estimated 1:45 mins reading time)
If you develop FLEX with Java backend, you most likely know BlazeDS already. It’s a web application running with Tomcat that exposes Java objects on the server side as services to the Flex Client written in ActionScript. It combines the best of Flex on the client side and Java on the server side. As a result, it becomes one of the most popular architectural styles for web development these days.
It’s less known that you can also develop Java code on the client that consumes the services on the server side. Check out this wiki page by Adobe on the original design. The implementation of Java AMF Client is added to BlazeDS as of July 2008.
Because I had to hack Read more... (1080 words, estimated 4:19 mins reading time)