1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP vs. ASP

Discussion in 'C#' started by J.D., May 1, 2005.

  1. #1
    When people say ASP, it is automatically assumed that the programming language is VBScript. This is not quite true and I just wanted to say that those who use ASP can (and IMHO certainly should) pick a better language, such as JavaScript (ASP and ASP.NET) or C# (ASP.NET). There are a few reasons:

    * VBScript is just a very poor language. It was originally created for MS Office users and was never meant to be used as a stanalone, large-project language;

    * JavaScript is a C- and Java-like language. Anyone knowing these two can program in JS;

    * It is simpler to use JS for both, server and client side - one language to learn;

    If your hosting company can set up JS as a default language for your website, this is the best way to go. Here's where the setting is:

    Have them change it to JScript (JScript is MS' version of JS).

    Some hosting companies, however, will refuse to do this, even though they do support JS in general. In this case, you need to add the following statement at the beginning of all of your pages:

    Alternatively, you can even mix languages, working with the default VBS in the HTML and coding business logic in JS. For example:

    In this example, the default language is VBScript, but the code that actually provides the functionality behind the page is JScript.
    SEMrush
    J.D.
     
    J.D., May 1, 2005 IP
    SEMrush
  2. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Couldn't agree more J.D.

    I'm often asked to sort out problems in asp pages and invariably they are in VBScript. For half of the page developers this seems to be because they learned their 'skills' from developing 'add-ons' for Excel or Access using VBA. The others hang on to the belief that JavaScript is purely a client side language.

    Mick
     
    Arnica, May 1, 2005 IP
  3. lovethecoast

    lovethecoast Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My take on it:

    You first said "JavaScript" not "JScript" -- Just clearing up here that JavaScript cannot be used as a server-side choice in ASP, only JScript can. And since we're mentioning alternatives, why not mention PerlScript? It can also be used in ASP.

    VBScript is *much* better to use as the server-side choice than JScript for a few reasons.

    1: VBS is syntactically and grammatically the same as VB or VBA. VB was most certainly created for large, enterprise class, stand alone apps. JS was *not*

    2: VBS is not case sensitive. If you declare the variable "Count" in VB, VBA or VBS, you can refer to it in your code as "Count", "count" or "cOUNT" and it would still work. Try that in JS.

    3: VBS has *many* functions built into it that are not available in JS. Nearly every function you want to use in JS you must first create. Not really a big deal, but when you're talking about a massive project, as many enterprise level apps are, you're talking about slower execution times, more debugging, and more maintenance.

    4: Going on the previous point, VBS routines are consistantly smaller than JS. I love using JS when I can on the client side, but I'm always irked at how long some of the functions must be to get the job done.

    5: You mentioned JS is "a C- and Java-like language" -- this is completely false. Just because it has the word "Java" in its name, it is *nothing* like Java or C. It does not handle variables or objects *anything* like Java or C -- about the only similarity is the way commenting is done.

    Finally, most VBS programmers don't come from VBA -- they come from VB. VBA never took off the way MS wanted it too, but VB sure did. It is the most widely used programming language in the world, having as many programmers as all other languages combined.

    I would challenge you to show me *one* example of where JS is better than VBS.

    All of this really moot considering .Net is out now. With .Net you can program on the server side in true VB or C#, both of which are better than VBS or JS combined. Even if you're not using .Net, you can still program server side ISAPI filters in C++ and compbile them, then call from your code -- this is the best solution for enterprise level web services.
     
    lovethecoast, May 1, 2005 IP
    mopacfan likes this.
  4. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #4
    lovethecoast, I read some of your posts you made since yesterday and, frankly, each and every one of them made me wonder how is it possible to say nothing useful in so many words.

    JavaScript is a language that has been standardized by ECMA as ECMAScript:

    http://www.ecma-international.org/publications/standards/Ecma-262.htm

    Microsoft's JScript is compliant with this specification at least since 1997:

    http://www.microsoft.com/presspass/press/1997/Jun97/jecmapr.asp

    In the recent .NET release, Microsoft has offered a few optional extensions, such as strong variable typing and classes, similar to those in C++ and Java.

    Both, Firefox and Opera follow the same ECMA standard to implement their versions of JS.

    I can't believe you used this as an advantage point. Ever wondered why C, C++, Java and C# are all case-sensitive?

    Here're both reference guides:

    http://msdn.microsoft.com/library/d...56/html/js56jslrfJScriptLanguageReference.asp
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vbscripttoc.asp

    Their functionality is similar. VBS is less object-oriented and you'd have to use functions, not methods in many cases (e.g. you'd say Len(str), while in JS you'd say str.length). However, I'd love to hear about a few of these many functions.

    Why don't you write for all of us a function that does what the validation function in my original post does?

    J.D.
     
    J.D., May 1, 2005 IP
    alph likes this.
  5. lovethecoast

    lovethecoast Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    :: sigh ::

    What is it about this forum that turns every post into an argument? Arguing here is like winning in the special olympics.

    There's a reason so many *very smart* individuals (gasp! smarter than you even!) use VBS over JS. This is *not* a VHS verses Beta argument -- we're talking about many, many tousands of corporations who make their daily bread and butter in using VBS over JS. Yours (and mine) anonymous internet posting on an SEO forum aren't going to change the world.

    The VBS function would look very similiar to what you posted. That doesn't mean JS is better than VBS. It means in this one instance you have a routine that isn't overburdened with 50 lines of code to do what one line of VBS code can do. Not every VBS function has a JS equivalent as in your LEN example, but I cannot think of any JS function that cannot be recreated in VBS.

    Why I picked an SEO forum to argue programming... whoah is me...
     
    lovethecoast, May 1, 2005 IP
  6. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You wanted *one* challenge, here's your challenge. Either walk the walk or stop littering Design & Development forums with your buzzword posts.

    J.D.
     
    J.D., May 1, 2005 IP
  7. lovethecoast

    lovethecoast Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Good grief man -- can you read? I said show me one example of where JS is *better* than VBS. Your coming back after having ignored the valid points I made and trying to use big words to make you look like a big man failed.

    This is my last post on this subject, or any others dealing with development on this forum. That's not giving into anything you have to say -- that's just saying my time is more important than to argue points over something this stupid. If people want to believe what you spew, then fine -- let them.
     
    lovethecoast, May 1, 2005 IP
  8. davedx

    davedx Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #8
    1) Back that statement up please?
    2) Because a language is popular doesn't mean much. Many, many people learn to code in Visual Basic. Does that mean everyone should use it at Enterprise level, or that it's a superior language?

    Also anyone who believes case-insensitivity is a good thing in a programming language isn't exactly impressing me with their logic or claims of experience...

    And nor is someone who dishes out criticism but can't take it...
     
    davedx, May 2, 2005 IP
  9. spondishy

    spondishy Peon

    Messages:
    735
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    A by-product of the fact that vb is so popular is that their are masses of examples out their on the internet to help out. The other issue that needs to be considered is supportability.

    Personally I'm a C# guy. Couldn't go back to variants!!!
     
    spondishy, Jul 21, 2005 IP
  10. longroad

    longroad Well-Known Member

    Messages:
    1,645
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    155
    #10
    C# all the way, I wouldnt touch VB.
     
    longroad, Jul 28, 2005 IP
  11. relixx

    relixx Active Member

    Messages:
    948
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #11
    My view is that when it comes to ASP, neither really matters because both get the job done. Why bicker about it when ASP is slowly falling away in favour of PHP, .Net, etc?
     
    relixx, Jul 28, 2005 IP
  12. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #12
    ASP.NET follows the same logic as ASP - you can use any language, such as VB, JavaScript, C#, J#, etc, in your script. The point is that when people say ASP, they mean VB and when people say ASP.NET, they mean C#, which is not correct.

    Besides, ASP isn't going anywhere until MS makes .NET secure in hosted environments. For example, right now you can't use ODBC with .NET in the shared environment without compromising other people on the same box.

    J.D.
     
    J.D., Jul 28, 2005 IP
  13. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I can't believe that somebody would anonymously give me red for one of the posts in this thread:

    What a loser! Did this thread undermine what your teacher said in your last .NET in 21 days classes? The other guy was at least man enough to put their name under his/her opinion.

    J.D.
     
    J.D., Jul 28, 2005 IP
    Arnica likes this.
  14. relixx

    relixx Active Member

    Messages:
    948
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #14
    :confused: And yet I constantly hear all the .Net evangelists running around in my country...
     
    relixx, Aug 2, 2005 IP
  15. ServerUnion

    ServerUnion Peon

    Messages:
    3,615
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    0
    #15
    using VB in ASP.NET has been great for us. Although C# seems to have beeter resources available on the web.

    In the end it doesn't relly matter as the code is compiled for the JIT. You could use COBOL if you like and still produce results. I think the confusing most people have is that they are referring to javaScript and VBscript in ASP classic, NOT the .NET development platform.


    As far as the shared environment, .NET has always been marketed for the corporate environment. If someone has the cash to pay for the development tools, I would think they have the budget for a server also.
     
    ServerUnion, Aug 2, 2005 IP
  16. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Exactly - ASP is not VB, just as ASP.NET is not C#.

    This used to be the case, but now MS markets .NET as a robust platform to host thousands websites on a single box. MS added many great secure features and components, but some components actualy got less secure. For example, in most ASP.NET hosting configurations, it is possible to invoke arbitrary system functions - something one couldn't do in classic ASP. Even with dedicated servers, not everything is as smooth as some people think. For example, it is very easy to eavesdrop on a Remote Desktop session, which is commonly used in dedicated hosting environments, without the victim ever discovering it.

    J.D.
     
    J.D., Aug 2, 2005 IP
  17. ServerUnion

    ServerUnion Peon

    Messages:
    3,615
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I am really pleased with the structure of .NET environment. Although it seems to take a little longer to develop, the structure is so much better. Really like developing everything into classes in a multi tiered aproach. This seems to help the readability of the code as well as debuging issues in the future.

    Heard somewhere that there were like 500K classes available, plus all the addons you can download or buy.
     
    ServerUnion, Aug 2, 2005 IP