/    Sign up×
Community /Pin to ProfileBookmark

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.

    to post a comment
    JavaScript

    4 Comments(s)

    Copy linkTweet thisAlerts:
    @felgallJul 28.2005 — 
  • 1. I don't install plugins so I don't see any Java on web pages.

  • 2. It works across all modern browsers that follow the standards.

  • 3. Try searching Google.

  • 4. DHTML runs in the web browser so if you ewant an application to run in the briowser that doesn't access anything outside the browser (except perhaps the web server) then yes.
  • Copy linkTweet thisAlerts:
    @sergiuauthorJul 29.2005 — Hi felgall,

    Please be more specific:

    Are you a DHTML programmer? What tools do you use for DHTML programming?

    Are there any DHTML software libraries that I can use to build GUI applications? (as far as I understand DHTML operates on the HTML element level)

    Thanks,

    Sergiu.
    Copy linkTweet thisAlerts:
    @KorJul 29.2005 — DHTML is more a way to use both javascript (in fact ECMAScript +DOM) and CSS. DHTML has nothing to do with java.

    Now the responses to your question

  • 1. Javascript is a client-side language. Java is a server-side language. They have nothing at all in common (javascript resembles rather with C++ or php) except the name, which, at a time, was a "brand" affair (Netscape - the LiveScript owner - joined in mid 90's it's efforts with Sun - the Java owner - to stop Microsoft monopoly, and renamed their client script language javascript in order to emphasize this partnership).


  • Javascript is a powerfull object-oriented-on language. It uses functions, methods and operators to create/modify/remove web page's objects(elements) and their attributes. Javascript does not uses classes, but it may create a sort of "pseudoclasses" if needed. It is a very flexible language.

    Javascript is an open-language. It cooperates quite well with other languages oriented on DB admin (XML, php, asp...) or "active" objects (ActiveX, XMLHttp)

    So that the dilema javascript/java is a nonsense, as they are and they do totally different things.

  • 2. Yes, but there are small (but sometimes important) differences between, mainly, IE and Mozilla. There was made a somehow succesfull effort to standardize the language (ECMAScript- by ECMA - and DOM- by W3C ), but still Microsoft and Netscape/Mozilla use sometimes different methods. That is not a major problem, as there are always possibilities to find cross-browser solution.


  • 3. Not really. javascript does not need a compiler. Codes may be done using Notepad, for instance. There are some editors (Macromedia has some) which might build some popular javascript applications (rollover, drop menus) but it is not recomanded to use them. The so-built codes are clumsy, redundant, and hard to modify/debug.


  • 4. Javascript can do a lot of things at the GUI level, same as Java applets. The only difference is that javascript can not create vectorial design. Anyway, in that case Flash is to be prefered, not Java. Java have lost it's mid 90's popularity at GUI level. Drop menus, object movement, and stuff like that are easy to be done with DHTML or, sometimes, with Flash. Java remains only a powerful server-side language.


  • So... What you have in mind? We might tell you if javascript can or can not do that.
    Copy linkTweet thisAlerts:
    @KorJul 29.2005 — and to answer at your second post: Yes, there are here and there libraries. But I would strongly reccomand you to learn DHTML at least to be able to use/modify those codes. Ussauly javascript codes are made by hand, according to the specific needs.
    ×

    Success!

    Help @sergiu spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...