When to Say NO to the Cup of Coffee?
Java, a portable, multitasking, object oriented language. It has captured a considerable share of market so far. We also have huge number of products developed using this language to provide need based features to applications using it. It has also come long way since it’s birth. We have been using this language in many applications; still there are some places where we would prefer to say No to Java. These occasions may be result of some inherent disadvantages in Java, or these can be the side effects of some of the features which we most commonly use. Let us see when would we say, “I want to avoid this cup of coffee”.
Read the rest of this entry »
Code Generation in Application Development
Till date there would have been hundreds of thousands of lines of code written in each programming language. Every new application getting developed adds thousands of lines of code to this code pool. But this code is not for free, it involves huge amount of money. There are many techniques to reduce the application development cost and to improve productivity. Still we have to handwrite all the code. UML design tools, IDEs like RAD and Eclipse etc. do help in automating this code writing process. Still there is a lot of room to automate it further. The main hurdle is application architecture/framework that is specific to each application, because each application is a solution to a peculiar problem. This stops us from automating the code generation. Here is a method that will allow you to save huge amount of effort by generating code in most common as well as complex application development scenarios. I am assuming that the reader already knows application development lifecycle.
What We Mostly Use in Java
Ok, I haven’t written any tool to scan entire worlds Java code to find out these syntax elements. But definitely, all of us have gone through thousands of lines of good and bad code since we learned this language – Java. Not only me but all those who call themselves as Java developer have traveled along with this language in its journey, which started long back with a tag of platform independent object oriented language to the recent versions where everything is getting annotated. It is not just a tag but a truth that Java code is portable. This is also true that this language has got enough features to call it a rich language. If not, it would have vanished long back, and would not have created such a huge community of users. Bottom line is – which is nothing new that I am telling you – it is a good language.
Ok, let us come out of the appreciating manager mode and focus on reality. Have you ever checked what do you mostly write in your Java code? What contributes to up to 80% of your code? Open any application source code and you can see yourself.
Read the rest of this entry »
Is JSF Dying?
We remember the hype that rocked java world with entry of this web tier framework. It is different as compared to those frameworks which (actually) are front runners of web application technology stack. These include Struts, Spring MVC, Tapestry and many more. These frameworks provided simple MVC based web tier, and a set of classes abstracting the non functional part. This definitely made us to leave behind the MVC implementation of Jsp – Servlet – POJO/EJB, and use these frameworks instead. These technologies varied more in richness than fundamentals. Arrival of Java Server Faces (JSF) triggered a different thinking line. Reusable components and event based programming buzzed around us.
Read the rest of this entry »
Google Collection Types
Google Collections provide additional collection types to offer additional but common features. These advanced types are derived from Java Collection types, hence they continue to offer the features of underlying Java type. In addition to that there are many additional features encapsulated in these new types, so that we can directly use them instead of re-inventing wheel. Let us see these interfaces and features of those interfaces.
Read the rest of this entry »
Introduction to Google Collections
Introduction to Google Collections
We all know what is Java Collection Framework? Also, we have seen collection framework changing over past few years. We have seen Java introducing new APIs, and also generics getting introduced in the Tiger release. Now we have Google Collections, which are based on Java collection framework but enhance it to introduce new most commonly required features. These features are required during any real life use of Java Collection Framework. Multi key collections, collection having combined features of two Java Collections, and so many APIs that allow many day to day transformations of these collection objects constitute Google Collections.
Read the rest of this entry »
URI Template in Spring MVC 3.0
URI-template is a string containing one or more variables or place holders which can be replaced to generate URL out of this. Though this feature appears simple, but uses of this can be significant. Suppose we want to have valid a user id or a session id with each in coming request. Instead of retrieving this attribute from request or session object, we receive as a url variable. Let us see how this works.
Read the rest of this entry »
Spring MVC 3.0 Tutorial
In this post, I am going to give you a start up code base for a Spring MVC 3 based application. If you want to go back and refer to the previous version of Spring MVC then this article will help you. I am assuming that the reader is already aware of Java 5 and Spring basic concepts like annotations, dependency injection etc. Spring 3.0 has extensively used the popular annotation feature of Java 5. As we move ahead in this article, I’ll mention more new things wherever applicable.
Read the rest of this entry »
Programmatic Compilation with Java
Read the rest of this entry »
Facebook Changes Default Privacy Settings
OK! Not sure how much you are concern about it, and how much data you have uploaded there. I am talking about your data on facebook. I hope you have already gone seriously through the default privacy settings and selected only those options if data which you really want to expose to world. I know you call it privacy, security and blah! blah!! I am also sure that very very few of us go and recheck those default privacy settings once we open the account. This is not only applicable to only facebook but to any other social site. Here is something you need to worry about.
Read the rest of this entry »
