Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2007

Tip: Looking for answers? Try searching our database.

adding graphics to my web app

Thread view: 
Mario - 25 Sep 2007 08:39 GMT
I develop a small web application with NetBeans and Visual web pack. I need
to add some dynamic 2D elements on my page. Which tehnology is the most
suitable for that platform ?
Andrew Thompson - 25 Sep 2007 09:37 GMT
>I develop a small web application with NetBeans and Visual web pack. I need
>to add some dynamic 2D elements on my page. Which tehnology is the most
>suitable for that platform ?

The web?  Web friendly graphics are generally the sames
types that the J2SE supports.  Types JPEG, GIF and PNG.  
GIF format offers animation, but for anything more complex
in terms of 'dynamic', you might need to use JavaScript to
actively alter the page (e.g. to change images on mouse over).

OTOH - I am not quite sure what you mean by 'dynamic
2D elements'.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Mario - 25 Sep 2007 10:24 GMT
>>I develop a small web application with NetBeans and Visual web pack. I
>>need
[quoted text clipped - 9 lines]
> OTOH - I am not quite sure what you mean by 'dynamic
> 2D elements'.

Primary, I mean manipulated text, shapes and logos in a web application.
Secondary, some cool slide shows, animated menu, like in flash tehnology.

What about Dojo, javaFX or Echo2  ? Could some of these tehnology can help
me ?
I saw that JavaFX is some script language, echo2 is framework based on java,
Dojo is Ajax and what about applet? Do you  suggest me to study some of
these tehnology or to add just javascript ? Which solution is the most
smooth and most effective?
Andrew Thompson - 25 Sep 2007 11:21 GMT
...
>...I mean manipulated text, shapes and logos in a web application.
>Secondary, some cool slide shows, animated menu, like in flash tehnology.
[quoted text clipped - 5 lines]
>these tehnology or to add just javascript ? Which solution is the most
>smooth and most effective?

If the effects desired can be achieved using JS**, it would
definitely be the best option.  (I am guessing*) All the
others would require a plug-in of some kind or other
(*I am not immediately familiar with Dojo or Echo2).

JavaFX is based around Swing, so that would come back
to applets, I suppose, or at least something that requires
the Java Plug-In.

Applets are inherently problematic, and becoming more so
by the month.  For a stable, robust, easy access web site,
I wold tend to avoid using applets at all.

** The slideshows and animated menus are easily doable
in JS.  Not sure about the text manipulation, check with
the JS gurus on comp.lang.javascript.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Mario - 25 Sep 2007 11:33 GMT
> ..
>>...I mean manipulated text, shapes and logos in a web application.
[quoted text clipped - 24 lines]
> in JS.  Not sure about the text manipulation, check with
> the JS gurus on comp.lang.javascript.

SO JS, ok,  thank you on an advice.
Lew - 25 Sep 2007 15:15 GMT
>>> ...I mean manipulated text, shapes and logos in a web application.
>>> Secondary, some cool slide shows, animated menu, like in flash tehnology.

"Andrew Thompson" wrote
>> Applets are inherently problematic, and becoming more so
>> by the month.  For a stable, robust, easy access web site,
[quoted text clipped - 3 lines]
>> in JS.  Not sure about the text manipulation, check with
>> the JS gurus on comp.lang.javascript.

> SO JS, ok,  thank you on an advice.

For controls like text boxes, dropdowns, etc., consider Java Server Faces (JSF).

The Dojo toolkit
<http://www.dojotoolkit.org/>
can manipulate text and shapes, and logos if they're graphics like PNG, SVG or
JPG.  It's a really good Javascript framework, from all accounts.

Cool "fisheye" demo:
<http://www.dojotoolkit.org/demos/fisheye-demo>

Signature

Lew

Andrew Thompson - 25 Sep 2007 16:35 GMT
>>>> ...I mean manipulated text, shapes and logos in a web application.
>>>> Secondary, some cool slide shows, animated menu, like in flash tehnology.
>
>"Andrew Thompson" wrote
>>>...For a stable, robust, easy access web site,...
>>> ...JS.  
...
>> SO JS, ok,  thank you on an advice.
>
>For controls like text boxes, dropdowns, etc., consider Java Server Faces (JSF).

Good point.

>The Dojo toolkit
><http://www.dojotoolkit.org/>
>can manipulate text and shapes, and logos if they're graphics like PNG, SVG or
>JPG.  It's a really good Javascript framework, from all accounts.

Huh..  Well I suppose that puts Dojo back 'into the mix'.

>Cool "fisheye" demo:
><http://www.dojotoolkit.org/demos/fisheye-demo>

I would like to say I looked at it.  I *tried* to, but
my phenomenally slow connection makes some
JS based pages almost unworkable.  And now my
'poor old IE' is frozen and looks about to come crashing
down, probably bringing the other ten browser windows
(to other sites) with it. sigh..

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Lew - 25 Sep 2007 16:55 GMT
Lew wrote:
>> Cool "fisheye" demo:
>> <http://www.dojotoolkit.org/demos/fisheye-demo>

> I would like to say I looked at it.  I *tried* to, but
> my phenomenally slow connection makes some
> JS based pages almost unworkable.  And now my
> 'poor old IE' is frozen and looks about to come crashing
> down, probably bringing the other ten browser windows
> (to other sites) with it. sigh..

Huh.  I use Firefox in Linux (Fedora Core 7), and once I unblock JS for the
site it works fine here.  I usually don't expect pathological behavior in
Win/IE if it works in FF/Linux.  Then again, JS is client-side software, and
that leaves it up to MS how to implement it.

As for speed of connection, that shouldn't matter too much, because the Dojo
magic happens in the browser.

One reason why I avoid JS myself is its lack of portability, that is to say,
its dependence on the kindness of strangers.

However, as Sun themselves have recognized, we need scripting, both client-
and server-side.  That's why I'm looking into Dojo and Rhino and Ruby myself.
 Coming as I do from the server-side viewpoint, though, I look at client-side
behavior as the icing, server-side as the cake.

Signature

Lew

Andrew Thompson - 25 Sep 2007 17:31 GMT
>Lew wrote:
>>> Cool "fisheye" demo:
[quoted text clipped - 14 lines]
>As for speed of connection, that shouldn't matter too much, because the Dojo
>magic happens in the browser.

I have never investigated too deeply, but have trouble
with many pages saying 'Done' loading when there is
actually nothing on-screen, it seems after that (my
guess) that a JS based call is made back to the
server to - retrieve the actual content.

This causes problems for my current WITUN, Google
mail*, and many other pages.  

Even without any JS interaction, posting to the Sun forums
can be a hassle through this connection, since by the time
the 'Post Reply' page comes up - I have been 'timed out'
and have to go through the damn log-in again!

>One reason why I avoid JS myself is its lack of portability, that is to say,
>its dependence on the kindness of strangers.

It depends on the kindness of strangers to be *enabled*,
but once that hurdle is past (passed?) it *can* be written
to be completely X-browser - as long as a technique known
as 'feature detection' is used.

>However, as Sun themselves have recognized, we need scripting, both client-
>and server-side.  That's why I'm looking into Dojo and Rhino and Ruby myself.
>  Coming as I do from the server-side viewpoint, though, I look at client-side
>behavior as the icing, server-side as the cake.

(chuckle)  I'm the kind of guy that will scrape off &
eat the icing, but toss the cake to the dog.

* Yes, yes. I feel entirely free to slag them, while
making use of their services.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Mario - 26 Sep 2007 08:25 GMT
> Lew wrote:
>>> Cool "fisheye" demo:
[quoted text clipped - 22 lines]
> Ruby myself. Coming as I do from the server-side viewpoint, though, I look
> at client-side behavior as the icing, server-side as the cake.

And what about JMaki. ? I ask that becasue NetBeans have a nice plugin for
JMaki. Do you prefer Dojo under JMaki ?
Roedy Green - 26 Sep 2007 00:46 GMT
>I develop a small web application with NetBeans and Visual web pack. I need
>to add some dynamic 2D elements on my page. Which tehnology is the most
>suitable for that platform ?

Here are some approaches you can use.

1. dispense pre-built images.

2. compose images on the fly in the server with a PNG encoder or
relative. See http://mindprod.com/jgloss/pngencoder.html

3. use an Applet or Java Web Start  at the client end that reads raw
binary data from the server and converts it into an image.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 26 Sep 2007 00:47 GMT
On Tue, 25 Sep 2007 23:46:17 GMT, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>1. dispense pre-built images.
>
[quoted text clipped - 3 lines]
>3. use an Applet or Java Web Start  at the client end that reads raw
>binary data from the server and converts it into an image.

4. dispense shockwave or flash programs.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Mario - 26 Sep 2007 08:36 GMT
> On Tue, 25 Sep 2007 23:46:17 GMT, Roedy Green
> <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
[quoted text clipped - 7 lines]
>>3. use an Applet or Java Web Start  at the client end that reads raw
>>binary data from the server and converts it into an image.

But I heard many negative opinions against applets in a battle applet vs JS
vs Flash ...
I don't know, I'm a newbie for a pretty long time and always will be :)

> 4. dispense shockwave or flash programs.

Is that means that I can call flash animation from my code?
Mario - 26 Sep 2007 08:42 GMT
>> On Tue, 25 Sep 2007 23:46:17 GMT, Roedy Green
>> <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
[quoted text clipped - 15 lines]
>
> Is that means that I can call flash animation from my code?

Look at the http://www.safari-fx.de/
I wish to be capable creating something like that but in a tehnology which I
know (more or less).  I mean: NetBeans, java, JS and dojo, JMaki as
"compatible" tehnologies.
Roedy Green - 26 Sep 2007 10:44 GMT
>But I heard many negative opinions against applets in a battle applet vs JS
>vs Flash ...
>I don't know, I'm a newbie for a pretty long time and always will be :)

Personally I hate JavaScript.  It has ugly syntax. It is a primitive
non-oo, language. It is buggy. It is has different bugs in every
browser.  I wish it would die.  Ajax is an abomination.

Applets are much better behaved. The problems with Applets are
ensuring Java is properly installed, and that site administrators have
not been spooked by Microsoft into blocking Applets with firewalls.

The advantages of Flash are ease of installation, good penetration and
tiny size.  The run time is so small, I suspect it is a toy language,
much like JavaScript.

I like the idea of doing an entire project in one language.  Then all
team members can understand all the code and its interactions.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Mario - 27 Sep 2007 09:49 GMT
>>But I heard many negative opinions against applets in a battle applet vs
>>JS
[quoted text clipped - 15 lines]
> I like the idea of doing an entire project in one language.  Then all
> team members can understand all the code and its interactions.

Applets are closer to me cause I have some knowledge from a developing
desktop applications in java which consists 2D graphics elements.  At this
moment I have an "order" from a friend which demand a site for creating and
ordering a stamps for his small bussines company, he demands something
modern like this site: www.safari-fx.de
I know how to create a "creating a stamp" part, but I'm not familiar with
the "makeup" things and I have a feeling that flash programmers can do that
easier and prettier:)
Roedy Green - 27 Sep 2007 23:37 GMT
>Applets are closer to me cause I have some knowledge from a developing
>desktop applications in java which consists 2D graphics elements.  At this
>moment I have an "order" from a friend which demand a site for creating and
>ordering a stamps for his small bussines company, he demands something
>modern like this site: www.safari-fx.de

that site uses Flash.  It makes it pretty easy to have images dance
about sprite-like.  Flash was designed for precisely this sort of app.

Perhaps you might proceed by learning flash, or by subcontracting that
part out to an experienced flasher.

I have never written a flash program myself, but I suspect
even  non-programmers can put together "flashy" presentations with it.

The runtime is only about 3 meg. There can't be all that much too it.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.