Showing posts with label Google API. Show all posts
Showing posts with label Google API. Show all posts

Thursday, 28 March 2013

Guava : Using Java Collections the Google Way

Recently Guava came out with release 14.0.1 which include a number of bug fixes and enhancements. As a utility library, Guava provides an impressive list of extensions and tools for using Java collections with an aim towards improving code readability, transparently managing Java collections and introducing useful checks and frequently used utility methods that simplify the generation of quality code.
With respect to Java Collections, Guava provides utility methods for creating Immutable collections, and provides some new Collections. If just looking for implementing various checks on your Java Collections, there are a number of Collection Utilities that allow you to create an equivalent Java Collection while writing code that is cleaner and easier to read.

For example, constructing a generic collection before Java 7 would amount to the following line of code:
  • List list = new ArrayList();

In Guava, this could be simplied to  List list = Lists.newArrayList();
And this approach could be further extended to include the List size and initialise the List as follows:
  • List list = Lists.newArrayList(100); // create a list with a 100 elements.
  • List list = Lists.newArrayList("red","blue","green"); // create and initialise a list with some values
Similarly Guava has many utility methods for dealing with nulls in Collections, managing String and performing operations on the Java Math library that is not available in the JDK. If using the Apache Commons Library, Guava is definitely worth a check out !!

Saturday, 23 June 2007

John's essential links..for the saavy J2EE developer

We often come across useful information in our development phase and store it away as a book mark but we don't really index or summarise the information for later use and end up Googling for the same information when we need it again.

I intend to maintain this page as a collection of links related to various J2EE tools and technologies, that can be used for as a one stop shop for finding my favorite J2EE links regarding a particular technology or the solution to an issue I faced and sharing them with the J2EE community.

Feel free to send me your favorite links with a short summary of what is there on the page and I'll add it to the list.

----------------------
  • Build Tools

A. Maven


1. This article gives a good conceptual overview of the maven build tool and a handy startup command reference.
2. From the Maven home page, a starter's guide. This page has a handy faq but tries to focus on too many things and so might not answer all your doubts but it does give you something to go on.
3.Another good explanation of Maven concepts and a starter guide.

B. Ant

  • Java XML Serialization Technology

JAXB

1. A beginner's guide to JAXB.


  • Wikis and Blogging Tools

A. Versionate

B. MediaWiki

C. BaseCamp

  • Logging Tools
A. Log4J

  • Testing Tools
A. JUnit

B. Cactus

C. JMeter

D. SoapUI

  • Web Application Servers
A. Tomcat

B. JBOSS

C. WebLogic

  • Presentation / Web Tier
A. Struts

B. JSF

C. AJAX

D. CSS


  • Code Standardizing / Bug Finding Tools

A. PMD

B. findBugs

C. lint4J

  • Source Control Software
A. SubVersion

B. TortoiseSVN

Refer to this post for information, directions and tips on understanding, setting up and using Subversion and TortoiseSVN.
  • Useful Tools
Source Generation Tools

A. MiddleGen
B. XDoclet

Tailing Log Files : Cygwin

  • Frameworks
A. Spring

B. JEMS

  • Interesting APIs
A. Google Maps

1. This article has an excellent collection of Google Maps API usability examples.
2. This post summarises some of the other Google APIs, mainly the Google ToolBar API, Google Gadgets API, the Google Calendar API among others.

  • Setting Up / Configuring Tools / HowTos

Saturday, 16 June 2007

Enterprise 2.0 and Google Maps

Well, I have been working all this week on a small Enterprise 2.0 application and have got a fair hang of how the Google Maps API works. I must say, it is really cool and it is easy as pie to hook into the maps and place your own stuff on different locations.
We saw two different ways of retrieving the Geo Coordinates of a particular location (one with Javascript and the other with Java). Both are easy.

All in all, building applications on top of Google Maps is a definite Yes.

I also saw some of the Google Developer Day videos and came across this interesting one on a Google Map API workshop.
The speaker gave a brief overview of the Maps API and set the guys on developing an application (within 90 mins). The best 3 attempts would win a 3D mouse. Do you know what a 3D mouse is? Well, i didn’t. Its a klunky joystick looking app that allows you to pan and zoom on Google Earth and Google Maps in a much better way than its conventional cousin.
Towards the end, the speaker gave a useful tip on the GeoCoding service saying that the same should not be used on the fly and the GeoCoodinates should be stored in the local database for faster response time. Not to mention the limitation of 50,000 requests that the GeoCoder allows over a 24 hour? (some controversy here)

Another interesting API that was talked about was the use of Mapplets.which allow you to embed data from a variety of sources, into your Google Map.
Give the video a look if you have a spare 30 minutes.