Wednesday, December 11, 2013

Re: GWT/JavaScript code generation tool

Unlike C++ JavaScript is a dynamic language.
I m just not sure it s possible  for such a tool to generate descent wrapper for JS code.

For example take the following JS code

function doSomething(o){

}

How would a tool what the type of o is. Object ? Number ? String ? 

Commenting the code could be a solution (Like Closure does).
But  not all JS libraries have descent comment informations.

That s why I m saying I m not sure  how such a tool  would work for every given JS library.
But I might be wrong though.


2013/12/11 David Hoffer <dhoffer6@gmail.com>
Alain,

Your in the process of writing a wrapper so you might know if there are technical hurdles that would prevent this...but I think it would be possible.  The folks at SWIG manage to auto generate wrapper code starting with incredibly complex C++ code and manage to generate perfectly fine Java wrapper code (as well as about a dozen other languages)...so it seems that it would be possible.

-Dave


On Wed, Dec 11, 2013 at 11:40 AM, Alain Ekambi <jazzmatadazz@gmail.com> wrote:
Would be nice. I m just not sure if that can work for every JS library out there.
I heard that GWT 3 will have a better interop with JS libraries.
Just not sure how that will work.


2013/12/11 Juan Pablo Gardella <gardellajuanpablo@gmail.com>
It is more easy if we have a tool that writes the wrapper for us, but for now I suppose this tool does not exist, but will be very useful.


2013/12/11 Alain Ekambi <jazzmatadazz@gmail.com>
What about writing a wrapper ? 
I m not sure it s even possible to "auto wrap"  everything exisiting  js library.
I m writing a wrapper for Ext JS and  there are some "places"   that I m not sure they can be auto generated.


2013/12/11 Juan Pablo Gardella <gardellajuanpablo@gmail.com>
I like a tool for that. If some tool exists, GWT will be very attractive because currently a big problem is that is not very easy reuse javascript libs.


2013/12/11 dhoffer <dhoffer6@gmail.com>
Are there any tools out there that can auto generate the GWT wrapper code for native JavaScript code?  I'm looking for a way to automate using JavaScript in GWT applications, sometimes it's best to start with an existing JavaScript client library and wrap for use in GWT.  I have in mind the CometD JS client library for instance.  Ideally I'd like to integrate this with the maven build.  What I'm looking for is exactly like SWIG for generating wrapper code from existing C/C++ code.

-Dave

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/GkvZUIs2knY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.

To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment