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?"
your looking in the wrong place.. (Score:3)
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.
PHP is also a good option (Score:1)
Re:your looking in the wrong place.. (Score:1)
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.
Re:I think this question could turn to flamebait.. (Score:1)
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.
Depends on the people and project (Score:2)
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.
ASP's inherent problem: kernel mode (Score:2)
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?
Re: (Score:2)
Re:In a word . . . Perl (Score:1)
Re:Defending vb (Score:2)
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
Re:Depends on the people and project (Score:3)
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. :-)
Don't forget debugging. (Score:1)
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));
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
iees no poseeiiblay! (Score:1)
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!
In a word . . . Perl (Score:3)
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
# Break up text into sentences
@sentences = split
# 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.
And furthermore... (Score:1)
links to comparisons (Score:1)
http://www.google.com/search?q=cache:wwwipd.ira.u
http://ncstrl.ubka.uni-karlsruhe.de:8080/Dienst/U
http://www-106.ibm.com/developerworks/web/library
http://www.pixeldate.com/dev/comparison/index.sht
-matt
Mason = HTML + Perl (Score:2)
Apache::ASP (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.
---
Re:Apache::ASP (Score:2)
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.
Javascript too... (Score:2)
ColdFusion? (Score:1)
It's what matters to your developers. (Score:2)
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
I think this question could turn to flamebait.... (Score:1)
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.
Re:I think this question could turn to flamebait.. (Score:1)
Re:ASP's inherent problem: kernel mode (Score:2)
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.
All depends on the windows (Score:1)
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 ~~
Re:Apache::ASP (Score:2)
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.
Re:In a word . . . Perl (Score:1)
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.