Brianna_Virginia
New Member
Everything I've read leads me to believe that we can still use VBScript in ASP+. Except...<BR><BR>"So, no longer will you be able to use VBScript... " from<BR><BR>http://www.4guysfromrolla.com/webtech/071700-1.shtml<BR><BR>So now I am confused. <BR><BR>ASP+ will come with "out of the box" support for VB, C#, and JScript, or so I have read. But will VBScript still be possible?<BR><BR>This would seem to be VERY IMPORTANT, because one of the reasons of the HUGE success of ASP thus far has been that VBScript is so easy to use (and so is Notepad!). Lots of HTML-only people, or Frontpage people even, can learn VBScript without too much trouble, at least to create simple ASP pages. But if MS will now require people to learn an IDE, a serious programming language, etc... then the audience has been shrunk considerably.<BR><BR>Say it ain't so!<BR><BR>--Tom S.The short answer is yes and no. The VBScript script engine is no longer used by ASP+ -- in its place we now use the VB compiler engine. <BR><BR>However, because VBScript has always been a subset of VB, this shouldn't have an impact on new developers learning to program the web.<BR><BR>For example, the below ASP VBScript code:<BR><BR><html><BR> <body><BR> <% if (Request("Name") <> "") Then %><BR> <h1> Hi <%=Request("Name")%>, welcome to ASP<BR> <% end if %><BR> </body><BR></html><BR><BR>works exactly the same in ASP+:<BR><BR><html><BR><BR> <body><BR> <% if (Request("Name") <> "") Then %><BR> <h1> Hi <%=Request("Name")%>, welcome to ASP+<BR> <% end if %><BR> </body><BR></html><BR><BR>The *only* difference with this second example is that now instead of being interpretted by a script engine at runtime (like VBScript with ASP), ASP+ is first dynamically compiling the page into native code and then executing it. The result can be dramatic performance improvements.<BR><BR>Important Note: ASP+ compilation *does not* require a compile step. It also does not require you to install or buy Visual Basic. Notepad authoring continues to work just fine. Just "hit save" within your text editor to publish a new version.<BR><BR>Now although most existing VBScript code should continue to work just fine in ASP (there are unfourtunately a few language incompatibilities moving forward -- although we'll have automated tools to help fix these) -- one of the additional benefits, besides performance, of using VB under the covers is that you can *optionally* take advantage of the full VB language syntax -- which is something that ASP customers have requested for quite some time.<BR><BR>For example, the below code is familiar to ASP developers today and works fine in ASP+:<BR><BR><%<BR> Dim adoConn<BR> adoConn = Server.CreateObject("ADODB.Connection")<BR>%><BR><BR>However, you can now *optionally* rewrite the above code as:<BR><BR><%<BR> Dim adoConn as New ADODB.Connection<BR>%><BR><BR>Benefits of doing this include: <BR><BR>1) Much better compilation error messages (because the object type is known by the compiler -- it will automatically complain at compile time, as opposed to runtime, when you attempt to access methods/properties that don't exist on the object).<BR><BR>2) Much better performance (because the object type is known to the compiler we can generate native vtable calls)<BR><BR>Although new developers might choose never to take advantage of this -- this has surprisingly been one of the most commonly requested features we've received since ASP 1.0. There are also tons of additional new "power" features within VB that advanced developers will also be able to leverage (better class support, try/catch exception handling, event support, inheritance, etc).<BR><BR>We absolutely agree with you that a huge part of the ASP market is attracted to the product because of its ease of use. Our goal with ASP+ has been to continue this ease of use and hopefully make it much easier in many respects (more declarative, less code, etc).<BR><BR>At the same time, we are hoping -- through richer languge support, custom security support, XML Web Service support, output caching, etc -- to make ASP+ also really appeal to power users -- so that customers never find an application that they can't easily build with the platform.<BR><BR>Thanks,<BR><BR>Scott<BR><BR>VBScript is dead - by the time they brought out another version to support the NGWS it would be so much like VB that you'd be hard pushed to spot the difference. <BR><BR>If you can do VBScript, you can do VB, they're really not that different.<BR><BR>I'm not sure that I'd call VB a "serious programming language" anyway <BR><BR>Dunc<BR>I half agree with what you say. I fully agree that anyone doing ASP right now would be able to convert to VB in ASP+. But I wouldn't go as far as saying there isn't much difference between the two. You could be a wiz at vbScript, but Visual Basic is much more complex for non-programmers.<BR><BR>By the way, not trying to start a fight, but I disagree with your statement about Visual Basic not being a real programming language. I do know exactly what you are saying, but I think (especially with what is in store for VB7) that Visual Basic has developed into a full blown programming language. I do a lot of Visual C++, and my co-workers (also VC++ programmers) usually have nothing better to do than tell everyone how VB is "portable TCL", which I get quite a kick out of. <BR><BR>Nathan Pond<BR><BR>P.S. - I'm glad to see people encouraging others not to be intimidated by compiling languages in ASP+, so reading your posts have been refreshing. Correct me if I'm wrong, but VBScript is NOT a subset of VB. It *almost* is, but, from my understanding, Eval and Execute, two functions available in VBScript, ARE NOT available in VB.<BR><BR>Unless, of course, VB7 will have these new functions added... (although, from my understanding, these won't be added to VB7)<BR><BR>Thanks!Hello All!<BR><BR>I completly agree with you! Unless you are developing low, low level solutions, you can do anything in Visual Basic you can do in C++, but in a quarter of the time<BR><BR>But I must say, I have spent the last couple days working with C# and I am HOOKED, it's a Phenomenal language! I am going to Maui tomorrow for two weeks, and I am sorry to say, I will probably spending the whole time by the pool with my laptop learning C# and the Framework. I am so excited about .NET<BR><BR>Take Care!<BR><BR>_________________________________<BR>Don Wolthuis, MCSD<BR>CodeJunkies.Net / ASPNextGen.com<BR>[email protected]<BR><BR>Two new sites are coming, dedicated exclusively to ASP+. Stay tuned for<BR>www.ASPNextGen.com and www.theFutureOfASP.com, both brought to you<BR>exclusively by CodeJunkies.Net.<BR><BR>>>By the way, not trying to start a fight, but I disagree with your statement about Visual Basic not being a real programming language. <BR><BR>That's quite alright - I was just being cheeky. I actually do just about all my work in VBScript (but not through choice). My main gripe with VB is that I just don't like the syntax.<BR><BR>>>But I wouldn't go as far as saying there isn't much difference between the two. <BR><BR>Currently I'd agree. My point was that by the time you add in the NGWS features (early binding etc) the *next* version would be pretty similar.<BR><BR>I'm just itching to get a decent look at C# - looks quite interesting.<BR><BR>DuncSorry, VBScript is DEAD. You will be using Visual Basic 7, <BR>JScript 7, or C# (or any of a number of other languages) in <BR>Visual Studio .NEt for authoring ASP+ applications.<BR><BR>VB 7.0 is far more robust, with strong typing, inheritance and <BR>other features too numerous to mention. The learning curve will<BR>be well worth it!Just to clarify, if you know VB script and want to carry on using VB Script syntax you won't notice much difference.<BR><BR>maybe someone would like to post which VBScript language items won't work under VB7. I can't think that there are many? If a VBscript ASP Page does not use the Eval and the <BR>Execute functions, can it be migrated to ASP+ with no<BR>source code changes? <BR><BR>Regards,<BR><BR>Giovanni.No, the code would have to be changed.<BR><BR>MS Access 2000's vba has a great expression service that you could use. Just reference 'Microsoft Access 9.0 Object Library' in your VB project and you can use its Eval() function.<BR><BR>I doubt you'd be able to use execute though.Is anyone know before about VBScript will end up like this? Even though people can switch language to other language easily or you almost don