Hi Shedokan,

I think this approach will fail.

a) you can't give you code away. Because GWT needs the source.
b) to use GWT code as JavaScript-lib fails. GWT compiles only what is
needed. So how could you be sure, that ALL code comes in the
JavaScript?
c) ANd when you even achieve this, your JavaScript-Size is larger then
need becauses the GWT-App needs just 10%
d) when you make it perfect separate it is becomes easy to steel it.
Because you split the code already, someone needs only to find out the
api-calls. This is much easier than obfuscate source mixed with
library and application.

When there is anything really valuable source, put it on server side.

Stefan Bachert
http://gwtworld.de


On Jun 24, 6:35 pm, Shedokan <[email protected]> wrote:
> Thanks but I am also using GWT because it obfuscates the variables of
> the class which makes all files a lot smaller, and makes the code more
> private and harder to understand and steal.
> So when I'll decide to make an API I'll use JSNI to make it while
> leaving all other variables obfuscated.
>
> On 22 יוני, 10:12, Chris Boertien <[email protected]> wrote:
>
> > There is a GWT module you can include that might make life a bit
> > easier for you. The second link is the authors blog. If you go through
> > his blog history you'll find references to articles about the module
> > and how it works.
>
> >http://code.google.com/p/gwt-exporter/http://timepedia.blogspot.com/
>
> > On Tue, Jun 22, 2010 at 12:41 AM, Shedokan <[email protected]> wrote:
> > > I want to allow people to add javascript extensions to my app using an
> > > API I'll make with GWT, so I don't want them to be able to be able to
> > > access private variables my app uses.
> > > The problem is that GWT does symbol obfuscation so there is no way to
> > > have a list of unallowed variables.
>
> > > On Jun 19, 5:25 pm, Stefan Bachert <[email protected]> wrote:
> > >> Hi,
>
> > >> I still don't get the need for private var in JavaScript.
> > >> JavaScript is somewhat the binary for GWT/Java-Code.
> > >> The use of scopes like "private" is a concept  on "Source code level"
> > >> not on  "Binary level".
>
> > >> When you compile C++ code to object code, the object does no more know
> > >> about private, protected or public.
> > >> (I am NOT referencing Java since the concepts are not so separated in
> > >> this language)
>
> > >> Stefan Bacherthttp://gwtworld.de
>
> > >> On Jun 19, 3:34 pm, Shedokan <[email protected]> wrote:
>
> > >> > I didn't miss his post I just didn't understand what's a linker so I
> > >> > thought he was talking about something else, either way I don't want
> > >> > my entire script to be private.
> > >> > I am trying to make some sort of API to be usable to other scripts on
> > >> > the page.
>
> > >> > On 18 יוני, 19:06, Sripathi Krishnan <[email protected]>
> > >> > wrote:
>
> > >> > > I think you missed Thomas' post. You *CAN* keep your variables 
> > >> > > private, its
> > >> > > just you have to use a different linker. Its just a minor change to 
> > >> > > your
> > >> > > gwt.xml, and with that your entire script will be private.
>
> > >> > > -Sri
>
> > >> > > On 18 June 2010 20:04, Shedokan <[email protected]> wrote:
>
> > >> > > > So i'll guess I'll have to make my app completley in javascript, I
> > >> > > > hope that someday in the future GWT would allow things like this.
> > >> > > > In javascript it is possible to have a completley private variable,
> > >> > > > like so:
>
> > >> > > > myApp = function(){
> > >> > > >  var privateVariable = "private";
>
> > >> > > >  // Setter and getter
> > >> > > >  this.setPrivate = function(var){
> > >> > > >    privateVariable = var;
> > >> > > >  };
>
> > >> > > >  this.getPrivate = function(){
> > >> > > >    return privateVariable;
> > >> > > >  };
> > >> > > > };
>
> > >> > > > and as far as I know there is no way to access the privateVariable
> > >> > > > unless your'e using something that is not javascript.
>
> > >> > > > Well, thanks anyway.
>
> > >> > > > On 17 יוני, 20:31, Stefan Bachert <[email protected]> wrote:
> > >> > > > > Hi,
>
> > >> > > > > probably not, I am quite sure that there is a way using (native)
> > >> > > > > JavaScript.
>
> > >> > > > > However, as long you only code in Java effectively it isprivate.
> > >> > > > > And remember, even in Java it is possible to accessprivatevar 
> > >> > > > > from
> > >> > > > > outside.
> > >> > > > > Some OR-mapper doing so. Or your debugger.
>
> > >> > > > > When your question is about security, never ever dream about that
> > >> > > > > anything is secure in your browser code.
> > >> > > > > Anything you give to a browser is open, at least for a 
> > >> > > > > professional.
>
> > >> > > > > Stefan Bacherthttp://gwtworld.de
>
> > >> > > > > On Jun 16, 11:23 am, Shedokan <[email protected]> wrote:
>
> > >> > > > > > Hello,
> > >> > > > > > I am looking at GWT's features and can't figure out weather a 
> > >> > > > > > variable
> > >> > > > > > declared in java asprivatewill stayprivateonce compiled in GWT.
> > >> > > > > > ByprivateI mean unaccessible to anyone except for the 
> > >> > > > > > constructor or
> > >> > > > > > the construtors functions.
>
> > >> > > > > > Thanks.
>
> > >> > > > --
> > >> > > > You received this message because you are subscribed to the Google 
> > >> > > > Groups
> > >> > > > "Google Web Toolkit" group.
> > >> > > > To post to this group, send email to 
> > >> > > > [email protected].
> > >> > > > To unsubscribe from this group, send email to
> > >> > > > [email protected]<google-web-toolkit%[email protected]>
> > >> > > > .
> > >> > > > For more options, visit this group at
> > >> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

Reply via email to