Bandos’ Arcade

Icon

“It’s not about how it is, but how I see it ” – Stranger Than Fiction

WSO2 Gadget Server is out… Download it !! Play with it !!

Yesterday (16th Dec) WSO2 Gadget Server graduated from its beta status and announced its release. WSO2 Gadget Server is designed to serve as a presentation middle-ware product in the SOA space to smoothly display chunks of service oriented data for the end users.

The solution architecture is based on portal / portlet concept but making it far more simpler. Since the enterprises are more and more leaning towards the cloud and service oriented mashups, visualizing those data should not be complicated. Hence the Gadget Server provides a simple platform to write the data visualization code just in HTML, JavaScript and XML the implementation of the presentation logic cannot make more simpler. It is exactly similar to writing a Google gadget (hosted in iGoogle / Gmail / orkut) to Tweet ;) .

As far as it goes the Gadget Server’s applicability for the enterprise is somewhat an enterprise dashboard that can be customized according to the user’s need and governed by the authorities. For an instance if you are a manager of a bank, wouldn’t it be great to have a dashboard forecasting and displaying current and future bank transaction stats and predications, while at the same time in a deferent view having your business schedule, calender, mail/IM, and news as small but clear and interactive portlets.

Yeah so thats, what the Gadget Server does, and the interesting fact is, its simplicity and extensibility, What all you need to know is some HTML and JavaScript. (no need to consult Java / .NET / PHP / SOA experts). So Download it !! Play with it !! Give us some feedback !!

Apache Shindig talk at Apache Con Asia 09

As I have mentioned in some previous post, today I did a talk about Apache shindig and its use cases (WSO2 Gadget Server) at Apache Con 09 with my Colleague Tyrell. So without writing about the whole talk let me share the presentation slides. The Talk turned up great, audience were quite interested, too bad we had very limited time and missed to do a demo. :(

View more documents from Nuwan Bandara.

Apache Asia Road Show 2009 >> Keynote speech

Today I was at Apache Asia road show 2009 at Colombo, and feeling good about myself of attending :) . It was a great session with many valuable tech talks and more of a valuable community gathering. Am not writing this post to talk about Apache and all the open source movement but about a specific talk which made me thinking.

Today, the 1st of 3 days event, the keynote speech was given by a remarkable Sri Lankan Scientist Prof Mohan Munasinghe on a topic if I remember correctly, “Making Development More Sustainable Will Help Address Climate Change“. I know !! It doesn’t sound much like open source or rather ICT in that matter, but the way he made most of the things related to ICT was quite remarkable. His solution to address bigger problems seems simple. His solution was to address the small problems, change the things what you can change at no cost, exactly quoting “Use electricity carefully, eat less meet :) ”.

Thinking it through, its the old method in solving the big problem, its just break it in to small problems and try to solve those small ones. The facts Prof Munasinghe talked about climate change was quite terrifying. But however his conclusion was optimistic, he believed as a community that we will stand up against these challenges, be less greedy and help the poor.

P.S : If anyone of you did find the presentation slides of the keynote speech please do link in comments :)

That and This

Nothing much new to write, was busy with work, WSO2 Gadget Server is about to release in the coming weeks, (I’ll be writing a whole story about it in a coming post). Apart from all those, my first article was published today in the diGIT magazine, which is a free online IT magazine run by a bunch of Sri Lankans. For some time I wanted to write about SOA and my findings in my final academic year, I thought I will blog about it. But never got a chance or rather, who will read about SOA in my blog :D . For many of such reasons I thought of contributing to diGIT mainly about SOA. With its December issue, my first article about SOA got published. you can check it out at http://digit.lk/09_dec_soa2 and leave a comment here :)

Other than that, The Apache Asia Roadshow 2009 is happening in town Dec. 3rd, 4th and 5th. On 4th morning I will be talking about Apache Shindig and our experience in WSO2 Gadget Server along with Tyrell. So pay a visit on the event am sure it’ll be awesome.

The Sparkling Graduation

Last night was the long awaited day, My graduation, We were suited up, dressed with black academic gowns and hats, Its all fancy and well, quite formal :D . There is alot to brag about, How Important this day is, The hard work we did to achieve it, but well I guess you all know the backdrop of a graduation. So without much words ill post some photos, of this important day of my life and Why I said its a SPARKLING Graduation is that I won Dr. Gamini Wickramasinghe Gold Medal for outstanding achievements. :) My parents were happy with tears in their eyes. Thank you guys, to all of you, in helping me to achieve greatness last night.

Convert from HTML to XML with HTML Tidy

For few days I was involved with WSO2 Mashup Server 2.0 release documentation, giving a hand to the mashup team. Documentation is a painful task, but when comes to open source what matters mostly is documentation :D .
Last night I had to convert a bunch of html files (some Java Api Docs) to xml in-order to port into maven site. Formatting 30+ html files to xml !@#$%^&*@% :D . So I was googleing for a tool to automate the task. With few clicks here and there I found a nice article in Big Blue’s developer works site, a tool called “Tidy“. When I tried to download and use I figure out that you can straight away apt-get the package and use. So,

sudo apt-get install tidy

and your box is now equiped with the tool, and can be accessed via the shell.

tidy -asxhtml -numeric < index.html > index.xml

but who wants to convert file by file when you have such a nice tool, so I spent few minutes in writing a tiny shell script to get the job done, the snippet is,

#!/bin/bash
for file in $(find $1 -type f -iname '*.html'); do
	myf=`echo $file | sed 's/html/xml/g'`
	tidy -asxhtml -numeric < $file > $myf
done

All looked good, worked fine. However in my Api Docs I had, had few special tags, custom to our Mashup Apis (<imconfig>, <yahoo>, <mail:config>). Tidy gave error for these files since the tags are not recognized.

In such a case you can train Tidy for new tags, by adding few lines to the tidy configuration file. (/etc/tidy.config – You can also give your own config file at the prompt)

new-pre-tags: imconfig, yahoo, msn, aim, icq, jabber, username, password

There are whole bunch of tweeks you can do with tidy, [1], [2] and [3] are some useful links that you can read up when using the tool.

[1] : http://www.ibm.com/developerworks/library/x-tiptidy.html
[2] : http://tidy.sourceforge.net/
[3] : http://tidy.sourceforge.net/docs/tidy_man.html

YUI file upload with jsp backend

For last two weeks I was working on some user interface logic and happened to use Yahoo UI library (YUI). The task was to upload an image using Ajax. Since I was new to YUI, I was looking here and there over the net for some references. There were some good ones but thats for PHP back-ends, but mine was a jsp back-end and i didn’t know how to read the object thrown out from the YUI side.

with some more digging I came across nice file handling library in Apache commons (Commons File Upload) and took use of it to do the task. the code is as follows.









I took the above code segment directly from a YUI file upload tutorial hence the credit goes to the author. The jsp back-end using apache commons file upload is as follows.
Read the rest of this entry »

JSF, Spring together with apache CXF

Good tutorials and resources on Apache CXF How Tos are not easy to digg. I had to spend hours searching and reading to make my small application up and running, Integrating Spring with JSF was pretty straightforward, but when it comes to integrating those two with JSF i got stuck.

So this post is about exposing a web service as a web project using JSF front end / Spring backed and CXF for service invocation

before starting I should mention few valuable resource around the net.

The web service u used was the publicly available spelling checker which is used in the netbeans tutorial.

The Step by step guide as follows >>

Step 1 :

Create the classes from the WSDL you can use netbeans for this task or WSDL2JAVA command (wsdl2java [URL]) in the shell.

Read the rest of this entry »

English – Sinhala Unicode Translator (ඉංග්‍රිසි – සිංහල භාෂා පරිවර්තකය)

Lat few days i was stuck with some web dev work for archmage. For the 1st time i had to localize a website in sinhala. Hence i had a longing desire to do something on sinhala i was glad. (Also getting payed for it :) definitely a chance. ) so yeah the site is www.technology.lk still under construction. The site back-end is powered by Joomla CMS and the famous Ecom component virtuemart. I had to prepare a language pack (Sinhala) for virtuemart, not a hard task, yet translating about 200+ words to sinhala is a boring task, so i was googling for an English-Sinhala Translator tool, Found Madura Dictionary. Unfortunately the sinhala words given in madura is not in Unicode. so it was impossible to copy and paste in my language pack php script.

After having a chat with my dear friend sanda, he suggested a FireFox plug-in which was developed by the University of Colombo (UCSC) which does a similar task. the plug-in came with a sqlite database which consisted nearly 50,000 English to sinhala translation words, and in Unicode. I was thrilled to see this. So for my personal satisfaction I just put to gather a small translator tool where you can type an English word and it gives some Sinhala suggestions (in Unicode).

En-Si Trans

Made it in Java, also wanted to test this new swing look and feel called Substance which did work smoothly. so yeah you can download

this tool and use it, modify it or what ever :) .

have fun,

p.s. : I will publish the Virtuemart Sinhala language pack in my next post.

Select Many Problem : JSF

After few days, got some time to write a post… well as i promised in my earlier post.. I thought of writing about the Annoying problem anybody will face while using selectMany component in JSF.

At 1st with out any experience what any one would do is writing both assessor and mutator methods to return and set A LIST of selected objects. some thing like

private List<myClass> selectList;

public List<myClass> getSelectList() {
return selectList;
}

public void setSelectList(List<myClass> selectList) {
this.selectList = selectList;
}

Even though this is the straight forward way, For some reason JSF implementation does not support it. In many places over the NET and in JSF forums, people have advised to use String Arrays, Saying you cannot use Java Collections in this scenario.

But Use of String Arrays are very much annoying and makes your work very messy. After some testing and trying I found this work around to take the selected objects as it is, not just the label string, Its pretty simple. Instead of using String arrays, Just use an array of your own class. Something like this

private myClass[] selectList;

public myClass[] getSelectList() {
return selectList;
}

public void setSelectList(myClass[] selectList) {
this.selectList = selectList;
}

Of-cause you have to use a converter in this case but not difference out there its just a normal converter for your class. So hope this tip will help

cheers !!

About Me

Author Name I am Nuwan Bandara. I am a software engineer by profession but like to call my self an artist or maybe a poet. I watch too much movies and all those American television drama series starting from soap opera to Sci-fi and fantasy.

Pretty much obsessed with open source and strongly believes in the quote "Free as in freedom". am in love with web technologies, and most of the time playing with php, javascript, css etc etc.

You can also find me @ wso2 or view my profile @ LinkedIn

Ohloh profile for nuwanbando

My Picasa

23122009047.jpg

DSCN0759.JPG

Postings

March 2010
M T W T F S S
« Dec    
1234567
891011121314
15161718192021
22232425262728
293031  

My Tweets

    follow me on Twitter