Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

VBScript vs. Perl Web Development Time Comparisons? 27

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?"
This discussion has been archived. No new comments can be posted.

VBScript vs. Perl Web Development Time Comparisons?

Comments Filter:
  • by Anonymous Coward on Tuesday May 08, 2001 @04:39PM (#236528)
    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.
  • 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.
  • 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.
  • 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.
  • 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.

  • 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?

  • Comment removed based on user account deletion
  • 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";
  • 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 [apache.org] for Apache or PerlEx [activestate.com] 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 [slashdot.org], among many other large sites, can handle all its traffic quickly because of mod_perl.

    -bp

  • by Black Perl ( 12686 ) on Tuesday May 08, 2001 @06:16PM (#236537)
    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 [cpan.org], 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. :-)

  • 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
  • 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 [apache.org] 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!

  • by Camel Pilot ( 78781 ) on Tuesday May 08, 2001 @07:29PM (#236540) Homepage Journal
    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.
  • ...if your ASP size starts to get unruly, it doesn't take all that long to port it over to a DLL.
  • 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 [google.com]

    http://ncstrl.ubka.uni-karlsruhe.de:8080/Dienst/UI /2.0/Describe/ncstrl.ubka_cs%2Firatr-2000-5 [uni-karlsruhe.de] 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 [ibm.com]

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

    -matt
  • I strongly suggest you look at Mason [masonhq.com]. 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.
  • I code in Apache::ASP [apache-asp.org] 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.

    ---

  • 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.

  • Remember that Javascript (well, JScript actually) can be used with ASP. And I find it much easier to develop in than VBScript.
  • In all seriousness - if development time is really your number one priority, shouldn't you be using something like ColdFusion? [allaire.com]
  • 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


  • 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.
  • 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
  • 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.
  • 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 ~~
  • 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.

  • 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.

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...