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 at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to