Are there any special coding conventions for Applets.
Like I read somewhere, that you should not put your applets in packages, if its not really needed.
But its the opposite in case of other Java Classes.
Also, some guidelines (do's and dont's) for applets will be very helpful.
I'm not aware of any special convention. Where did you read this one? I would question it.
posted 11 years ago
Ulf Dittmer wrote:I'm not aware of any special convention. Where did you read this one? I would question it.
So I write applets, just as I write my java classes......?
I got it from Reduce applet's loading time I really need to get some guidelines on how to write applets........I am going through the sun site.
But I feel, I need more. And the searches that I get are not helping me.
Currently I am working on understanding an applet which is more than 2000 lines(not written by me) and I am going to have to maintain it.
I just want to make sure that it is written properly...........
That page is terrible; I'd advise to ignore it. None of those hints do much in practice, and they make the code worse. Just make sure the applet is in a jar file, and you should be fine. (There isn't much you can do if the applet is big, or uses big libraries, and users are on a dial-up line. But otherwise, don't worry about it.)
If you want to make the code maintainable, start by refactoring any class that's longer than a few hundred lines of code at the most.
posted 11 years ago
Thanks for the reply........
Ulf Dittmer wrote:If you want to make the code maintainable, start by refactoring any class that's longer than a few hundred lines of code at the most.
There is only one class with 12 inner classes(all extending threads except one that implements runnable) and 24 methods.
I've got to understand it first............... and then maintain it
And I am just a beginner at applets...........
Actually, the applet is not used for animation at all. It is just used for doing io and logging operations behind the scenes for a flex based ui.
I don't know whether it is the right way to do it or a correct use of applets............