Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: JavaScript/DHTML newbie -- general questions

  1. #1
    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.

  2. #2
    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.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,991
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    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).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Last edited by Twey; 07-29-2005 at 10:29 AM.
    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!

  5. #5
    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.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    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!

  7. #7
    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.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Last edited by Twey; 07-29-2005 at 07:06 PM.
    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!

  9. #9
    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".

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    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.
    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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •