Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!r33g2000prh.googlegroups.com!not-for-mail From: Alessio Stalla Newsgroups: comp.lang.java.programmer Subject: Re: tools for programming applets Date: Tue, 24 May 2011 06:33:46 -0700 (PDT) Organization: http://groups.google.com Lines: 131 Message-ID: <7be10367-5f4b-4738-a5f5-0b6eb2769dd3@r33g2000prh.googlegroups.com> References: <028d2009-98b7-43a3-b02d-83eaa89db79e@glegroupsg2000goo.googlegroups.com> <41dd1d4d-400b-4801-81cd-0136cc505faf@y27g2000prb.googlegroups.com> NNTP-Posting-Host: 151.21.127.211 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1306244384 24136 127.0.0.1 (24 May 2011 13:39:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 24 May 2011 13:39:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r33g2000prh.googlegroups.com; posting-host=151.21.127.211; posting-account=lQGEkQoAAAB85u9ZdpjVtg0WoVPxKpxu User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4534 On 24 Mag, 14:38, Lew wrote: > Alessio Stalla wrote: > > Guys, sorry, but you're completely nuts. Once more I understand why > > Java has got the reputation of being bloated. We should remember that > > Java is not necessarily targeted only at big corporations and multi- > > million projects! The OP asked how to do a certain thing. Telling him > > how a Fortune 500 company should do it is not going to help him. > > Besides, I don't think even a Fortune 500 company should clone the > > whole production server just to test one *applet*! > > Huh? =A0"Fortune 500 company"? =A0Where's your head, dude? =A0It takes tw= enty > minutes and about 50c worth of disk space to clone the server. =A0I do it= all > the time at home in my practice work. =A0That's one individual person, no= t even > a company, let alone a Fortune 500 company. =A0Get real. Well, of course I was exaggerating, but still, how long it takes depends on the server, doesn't it? What if in the OP's case the server is backed by a 1TB database? Even copying just the bits he needs for the test requires identifying those bits, and writing SQL scripts to selectively copy them. In general, it requires detailed knowledge about the server, and - I repeat - that's overkill just to test one applet. > > To answer directly to the OP question: there are a few ways you can > > test your own modified applet against your production server. > > 1) you can run the applet as a standalone application: either coding > > (e.g. a JFrame to contain it) or using something like Oracle's > > AppletViewer. This is feasible only if the applet does not interact > > with the surrounding page. > > Suggested upthread, but only partially useful as not all applet behaviors= can > be tested this way. True. The OP will decide if the behaviors he can test this way are those that interest him or not. > > 2) signed applets can bypass security restrictions. So you can run > > On the localhost, yes. It doesn't change the restrictions on which server= they > can communicate with. > > The tutorial explains this: > > "An applet can communicate with server applications that run on the same = host > as the applet." > > > "Signed applets operate outside the security sandbox and have extensive > capabilities to access the client." > Not true. You can explicitly grant AllPermissions to your applet, thereby effectively disabling security altogether. Granted, it's a stupid thing to do most of the time, but not in the OP's case. See, e.g., . > > your (signed) applet on a page loaded from localhost and still connect > > to the remote server. Or, if you *really* need the applet to run on > > the production page itself, you can probably use something like > > Greasemonkey to patch (your client-local version of) the page to > > include the applet. Needless to say, the latter option could be a > > violation of the site's terms of use, and it's unnecessarily > > cumbersome, so avoid it unless it's the only option left. > > The applet still has to communicate with the server from which is was loa= ded, > and no other. > > > To everyone else: applets *are* client-side. Really, I can't imagine > > why you think otherwise. Yes, they are downloaded from a server; so > > They are a special component that talks to a special application server, = not a > client of the web server, as explained upthread. A special component *that runs on the client* and that *can* talk to a special application server, but also to a HTTP server, or to no server at all. How is this different from Flash? Or even JavaScript, except the latter does not require a plugin? > > > what? Most software nowadays is downloaded from somewhere the first > > time. But they run on the client, and only talk to the server via > > remoting, RPC, SOAP or whatever else. Or do you really believe that > > e.g. Flash is server-side? > > > Sorry for being a little aggressive, but I can't really understand why > > there are ~50 posts sponsoring the big costly solution and ~0 > > suggesting the practical one. > > Because the solution is neither big, nor costly, and is, in fact, much LE= SS > expensive than testing on the production box. How can you possibly know!? The OP said nothing about the production box! It might as well be a cluster of ten high-end machines, as far as we know! >=A0Risk has a cost, duh. =A0Talk > about how inexpensive development and testing on the production server ar= e > when you've brought it to its knees and the client is out of business for= a > day while you try to undo the damage done by your insane irresponsibility= . You're grossly exaggerating. I don't get why you insist on doing it. > Why do you guys latch on to this "big, expensive" rhetoric as if there we= re > any merit to it whatsoever? =A0It's been pointed out before that that is = false > reasoning. =A0What is this, repeat the Big Lie (without evidence or suppo= rting > logic) long enough and this intelligent group of software engineers are > somehow suddenly going to believe it? From my POV, these lines apply more to you and markspace than to the OP and me. Peace, Alessio