Posts

Vaadin and Google Maps

Vaadin and a Google Map Widget One of my major irritations with Vaadin has been its lack of support for Google Maps as a standard widget. The reality is that many commercial applications require some form of mapping feature and the lack of support for a standard Google Map widget has been a major problem. However this has changed with Version 7.x of Vaadin, a new Google Map Addon has appeared and it fills a very important gap in the Vaadin feature set. How to Use It. If you use Maven in your development process then using the Addon in your Vaadin project is very easy. Just place this dependency in your POM file and make sure you have the correct repository established for the Vaadin Add On's. <dependency>    <groupId>com.vaadin.tapio</groupId>    <artifactId>googlemaps</artifactId>    <version>0.6.2</version> </dependency> Here is some simple code to get you started. It creates a Googl...

No Machine stopped after launching EC2 instance into new VPC - solved

The Error If you get this error from your No Machine Client Desktop NX> 500 Authentication failed NX> 500 Remote host identification has changed NX> 500 Offending key in /usr/NX/home/nx/.ssh/known_hosts NX> 999 Bye. NX> 280 Exiting on signal: 15 Solution I solved this by doing: Find file usr/NX/home/nx/.ssh/known_hosts which includes old keys used by your ssh daemon. Remove your old key(s) by commenting out the lines. Create new connection into host using No Machine Wizard. Thanks to this post

AWS Samples Behind a Corporate Firewall

Image
The AWS Java SDK includes some interesting examples of how to use the API for a range of different use cases ( S3, SQS, SNS etc ) These work well if they are installed on a EC2 instance. However, what if you are behind a Corporate Firewall and you want the example to access the AWS services on the internet.? The Amazon S3 Client Object contains a constructor which receives a Client Configuration Object. AmazonS3Client s3Client = new AmazonS3Client(AWSCredentials creds, ClientConfiguration config) The Client Configuration object has methods to establish a proxy configuration so that the client can connect into the internet via the proxy. ClientConfiguration config = new ClientConfiguration(); config.setProxyHost("ProxyHostName"); config.setProxyUsername("ProxyUserName"); config.setProxyPassword("ProxyPassword"); If you add this type of code into a AWS Sample then you should be able to punch your way through the Corporate Fir...

Dealing with Amazon Web Service Access Keys

Image
Amazon Web Services ( AWS ) access keys are required to make API calls for the range of AWS services. These keys can be troublesome, as the tendency is to hard code the values in your software ( which many internet examples do ) or to use configuration files which hold them in plain text. In many ways this is bad. The secret key once displayed to you ( as the user ) is never returned again, hence its importance can not be understated. However there is a way around this problem and its associated with AWS Identity Access Managemen t ( IAM ) roles and AWS EC2 Instance s. In the digram above an application hosted on an EC2 instance requires access to S3 Objects. If you use the AWS Java SDK you can create a S3 Client Object which has a constructor which receives the private and access keys. AmazonS3Client s3Client = new AmazonS3Client(AWSCredentials creds); The constructor for this client receives a AWSCredentials object which is built using the secret and access key. ...

Vaadin 7 - because I have to

I have been resisting Vaadin 7 for a long time. Trapped in version 6, at times I have created an illusion that version 7 didn't exist. "I will get to it, soon, soon", I would say to myself. But, its time. I have bought a book , downloaded the book code and cracked open the first example. My initial impressions, Vaadin 7 is different from version 6, not just a "little different", its different by a wide margin. This journey is going to be all up hill.

A View Manager in Vaadin

One of the problems I faced early on in developing a Vaadin Application was how to move from one screen to the next. I managed to find a example pattern which is based on a "View Manager". This object is responsible for maintaining the various screens within the application. At any point you can ask the "Manager" for a previous screen and you can display its contents. The example I found that uses this pattern is called the " Gas Diary ". The View Manager class itself contains a HaspMap and a Stack. The HashMap contains a string for the name of the view and a Layout. The Stack contains a Layout. In the Gas Diary Main Application the Login Screen is "switched" to via this process. setMainWindow(mainWindow); viewManager = new ViewManager(mainWindow); // Create the login screen viewManager.switchScreen(LoginScreen.class.getName(), new LoginScreen()); This method has worked for me...

Open Search Server - A Discovery.

Search. The missing app in organisations. In my opinion poor search is the root of "knowledge management" issues. In fact, I think a poor search platform is to blame for huge duplication within organisations. In reality, no one can find anything in your average company. Open Search Server is an interesting open source solution in this space.