Go Back   Dynamic Drive Forums > General Coding > JavaScript
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-28-2005, 10:03 PM
sergiu sergiu is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default JavaScript/DHTML newbie -- general questions

Hi all,

I am new to Web programming, most of the time have done GUI development in C++/MFC and played a bit with Java/Swing.
I have read about DHTML and its ability to enable interactive Web applications.
Before delving into DHTML programming I would like to know what are the surprises; people in my group ask the following questions:

1. Why do we need this DHTML stuff? (after all, we already have Java)
2. Does it work across browsers?
3. Are there any development tools that support DHTML programming?
4. Can we use DHTML to develop GUI applications like we do with Java?

Thanks for your time,
Sergiu.
Reply With Quote
  #2  
Old 07-29-2005, 03:16 AM
Willdawg Willdawg is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

... DHTML it's an acronym for Dynamic Hyper Text Markup Language. It's really an extension of html I don't know what you mean by GUI I know what it stands for Graphical User Interface but you do that a lot with java? Or do you mean javascript. Javascript is a scripting language with many pusposes you could make games,apps, w/e. It is slow but DHTML does not have this capability I'm pretty sure. I'm not exactly sure what it is :P haha I do use parts of it though haha.

edit: and if you meant Java then wtf are you talking about java is slow as hell for loading why would you make a GUI for a site in it when it could be done in HTML and javascript.
Reply With Quote
  #3  
Old 07-29-2005, 07:13 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 19,003
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

1. Why do we need this DHTML stuff? (after all, we already have Java)
You don't need it unless you want faster loading effects than you can get with Java (especially on non IE browsers).
2. Does it work across browsers?
Yes. It can be tricky at times though, owing to browser peculiarities.
3. Are there any development tools that support DHTML programming?
A good text editor. And many of these WYSIWYG HTML editors support it in a limited fashion.
4. Can we use DHTML to develop GUI applications like we do with Java?
Yes but, the operative word is 'like'. They will not, in most cases, be the same. DHTML is more suited to simpler applications than what Java is capable of. If all you are going for is a slideshow or document effect, DHTML is far superior owing to load time.

DHTML is really not any one thing, rather the body of devised schemes (for lack of a better word) employing javascript, html and, often css style. Also used, at times, are PHP, xml and whatever else is handy or suited to one's particular purpose(s).
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #4  
Old 07-29-2005, 11:25 AM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Quote:
4. Can we use DHTML to develop GUI applications like we do with Java?
No, not at all. Applications cannot be written in DHTML. In Java terminology, DHTML is for applets that interact with the page more than standard Java applets are allowed to (although Javascript can be used to interact with a Java applet for the same effect). DHTML has nowhere near the power of a Java application; this isn't what it was designed for. You can design a GUI for your webpage, using HTML instead of AWT/Swing, but for anything very complicated, Java is necessary. For simple interactivity or pretty effects, DHTML has the advantage, due to its speed. For anything that requires more power (sockets, advanced graphics, 3D...) a Java applet is required.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Last edited by Twey; 07-29-2005 at 11:29 AM.
Reply With Quote
  #5  
Old 07-29-2005, 04:50 PM
sergiu sergiu is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi jscheuer1 and Twey,

Your replies are very helpfull!

Quote:
Originally Posted by jscheuer1
Yes but, the operative word is 'like'. They will not, in most cases, be the same. DHTML is more suited to simpler applications than what Java is capable of. If all you are going for is a slideshow or document effect, DHTML is far superior owing to load time.
What makes Java more suitable for developing GUI applications than JavaScript+DHTML? Is there a sharp answer?

Quote:
Originally Posted by Twey
No, not at all. Applications cannot be written in DHTML. In Java terminology, DHTML is for applets that interact with the page more than standard Java applets are allowed to (although Javascript can be used to interact with a Java applet for the same effect). DHTML has nowhere near the power of a Java application; this isn't what it was designed for. You can design a GUI for your webpage, using HTML instead of AWT/Swing, but for anything very complicated, Java is necessary. For simple interactivity or pretty effects, DHTML has the advantage, due to its speed. For anything that requires more power (sockets, advanced graphics, 3D...) a Java applet is required.
What things cannot be done using JavaScript+DHTML? (please correct me)

1. Cannot open sockets -- but, can load data from Web servers (e.g. through HTTP, FTP, SOAP). In other words: no access to low-level communication protocols -- I presume that most of us can live without that.

2. Advanced graphics -- what exactly do you mean by this? An application like MS Outlook requires "advanced graphics"? An application like the editor I am using right now to post this message requires "advanced graphics"?

3. 3D -- OK, I can live without 3D for a while ;-)


Thanks for your patience,
Adrian.
Reply With Quote
  #6  
Old 07-29-2005, 05:25 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

1) It can only run within a web browser.
2) It has NO socket capabilities at all.
3) By "advanced graphics" I mean... well... basically any graphics. There is the HTML <img> element, and it can be moved around with Javascript. That's about all.

HTML is not a real language - any more than PDF is. It's a format to present documents, that's all. Its elements were never originally designed for interaction, and while they now do have such support, it's not as powerful as a real programming language's. Javascript is a language, but it was only designed to manipulate HTML. Javascript basically edits HTML on the fly.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
  #7  
Old 07-29-2005, 06:40 PM
Willdawg Willdawg is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it cannot open sockets but you can with XML. If you're thinking of making something multiplayer or a chat room. dhtml/javascript can do it but you wouldn't get any speed.
Reply With Quote
  #8  
Old 07-29-2005, 08:03 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Quote:
it cannot open sockets but you can with XML.
XML isn't even a language. It's merely a format for storing data that makes it easier to access for XML-aware programs. You cannot open sockets with it; you can, in certain cases, use it to instruct another program to open sockets. DHTML could not, in any manner, create a multiplayer game or chat room. It could interact with something server-side to achieve a similar effect, with difficulty, but it couldn't do it by itself.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Last edited by Twey; 07-29-2005 at 08:06 PM.
Reply With Quote
  #9  
Old 08-01-2005, 04:48 PM
sergiu sergiu is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Twey
It has NO socket capabilities at all.
Why someone would want to open sockets?
In other words, why someone would work with a low-level API (sockets) when he can work with a high-level API (WebServices)?

Quote:
Originally Posted by Twey
"advanced graphics"
"advanced graphics" == "vectorial graphics" ?
Please provide few examples for what would you do with "adavanced graphics".
Reply With Quote
  #10  
Old 08-01-2005, 05:47 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Quote:
Originally Posted by me
3) By "advanced graphics" I mean... well... basically any graphics. There is the HTML <img> element, and it can be moved around with Javascript. That's about all.
Quote:
In other words, why someone would work with a low-level API (sockets) when he can work with a high-level API (WebServices)?
Sorry, say "network capabilities" not "socket capabilities." The only thing it can do is redirect the browser to another page.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:56 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.