Slashdot Mirror


VBScript vs. Perl Web Development Time Comparisons?

An Anonymous Coward with thoughts of rapid CGI deployment, asks: "My manager has asked me for something that would show the differences in development time between ASP/VBScript and CGI/Perl. He is trying to gauge time schedules for web projects, but I don't have a clue as to where such information would be documented. I am familiar with both architectures and know the differences, but I think he's hoping for white papers of comparisons. Can anyone tell me where to look?"

27 comments

  1. your looking in the wrong place.. by Anonymous Coward · · Score: 3

    my place of work did this a while ago.. we tested the deployment time of a medium size project.

    We tested ASP/VB, Perl, PHP and Java.

    we found the fastest to implement, and the one that successfuly did what we want, had the best stability and fastest processing was PHP4, with the zend optimizer (For extra speed).

    The buety of php is its so flexible. We were able to have numerous programmers, each with hugely different techniques, using it. It can be either fully OO, or function based, or a mixture of the two. This allowed for massive cuts in implementation time.

    1. Re:your looking in the wrong place.. by KyleCordes · · Score: 1

      I would not call PHP "beatiful" :-) but it is very useful, I have built quite a few dynamic sites with it myself.

      A big piece of the power of PHP is that so much is "in the box"; it's different than, for example, Perl (where you need to get a bunch of modules from CPAN), ASP (where you need a bunch of third party products), Java (lots of third party jars), etc.

  2. PHP is also a good option by GreenPickles · · Score: 1

    If you're doing web stuff, the obivous deal is PHP. If you know Perl PHP is really easy to pick up. One big problem with Perl is code-readability. PHP suffers from that problem a little less.

  3. Re:I think this question could turn to flamebait.. by KyleCordes · · Score: 1

    Once the JIT or HotSpot gets going, Java can be faster than VB, Python, Ruby, etc. for server side web development.

    Java gets a reputation for being slow because of (1) the startup overhead and (2) Java GUIs are still a good deal less responsive than native GUIs. But for actual CPU-intensive computation, Java is actually quite fast, with a modern JVM.

  4. Depends on the people and project by KyleCordes · · Score: 2

    At the risk of being so general as to be useless:

    1) It matters a lot what technologies the developers are familiar with... if they've done a lot of VBScript, they will probably get the job done faster that way and vice versa.

    2) The project size is also quite relevant. I'd be inclined to choose a VBScript / ASP-intensive for smaller projects, and choose a "heavier" approach (such as Servlets, XML-XSL, etc.) for larger projects. Depending on how you use it, Perl could go either way... certainly one can do write-only Perl, but there are also large, complex sites built this way. It generally takes less Perl than it would VBScript or Java to get the job done.

    1. Re:Depends on the people and project by Black+Perl · · Score: 3
      I agree that it depends on people and project.

      I've been in two situations where we had two separate developers, a VB and a Perl developer, work on the exact same project in the interest of getting it done as quickly as possible. (Disclosure: I was the Perl developer :-)

      Perl won, by a longshot. Both in time and in size. But I can't take complete credit. Thanks to CPAN, everything you've ever wanted to do has been made into a module. All you have to do is load the module, initiate some objects, call a few methods, and you're done! Not that I tell the VB developers that. :-)

      --
      bp
  5. ASP's inherent problem: kernel mode by yabHuj · · Score: 2
    AFAIK Microsoft ASPs run - as (part of) the IIS - in kernel mode. If you have a bug causing an online loop the only way to stop that is to stop and restart the whole IIS (or sometimes the whole WinNT system).

    This will slow the development down quite a bit. Plus the ASP/IIS/COM+/ODBCsomething can surprisingly easy develop a nondeterministic behaviour which is hard to understand and even worse to reproduce (read: restore after severe server crash).

    In contrast to this standalone CGI (programs, not necessarily scripts) does not heavily interweave with other components but uses (or: should use) clean interfaces that are easy to understand and maintain. In addition to this standaloneable CGIs can be tested without any web service. First do an ASCII version of what you want to achieve, test it locally (like QUERYTYPE=POST; echo "parameter=locally&defined=from&command=line" | ./yourcgibin) and after that you can wrap it into nice HTML.

    Did I mention that I like independence?

    1. Re:ASP's inherent problem: kernel mode by lynnroth · · Score: 2

      ASP Applications can run in 3 different protection modes. Low, Medium and High

      Low - Runs in the IIS process. Good for speed, bad for crashes
      Medium - This mode pools all the medium apps in the same process.
      High - Runs in a seperate process. Slower, but you can crash it all day and it won't touch your IIS process.

  6. Re:Depends how resourceful the developers are by clifyt · · Score: 2

    What a fucking troll. For the first time I read many reasons why I should go Perl instead of ASP and a dumb ass like you posts this shit.

    VBS/ASP is pretty damn fast. I tried switching over to PHP a year back and I was amazed how fricken slowly things were...and its considered a staple anymore -- getting to the point where it is more used than Perl. I don't care much for most perl. I like code that I can read and not have to think about. This isn't saying that perl is bad or I'm just a suckyass programmer that can't figure this stuff out, its just that when you are working on projects that more than 1 person is working on and a lot of the times you aren't available to explain why something does what it does, I want everyone else to know immediately what the code does. When you are dealing with a team of non-programmers (psychometricists and language experts) this is immediately a good thing. I can't explain linenoise to someone :)

    So what do I do? I program ASP. Once code is static and I no longer need to mess with it on a regular basis, I have one of my programmers do it up in C (or hell even let VB compile it which I wouldn't recommend if you are looking at longevity) and throw it in one of our DLLs.

    On my IIS boxes, I run the Active State Perl as well. I have serveral apps that run in Perl and do a good job. I run UBB on my IIS box...granted it runs faster on my linux box, but I can't complain. When i was running UBB5, I hacked it to use ASP when possible and used a SQL database (instead of text files) and it was a bit faster than it was in just perl, but that could be because its running on a M$ product.

    As for stupid and trivial modules - I have a free FTP DLL that I use on my end. If the above user is paying $750 he is an idiot. There are a lot of free components to ASP, and many inexpensive ones. The only ones I paid for are the Persits modules (ASP Upload - because it was far stabler than the free one and ASPUser as I could get to the system and do user management from a console). Of the free ones, I have FTP modules, I have standard Socket Modules (which I use to grab bits from a non-sql compliant database on the Mac), I have kick ass mail modules that I used to admin a mailing list as well as archive everything (err...I now use Mhonarc for that end of things).

    This has nothing to do with being stupid. It has nothing to do with 1/5 of the time in Perl (because I'm sure I can code just as fast as a perl junkie on the M$ side).

    In Perls defense, its a great language for a single user or a bunch of geeks that don't like to think in an english like language. Its very portable. I can run it on just about any platform and a lot of stuff is compiled for it. Its also reasonable fast (though any compiled lang will kick either ASP/Perls ass). But, if you are targetting anything on the M$ Platform (and there are many reasons to do this), you should seriously look at ASP/VBS as a serious possibility.

    blah

    clif

  7. Re:In a word . . . Perl by SyniK · · Score: 1

    In the future could you please use real perl code in your posts? It would be a tremendous help for someone trying to learn perl only from code posted on Slashdot (such as myself). Thank you. -SyniK PS.. My first perl program! :) #!/bin/perl $str = "This is a test of PHP Madness!"; print "str = $str\n"; $str =~ s/PHP/Perl/g; print "str = $str\n";

    --
    -Tom
  8. Re:Defending vb by Black+Perl · · Score: 2
    We dropped Perl for VB half way through a new web internet project with on a microsoft server. Performance reasons were the real issue with too many spawned processes using perl.

    You're not comparing apples with apples here. You're comparing CGI with persistent interpreter. You can write CGI apps with VB and they'd be just as slow as Perl. On the other hand, you can use a persistent perl interpreter (mod_perl for Apache or PerlEx for IIS) and achieve speeds at least as fast as a VB dll. (OK, perl enthusiasts, I know mod_perl has benchmarked faster, but not so much as to be statistically significant)

    This site, among many other large sites, can handle all its traffic quickly because of mod_perl.

    -bp

    --
    bp
  9. Don't forget debugging. by Ramses0 · · Score: 1

    Having worked with ASP/VB as well as PHP, and Java Application programming, PHP falls down as far as debugging goes.

    I've been told that VB is fully supported by MS debugging tools (Visual Studio?), but when using PHP, you'll get very used to die(serialize($var)); ...or "echo ""; print_r( $var ); echo "";".

    Zend.com (the "commercial" version of PHP) supposedly has an interactive debugging tie-in, but I have not had a chance to work with it. It's also a "for-pay" item, and it is worth noting.

    --Robert

  10. iees no poseeiiblay! by ndfa · · Score: 1

    Whatever WhitePaper you do find should be taken with a grain of salt. I will not be suprised if some very very "smart" marketing department put out a nice document claiming that their web development technology results in faster development, is more stable, performs better, better scalability, is fault tolerant, pleases the God of webpage etc....

    ON a more serious note, I dont see why you dont have jsp/servlets in the list. Lots of cool technology there to help with rapid development. Seems strange to be that you are considering ASP's and not JSP's. Since the arguments against CGI might be correct for certain type of webpages. Check out the jakarta project on JSP's... tomcat is preeetyy awesome and lots of cool stuff available that can make things quiet easy to write. ALSO, IBM AlphaWorks has lots of Beans/etc. to make writing these pages pretty neat..... NOW if there was kick as TableBean we would be talking!

    --
    Non-Deterministic Finite Automata
  11. In a word . . . Perl by Camel+Pilot · · Score: 3

    Perl has _much_ faster development cycle then VBscript/ASP and is a better overall development environment for web based applications for the following reasons.

    1. CPAN - Hundreds of reusable software components such as CGI(cgi tools), Storeable(data marshalling), LWP(web client), Template(seperate logic from presentation), DBI(DB abstraction), etc.

    2. Perl has higher level functionality builtin and is efficient at handling text. Ask your VBscript programmer to show you the equivalent code for these common operations:

    String interpolation
    $str = "The time is $time $timezone $date"

    Pattern Matching
    # Find and replace in strings
    $illiad_book = s/Hector/Gates/g

    # Remove duplicate words from input
    $input_text = s/\b(\w+) \1\b/$1/gi ;

    Array manipulations
    # Sort an array in reverse numerically
    @sort_reverse_lst = sort { $b $a } @lst ;

    # Filter directory listing for text files
    @dir_txt_lst = grep /\.txt/ @dir_lst ;

    # Break up text into sentences
    @sentences = split /\./ , $long_speach;

    # reverse operation
    $long_speach = join "." , @sentences ;

    Symbolic references
    $var = "temperature";
    $$var = 72.1 ;

    print "$var = $temperature"; # Prints temperature = 72.1

    3. Perl is portable, even more so then Java. Apache or IIS; Win32 or palm.

    4. Start off with cgi and if you need speed later port to mod_perl(Unix) or perlex(activestate win32).

    5. Can be used to extend Apache via mod_perl.

    There is more but that should be enough.

    1. Re:In a word . . . Perl by el_$corpio · · Score: 1
      Hmm, ok, I'll bite. What you are saying is just FUD. The examples you give serve no real purpose in this discussion and just demonstrate your bias towards Perl.

      1) CPAN is great, no doubt about it. But VB/VBScript can use DLLs and ActiveX controls. In a corporate environment the cost may not be an issue, esp. when when considering support issues.

      2)
      String interpolation
      Similar effects can be achieved with string concatenation

      Pattern matching
      illiad_book = replace (illiad_book, "Hector", "Gates")

      Remove duplicate words from input
      No easy way, would write a function for this task. I would dispute that this is a common function, however.

      Sort array
      No easy way - definitely needed for VB/VBScript

      Filter directory listing for text files
      txtfile = Dir ("*.txt")
      Loop
      txtfile = Dir
      until txtfile = ""

      Break up sentences
      sentences = Split(long_speech, ".")

      Reverse operation
      long_speech = Join(sentences, ".")

      Symbolic references
      Can't do it. Again, why is this a common function? Isn't it just overly complex programming?

      3) Agreed, but consideration must be given to the given environment. In a big organsation which has made a commitment to MS products, Perls portability is moot.

      4) Start of with ASP and if you need speed later use VB, MTS, C++, C#, Java, JSP ...

      5) No changes to IIS needed.

      The advantages of ASP? It simple, readable, understandable. With a bit of care and understanding, legible, fast and scalable code can be written. Abstraction of functions to DLLs in VB/C++ is simple and efficient, and can be scaled through MTS.

      I'm not a Perl developer, so I can't give examples of where VB provides more functionality than Perl - oh yes I can.

      ' Instantiate corporate wide security module
      Set objSecModule = CreateObject("Company.SecPolicyModule")
      If objSecModule.CheckCredentials (MyUserCredentials) = True Then
      ...
      Else
      ...
      End If

      OK, I know thats cheating a little (before you shout, I am aware that ActivePerl can use VB DLLs) but if you have ever tried to get changes past the security team in a large corporation you will understand why the above is not possible in any flavour of Perl.

  12. And furthermore... by dave-fu · · Score: 1

    ...if your ASP size starts to get unruly, it doesn't take all that long to port it over to a DLL.

    --
    Easy does it!
    This comment has been submitted already, 276865 hours , 59 minutes ago. No need to try again.
  13. links to comparisons by wickline · · Score: 1

    unfortunately, there don't seem to be many comparing perl with visual basic. However, there are many comparing perl to other things. Maybe you can figure out what you think based on how simmilar you think visual basic is to java, tcl, or one of the others featured...

    http://www.google.com/search?q=cache:wwwipd.ira.uk a.de/~prechelt/Biblio/jccpprtTR.pdf+comparison+per l+java+c&hl=en

    http://ncstrl.ubka.uni-karlsruhe.de:8080/Dienst/UI /2.0/Describe/ncstrl.ubka_cs%2Firatr-2000-5 note: slashdot preview function revealed that the port 8080 in my post is being stripped out of the HREF by slash. So, the URL is as you see in text. The link will take you to that URL without the :8080. Just add the :8080 and you're back in business.

    http://www-106.ibm.com/developerworks/web/library/ wa-sssl.html

    http://www.pixeldate.com/dev/comparison/index.shtm l (see the refs section at end of article)

    -matt

  14. Mason = HTML + Perl by dannyspanner · · Score: 2

    I strongly suggest you look at Mason. It is a Perl equivalent of ASP or PHP. It also has several very useful tricks such as templating and caching. While it traditionally works with mod_perl under Apache, some people have got it to fly under CGI.

  15. Apache::ASP by fwc · · Score: 2
    I code in Apache::ASP which is basically a port of ASP to Perl. You write the code much like ASP- Basically you use a tool like DreamWeaver to generate the html and you then intermingle Perl in it. DreamWeaver recognizes each chunk as ASP code and handles it accordingly.

    I find it very quick to program in. But again I've literally written megabytes of Perl scripts over the last 2-3 years, and I don't particulary want to learn PHP. If I didn't know perl, I might be inclined to look at PHP.

    ---

    1. Re:Apache::ASP by fwc · · Score: 2
      Have you really looked at Apache::ASP?

      This is real perl. Not VBScript. I have it running on my FreeBSD box. I'm using standard Perl Modules, for which there is one for about anything under the sun.

      As for code size, I can't really argue one way or another. Speaking as a perl programmer, I'm not sure how you can get much smaller code-wise than a lot of perl scripts. From what I could see PHP was just perl with a slightly different (weird) syntax.

      I fully agree with you, however, "real" VBScript-based ASP sucks. And is difficult to write, and so on and so forth.

      I'm just used to using perl to do everything under the sun, and if I can do my web pages in perl in a "php-like" fashion it's a good thing.

    2. Re:Apache::ASP by raju1kabir · · Score: 2
      I find it very quick to program in. But again I've literally written megabytes of Perl scripts over the last 2-3 years, and I don't particulary want to learn PHP. If I didn't know perl, I might be inclined to look at PHP.

      You might well find it worth your effort. The equivalent PHP code to duplicate the function of a typical ASP snippet is about half as long and twice as readable. Plus it runs faster, is completely cross-platform, you don't have to pay weird fly-by-night companies to buy buggy COM objects for every little basic core function, and the documentation is actually useful.

      --
      "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
  16. Javascript too... by guinsu · · Score: 2

    Remember that Javascript (well, JScript actually) can be used with ASP. And I find it much easier to develop in than VBScript.

  17. ColdFusion? by jchristopher · · Score: 1

    In all seriousness - if development time is really your number one priority, shouldn't you be using something like ColdFusion?

  18. It's what matters to your developers. by mgkimsal2 · · Score: 2

    The whole thing is a toss up, in the end. What works for some doesn't work for others. What types of projects are you working on? If it's all reusable code you develop internally, a staff competent in one platform is more important than the outside factors.

    I've seen people develop rudimentary things quickly in both languages, and I've seen complex apps take a long time in both. I've not seen people develop something significantly FASTER in one language vs. the other. If something's going to take 4 days to do, after analysis of the problem, it'll probably take roughly 4 days in either language - there's testing, debugging, etc. no matter what choice you make.

    Perl has the obvious advantage of portability. At the end of the day, that may end up being the most important should you need to migrate platforms for some reason.

    HTH


  19. I think this question could turn to flamebait.... by flounder_p · · Score: 1

    It has not yet but it could very easily.

    But, my answer would be what do you know the best. Perl or ASP/VB. Now I personally do not use ASP/VB so I don't know but I just don't like the idea of a language that is not cross platform anyways. I think the development time of Perl would probably be the fastest. Along with Python or Ruby. Java would be slower along with VB. But I would tell him that you should stick to a cross platform language. I mean who knows when you could change to a Unix server.

    --
    -- Tyler >+++++++[-]++++.---------.+.++++.++.
  20. Re:I think this question could turn to flamebait.. by flounder_p · · Score: 1

    With java I mean the actual development time of the app not the speed that it runs on the server. Alot of times that is faster than perl or equal. I just meant the time it takes to develop a app in java is usually slower than in perl

    --
    -- Tyler >+++++++[-]++++.---------.+.++++.++.
  21. All depends on the windows by KarmaBlackballed · · Score: 1

    If you are not using Windows as a web server OS then the choice is clear: do not use VBScript because the third party support is not worth the trouble. And VBScript is only good when you use COM.

    If you are using Windows servers, then you can code with anything you want. However,

    I don't know if developing with Java/Servlets is faster than Perl, but I would rather go the Java route. Really for no good reason. Just like it better.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~ the real world is much simpler ~~

    --

    --- -- - -
    Give me LIBERTY, or give me a check.