[Discuss] web application architecture
Tom Metro
tmetro-blu at vl.com
Wed Feb 29 22:51:53 EST 2012
Edward Ned Harvey wrote:
>>> ...you're considering twiki, which is horrible and relatively
>>> unmaintained, largely because it's written in perl...
>
> I've gotten a lot of responses to my perl comment above. So allow me
> to clarify:
>
> Languages such as php and jsp, etc, have been created
> specifically for the purpose of running web applications.
True.
> Unfortunately twiki predates the widespread adoption of such languages.
True.
> As a result, people intending to do web development tend not to get
> into perl.
Partially true, but the reasons are far more complicated than that.
> As a result, it's there is a disadvantage to maintain a strong
> community of developers on twiki.
Generally speaking it is probably true that any new open source web
application would have a more uphill battle getting a critical mass of
developers, but that logic doesn't necessarily apply to specific
applications that have long term followers and large communities.
> In the statement above I am not making any generalization about perl
> being good or bad *in general.* I am only saying it's not very good
> for a web application.
This key bit of your thesis I saved for last because it suggests a
confusion between popularity and quality.
So called web languages, like PHP, ColdFusion, ASP, and JSP became
popular because they were easy to get started with and make work, but
they actually promoted a web application architecture that is among the
worst. (Perl is not magically immune from this. It has Mason and other
ASP-like frameworks, plus plenty of templating packages that are
powerful enough to be abused into equivalently bad architecture.)
There are multiple reasons why Perl fell out of favor as a web
development language. See the footnote.
> Side note: I have an opinion of relative strengths of perl versus python,
> both of which are intended to be used as scripting languages, not so much
> web application languages, so they are actually apples to apples. ;-)
I'm of the opinion that "scripting" is a manner in which you apply a
tool, and not what defines it. Once a language has enough fundamental
capabilities (abstractions, modularity, etc.), then whether you use it
for applications or scripting becomes a matter of how you apply it.
If you look at some of the most popular web development frameworks
today, Ruby on Rails (Ruby) and Django (Python), you'll find that
neither have much in common with the ASP and early PHP-era code, and
that you generally end up with a superior architecture that is easier to
maintain.
Perl has numerous web application frameworks, some of which emulate the
above, many that followed a similar Model-View-Controller pattern that
predated the above, and probably some that are superior to the above. So
there is no technical capability preventing Perl from being used for
equivalent quality web applications.
If you're looking for a development language that is optimal for an HTML
designer that wants to do some casual code hacking, then yeah, these
options are comparatively heavy weight. But in the hands of a skilled
programmer, any of these dynamic languages make for excellent "web
application languages," that should result in a superior end-product.
Starting with any decent, general purpose language, all you really need
to make it optimal for web applications is to be dynamic, have it
efficiently (both performance and coding effort) handle strings, and an
availability of frameworks and other libraries commonly needed for web
applications.
-Tom
Footnote: reasons why Perl fell out of favor as a web development language
Briefly: PHP was easier to deploy by hosting providers in a shared
hosting environment; PHP was easier to get started with; newer languages
came along that offered incremental improvements (largely since matched
in Perl 5 or exceeded in Perl 6); and the IT industry (particularly the
press) has a tendency to chase after novelty. (That's not to say the
flavor of the year doesn't offer some valid improvements, or recognize
deficiencies that have been overlooked (like having a bundled web server
in RoR to speed development). These deficiencies usually get corrected
(i.e. bundled web servers are now common to many frameworks), but often
after people have moved on to a new tool.)
Perl certainly has its deficiencies, and Perl 5 shows its age in places,
but it also tends to get a lot of criticism piled on it from people who
don't seem to distinguish the difference between bad languages and bad
programmers. Or worse, merely echo what they've heard elsewhere.
--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
More information about the Discuss
mailing list