Thursday, June 30, 2011

How to push classes to be on client-side javascript

Hi all,
I am working on plugin/API for gwt, its basically a graphics
library based on a JavaScript SVG library(raphael).
I have a gwt-wrapper(Raphaelgwt) for this JS library.The JS library is
using closure pattern i.e only one JS object is there for doing all
the things(on client side) and hence wrapper also does like that only
one object for everything. What if I make 2 object , it will generate
two different SVG tag so if I want a rectangle and circle together, it
will appear separately.

Now two options :
1) Extend every class to Wrapper.( that means I must code all
application within one class or hierarchy. No OOP)
2) Use singleton pattern.
So I am following the singleton pattern. So here got this problem,
all the SVG processing goes on the server and client gets only the
processed SVG script
:( but I want the processing to be done on client-side.

I want to know two things
1)Which classes or part of my code goes to be complied to JavaScript.
2)Is there a way to push my classes to be complied for client-side
JavaScript and so that all the processing could be done there,
depending nowhere on server.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment