Women in Technology

Hear us Roar



Article:
  VBScript or Perl?
Subject:   Why not JScript?
Date:   2003-11-18 22:24:04
From:   anonymous2
It's also pre-installed.


It supports prototype based OO.


Lots of people are already familiar with Javascript by using it in the web page setting.


And it's neither wordy like VBScript, nor cryptic as Perl.

Full Threads Oldest First

Showing messages 1 through 17 of 17.

  • Why not JScript?
    2003-11-23 07:29:16  anonymous2 [View]

    In a WSH environment JScript support is limitted. Prototype-based inheritance just doesn't work, so this renders JScript useless. I haven't worked with WSH extensive, so I might be wrong.
    • Why not JScript?
      2003-12-31 02:19:07  anonymous2 [View]

      Um, I don't see how JScript is useless? VBScript (and VB for that matter) only supports Object-Based programming, and through COM you cannot derive objects from one another anyhow. So, I don't see how lack of inheritence makes a difference when it comes to interfacing with COM libraries such as WMI, ADSI, Office, CDO, DAO, ADO, etc.

      FYI, The newer JScript.NET (ECMAScript ver 4) supports true inheritence, but that's a different topic...

      - Joaquin M.
    • Why not JScript?
      2003-12-01 13:44:39  anonymous2 [View]

      You are wrong. JScript support in WSH is not limited. Prototype-based inheritance does work.

      For WSH I tend to use .wsf files and mix JScript and Perl. I like using JScript's exception handling especially when using COM objects. If I need to spawn a process I prefer to use Perl to open a pipe instead of using the WshScriptExec object.
  • Why not JScript?
    2003-11-19 20:12:00  Robbie Allen | O'Reilly AuthorO'Reilly Blogger [View]

    I think one could make a very good argument for JScript. Especially with the integration into the .NET Framework, it is an attractive option. I'm not sure why it hasn't picked up as big of a following (from what I've seen) for doing sys admin scripting as VBScript.

    I've done a lot with Javascript in HTML, but not in the WSH environment. One thing I may do to write companion JScript examples for all of the code in the AD Cookbook: http://www.rallenhome.com/books/adcookbook/code.html. Then I can look at the web logs and see what is the most popular.
    • Why not JScript?
      2003-11-20 10:05:45  anonymous2 [View]

      I for one would appreciate more and better Jscript support. I've found some problems using VBScript in some places(specifically there are some nasty bugs in ActiveX scripts embedded in SQL Server).
  • Python
    2003-11-19 05:00:18  anonymous2 [View]

    Python fits very well in the windows world (can talk to dll's, COM, etc) and has cleaner object orientation than perl. Python stresses clarity and simplicity, yet it is also a very powerful language.
    • Python
      2003-11-19 20:22:57  Robbie Allen | O'Reilly AuthorO'Reilly Blogger [View]

      I wondered if someone might ask why I left out Python :-) It is also a viable option (as is a few other languages). But I see even fewer Windows Sys Admins using it. If you have a Python background and need to write scripts for the Windows environment, then you probably shouldn't look at anything else. You can accomplish pretty much the same things with Python as you can Perl on Windows. But I still prefer Perl :-)

      A good follow-on question to this article is Perl or Python? (in the Windows environment) If you knew both, would one be better than another?
      • Python
        2003-12-02 12:20:45  gjansen [View]

        The interactive environment now supported by ActiveState is perhaps the best reason to go with Python in the Windows environment. (Certainly it compares favorably with running perl -e from a prompt). The COM interface is very straightforward to use, and wxWindows makes it easy to put up a good-looking GUI.

        I still find that I use Perl almost exclusively in the Unix environment, simply because I had several years of Perl experience before I ever took up Python.
    • Python
      2003-11-19 10:45:07  anonymous2 [View]

      "and has cleaner object orientation than perl"

      But why would this matter in a scripting environment? No one is going to write a class for a 20-30 line utility script.

      - Joe
      • Python
        2003-11-20 06:28:23  mahansen [View]

        Code reuse would be the biggest reason to write a class for a utility script. Maybe you want to do something similar in another script, you can use that class in it.

        Also, you'd be surprised how many 20-30 line utility scripts grow into monster apps.
        • Python
          2003-11-20 13:44:28  Robbie Allen | O'Reilly AuthorO'Reilly Blogger [View]

          I've written a 40,000 line web app in Perl which was loosely OO. Not to say it is a great example of Perl OO in action, but it can be done.
          • Python
            2004-01-01 17:18:12  anonymous2 [View]

            Even a small set of perl 1-liners represent a powerful integration of near complete programs, so you can write a complete operating system in less than 40K lines of perl.

            So, what exactly were you trying to attempt/achieve in those 40,000 lines of perl code ? I am extremely curious to know :-)

          • Python
            2003-12-01 11:59:47  anonymous2 [View]

            40,000 lines! My GOD man you should be ashamed of yourself!
    • Python
      2003-11-19 08:32:48  wjgilmore [View]

      Agreed, Python does work quite well in the Windows environment. O'Reilly published a Python/Windows book, called "Python Programming on Win32" if I remember correctly. Another great book on Python is "Practical Python", by Magnus Hetland, published by Apress. (disclaimer: I was a tech editor).

      Jason

      http://www.wjgilmore.com/
      • Python
        2004-01-10 05:06:43  anonymous2 [View]

        KiXtart is an awesome scripting language for Windows Admin work.

        http://kixtart.org/

        http://www.scriptlogic.com

        http://www.kixhelp.com
        • Python
          2004-02-04 03:58:52  jennystuart [View]

          You can not comapare it with Perl !!!!



          __________________
          Translated by Traduccione