Pages

A midnight exception... is never caught

2 am .. Its dark and cold.Sleep deprived.Enjoying 7th symphony.I donn remember how many times ... The wizardry of a deaf ! Like a fall... sweeping egos out of pride minds into the depth of folly.

grrr...

All these things are a fallacy.A bigotry.An apartheid from the very existence of nature around us.. Wait, Is there anything left ? I forgot...

I closed my eyes...

Technology sucks !! It will plunge u into a dazed state from which you will never recover.Human intelligence and creativity to please his unending desires.To satisfy the eternal consumer needs.There we go ; the "samsara" of material flow.Ha !

When do a loose puck like me feel elevated ? I donno. I feel high most of the times.
I hated computers once.But the unabated pleasure it gave me... fulfilling the undemanding desires made me a slave.

No, am the master.I program to control machines.

Wait.... mmm Waited....Eventually I learned meself, that I program to survive.Such a pathetic demise to the pride self.Who is the slave? Whos who a slave ?

Its too late...

When the ambitions become unbounded, will eventually consume the sorrowful seed that will grow upon you like a banyan tree;underneath beckons the despondent shade that will comfort your inferior ego.The pursuit of happiness is a myth.

May be Adam Smith was right in his Theory of Moral Sentimets

...my incompetent leftist thoughts.

Think of this marvelous machinery succumbs most of the human needs.Programmers as artists.They are like master craftsmen whose never moved their ass from the shrine , and whose eyes gaze through the entire Google's index...

I donno.Who cares.I feel sleepy.Go and sleep ....

RESTful Java , some links

I would like to share some interesting links  for developing Restful applications in java 

JSR 311: JAX-RS: The JavaTM API for RESTful Web Services:
This JSR will develop an API for providing support for RESTful(Representational State Transfer) Web Services in the Java Platform.

Jersey - JSR 311:JAXRS implementation

REST for Java developers, Part 1: It's about the information, stupid - JavaWorld

REST for Java developers: Restlet for the weary - JavaWorld

REST for Java developers, Part 3: NetKernel - JavaWorld

JavaFX RESTful Pet Catalog Client

Some pdfs


If you are a Netbeans fan you should view these screencasts 
RESTful Web Services Pet Catalog
RESTful Web Services in NetBeans IDE 6.0
Building an End-to-End Restful Web Application
RESTful Web Services Pet Catalog - NetBeans IDE 6.5
YouTube: NetBeans REST Web Services, Building and Deploying (Part 1)
YouTube: NetBeans REST Testing and Invoking REST Resources (Part 2)


EXTJS,GWT RPC ...an experiment on widgets

I was doing samples on GWT during my free time.I tried Ext-GWT (not GWT-Ext).There are lot of articles / screen casts around the web regarding how to work out RPC in GWT.Some people mess up sometimes.So I decided to document the method that worked out for me. This is for the GWT version 1.5.3.It supports Java 1.5.Even if GWT is using java, we are not supposed to harness the very features of Java 1.5.Anyway GWT is the Swing for web.Adding the elegant extjs with GWT is indeed a good choice for RIA development.ExtGWT is a library written in Java.If you need a kick start - go here - http://extjs.com/helpcenter/index.jsp having screenshots for setting up a project.If you are using eclipse for GWT development there are a lot of plugins around, like gooplise .I know I will mess up with that.So I decided to develop from scratch than plugin generated RPC codes.Before creating packaging structure we have to be aware of the Directoryconvention used in GWT RPC

More detailed RPC development here

The server code should go to "server" and client inside "client" We can override the paths in app.gwt.xml If we add a " < server path="path" > ,for packages/ modules added . We have to add the client and intl paths which are default.Its similar to java default constructor, when we add a arg constructor, the def constructor will be overridden... sort of

So I developed a poll in EXT- GWT ..oof .Compiling seems slow.I found it very difficult to debug.Common issues and resolutions:

a.com.google.gwt.user.server.rpc.RemoteServiceServlet - ClassNotFoundException
resolution - put the Service interface and ServiceAsync implementations inside client. In the server side, point the server path to the Service implementation.Try to run the server classes to invoke RPC after deploying in jetty/tomcat

ie. in gwt.xml it will be

<servlet path="/VoteService" class="demo.app.server.rpc.VoteServiceImp" />

in web.xml

<servlet>
<servlet-name>vote</servlet-name>
<servlet-class>demo.app.server.rpc.VoteServiceImp</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>vote </servlet-name>
<url-pattern>/VoteService </url-pattern>
</servlet-mapping>

b. do not forget to call layout.. when using ext implementations

c. there are tab panel rendering issues... i have to resolve

d. mmm got problem with serializations. I was transferring a map of string keys and Integer values.So used annotations....

/*
* @gwt.typeArgs <java.lang.string,java.lang.integer>
* */

Interface looks cool.. using GWT the code becomes maintainable.They are new products, so we have to think of choosing them for production quality applications...

I have to go deep into these .Anyway I have made some samples.. i have uploaded one

download code

Use eclipse. The setup and configurations can be seen from previously screencast/article links .Compile using GWT dev tool.Transfer the generated classes to WEB-INF/classes folder.Add gwt-server.jar to libs. Access the App.html to see the widget.

In my opinion working on EXT-GWT will be overkill.We have to resolve the issues of both !!!

I will document a better one later.... Now see the screenshots.