Domain: masonhq.com
Stories and comments across the archive that link to masonhq.com.
Comments · 103
-
Re:High performance in scripting languages?
Sites like Amazon have already run into this and have moved away from scripting languages and back to system languages
You know Amazon's running on Perl Mason, right? http://www.masonhq.com/?AmazonDotCom
;-P -
Re:Reinventing the wheel is sometimes good
-
Re:evolve or die
If anything Perl is just being relegated to what it's _really_ good at, and that's UNIX automation tasks and quick throw-away scripts, and _sometimes_ smallish applications.
Yes, like this smallish application
-
Re:heyho, python - the new perl.
What the hell do you think HTML, XML, news stories, book descriptions, and reviews are? Are they not text?
Yahoo Shopping was written in Lisp. It was later rewritten, in sections at least, by a mixture of C++ and Perl. They wrote a Lisp interpreter in C++ to facilitate this.
Yahoo would have never happened without Perl.
Slashdot already ran a story about the BBC making a Rails-like framework for Perl because they liked Rails but prefer Perl as a language. The article at that second link says they're pretty dedicated to Perl for their whole Web infrastructure.
Amazon (for Amazon.com's own site) uses Mason (a Perl website templating system) as their official web development template system, and they're hiring for people with that skill set. They do use a lot of Java, too, apparently, but Perl is an important part of the site.
IMDb uses Linux, Apache, Perl and mod_perl to run pretty much the whole site, and is part of Amazon.
Google is using quite a bit of server-side JavaScript -- on the JVM as a replacement for Java in many cases.
Google uses C++, Python, and Java for most public-facing sites, and much of the management of the systems is done with Python.
This Google job (for a software engineer) lists C++ as a must and Python as a plus. This other job (for a software engineer) requires both one or more of C, C+, or Java and one or more of shell, Perl, PHP, or Python.
The nation of Scotland used Perl to migrate millions of land records between systems, which certainly is data munging, but a pretty important bit of it.
It was way back in 1999, but Agilent used Perl to build their big customer-facing e-commerce site.
Booking.com (part of Priceline) uses primarily Perl to run their site.
This PowerPoint presentation says Morgan Stanley in 2004 was using Perl written by over 500 developers on over 9000 (no, that's not a
/b/ ism) systems to keep their network running smoothly, for a web front end development language, to develop middleware, and to develop backend applications.ValueClick and TicketMaster make much use of Perl, too. That's along with the content management system -- Bricolage -- used by the Dean for President campaign, ETOnline, and the World Health Organization being written in Perl. You may have also heard of MovableType, which is a serious CMS from Six Apart. Or maybe you've heard of a site that runs it, called The Huffington Post, who right now is looking for someone to work on it?
-
HTML::Mason
The Mason HQ wiki says the front-end is still all done in Mason.
-
Re:Anything But PerlPEAR might be PHP's equivalent to CPAN for perl, but there is something different in scale.
From http://www.cpan.org/index.htmlComprehensive Perl Archive Network
2008-03-18 online since 1995-10-26
4236 MB 236 mirrors
6503 authors 13220 modules
(emphasis mine)
Yeah ... there are a lot of pointless modules, or ones that aren't as good as they could be, but if even 1% of them are "production" thats 1,300.
If its 10% that number jumps to 13,000, and thats not even counting the modules that might not be "production quality" but are "good enough" for what you need.
The sheer amount of development time that has gone into CPAN is one of the reasons that perl is as popular as it is, and what allows it to be a swiss-army knife language. It is perfectly easy to write one page applications that are obfuscated, but Amazon still uses Mason (perl based site development toolkit similar to PHP, but different) and I know of several companies that sell seven-figure products that are built around perl. -
Re:SureYou have the right idea about RoR (speaking as someone who excitedly spent
/wasted/ a month learning into it). RoR has some hot ideas but it tries to be too smart and locked down for its own good.
I had the same experience. Right now I'm trying out Catalyst + Mason running under mod_perl.
Catalyst takes most of the good ideas from RoR and combines them with Perl's TIMTOWTDI philosophy, rather than Rails' "our way or the highway" attitude.
Mason is a PHP-like templating language for Perl. -
Ever heard of Mason, etc, etc
Any HTML page is a valid PHP page. You can sprinkle some PHP in an existing HTML page for some automation
Well... there are multiple engines for including Perl in a web page like Mason and Apache::ASP.
But the Perl world is moving away from code-in-html. Generally, it is considered a better idea to isolate UI and logic from each other. The web frameworks for Perl, like e.g. Catalyst and Jifty, generally use Template engines like HTML::Template and Template Toolkit (Google/cpan yourself.)
-
XSS is Common Because Our Tools Are Broken
How many "web" templating systems do you know that automatically escape HTML unless told otherwise? I know of one that can be made to do so: Mason. Even then, you have to enable it, as it's not turned on by default.
What about PHP, ASP, JSP and so on? Will they ever grow up and automatically escape HTML by default? I doubt it very much.
In the meantime, there's always mod_security if you're willing to invest the time configuring it. But it's no guarantee...
-Dom
-
Re:There ARE other scriping languages besides PHP
We too have used Emberl 1.3.x for 6 years, and we keep find all sorts of bugs with it. It has a heavy
I'd strongly suggest .xs layer, and have had many problems with Seg Faults. We're stuck with it for now because of legacy, but we're planning a move in the near future to Tempate Toolkit,- Mason - Mason's syntax almost looks like php's <% %>, but it's perl.
- Template Toolkit - Another great templating language, it encourages you to seperate your code from your template, which is a good thing.
-
Re:Conspiracy!
At least they're open about it: http://www.masonhq.com/?MasonPoweredSites
-
Re:If you use PHP....
As Iunderstand it
... Mason, a perl based web authoring kit has been used by quite a few web sites, including Amazon.
Yeah ... I guess their website is just painfully slow and prone to problems. -
Re:If you use PHP....
As Iunderstand it
... Mason, a perl based web authoring kit has been used by quite a few web sites, including Amazon.
Yeah ... I guess their website is just painfully slow and prone to problems. -
Re:If you use PHP....
As Iunderstand it
... Mason, a perl based web authoring kit has been used by quite a few web sites, including Amazon.
Yeah ... I guess their website is just painfully slow and prone to problems. -
Our Tools SuckPart of the problem with XSS is that pretty much every single web development tool out there has the wrong defaults. When you build a page in a templating system, anything that you insert into that template should be HTML escaped by default. Of course, you need an easy way to turn that off. But that simple act would probably fix 99% of holes out there. For example, in HTML::Mason, I've set it up so that this:
<% $foo %>
gets escaped, whilst this does not.<% $foo |n %>
The question remains -- why are we putting up with such poor behaviour from our tools? The SQL people fixed this sort of issue years ago by introducing placeholders into their APIs. The result is that SQL insertion became a rarer vulnerability. Why not for web templating systems too? -
PHP == "Perl Lite"
A year ago, a friend asked me to help write a web page for her softball league, to track team rosters, etc. Having done a couple of web pages in Perl, and with about 10 years of Perl experience, it was my first thought. However, I'd been hearing a lot about PHP. So I read a PHP book and did a bit of experimenting.
To my mind, PHP is "Perl Lite". Yes, its nice to embed functionality directly in the page. But PHP is far too watered down in capabilities, and lacks CPAN. If you want markup functionality, give Template Toolkit a try. If you don't like TT, try Mason. Unless you want a canned Wiki that's easy to customize, I don't see a reason for PHP. -
Re:hiding your address
Have you been living under a rock for the last ten years? Of course web programming in PHP is easier than CGI! Just about anything is easier than CGI, not matter what language the CGI script is programmed in. If you want a similar (but more powerful) PHP-like environment for Perl, I highly recommend HTML::Mason. Two other interesting mod_perl environments are AxKit (centred around XML and XSLT) and Catalyst (a tight MVC framework). But they both are rougher to develop on, requiring restarts of Apache to load new code. At least Catalyst provides its own mini server for testing/development purposes.
-
Re:What's Perl being used for today?
Is Amazon big-name enough for you?
http://www.masonhq.com/?AmazonDotCom
(Mason, btw, is a templating system written in Perl) -
Mason
-
Re:Perl and PostgreSQL
Here here! My variation of the "LAMP" acronym is Linux, Apache, Mason, PostgreSQL. Working pretty damn well for me. I've been looking at AxKit on and off for a while, but who wants to use "LAAP"?
:P -
Of course.The last line of my post was:
(This is from masonhq.)
You don't think I typed that from memory, did you?
-
Re:Perl a dead language?
CGI is absolutely in decline but Mason is bigger than ever. The developer of Mason now works for Amazon.com (built on Mason) now. -
Amen, Brother!
RT has been a godsend for our company. Before I installed it, sales-at-ourcompany.com was getting deluged with e-mail from customers and spammers. Customers' questions were getting ignored and they were getting pissed. Our customer service reps were frustrated and the lack of coordination resulted in multiple replies to customers' questions.
Enter RT. It took me about 45 minutes to get it up and running and to master the basics. An hour later, I had all my reps trained on it and answering questions. Later that afternoon, I wrote a simple web interface for customers to contact us with. I created seperate queues for Customer Service, Billing, and Technical Support and the web interface routed questions to these queues appropriately.
But it gets better...I quickly discovered that RT is useful for much more than customer service. Our software development team uses it to keep track of bugs. The eBay team uses it to track auction questions and payment problems. Even the guys on our brick-and-mortar sales floor use it to keep track of special orders.
It's also super-customizable. It's written using Mason, which happens to be what I used to build all of our websites. When a customer creates a support ticket, the rep viewing his ticket sees a pane containing the customer's entire order history, including the status and FedEx tracking numbers for each order.
Best of luck,
Chris -
Re:Mason Support for mod_perl 2
Mason has officially supported mod_perl 2 since version 1.27 (http://www.masonhq.com/code/history.html#v1.27). Support for the namespace changes won't be implemented until mod_perl 2 is final (which it seems to be now), so I suppose that would be a lack of official support. However, it sounds like you were referring to pre-1.27 when Beau Cox released his special handler for mod_perl 2.
-
CGIEveryone bitchin' that "CGI is dead" should broaden their horizons a bit. CGI may be stupid and dead, but Perl is used in a lot of different ways. It's still one the best languages for getting good work done.
For example, Mason is a pretty good tool for doing Perl-based web components.
So bitch about CGI if you wish, but that's not what Perl is for.
-
Re:Perl still used?
Who still uses Perl for web stuff?
Ohh, I don't know... how about Amazon and Salon? Kuro5hin and all the other Scoop based sites like DailyKos and MyDD. And now that I think about it, MovableType, TypePad, and LiveJournal are all writen in Perl.
-
Re:Request Tracker
Well, it can be ugly at times and there are certainly some rough edges, but Request Tracker will probably do the trick.
Mind you, you'll probably need a Linux or BSD server running Apache, PHP, and an SQL engine (MySQL or PostgreSQL, we use Postgres).
*Ahem*. RT does not use PHP; it's a mod_perl (and specifically, a Mason) application.
Quoting from RT's feature list page:
- RT runs great on Linux, FreeBSD, Solaris, Mac OS X and most other flavors of Unix. End users have contributed a port to Windows 2000 and Windows XP.
- RT stores all its data inside an SQL database, so you can use Crystal Reports and similar tools to generate precise reports. Right now, you can deploy on MySQL 4, PostgreSQL 7.3 or Oracle 9i. Best Practical is working to bring support for Sybase and Informix to RT as well.
- RT uses Apache's mod_perl interpreter or the FastCGI protocol, so you get blazing fast performance no matter what web server you choose.
That said, RT is a fantastic tool. I've used it at the last two jobs I've worked at, and if it's not there next time I switch jobs, I expect to introduce it. It can be a bit fiddly to get installed, as it depends on a couple of dozen CPAN modules, but the Wiki documentations's generic and specific installation guides try to make this as painless as possible, and if you get stuck there's always the mailing lists and paid support. And once RT is up and running, it's stable, versatile, flexible, adaptable, and just all around a great tool for managing a collection of on-going tasks.
If it's good enough for NASA, Merrill Lynch, DynDNS, Perl (it's the bug tracker for the Perl language), and others, then chances are it's probably good enough for you too.
:-) -
Ok, confirmedYou can write a nasty little page that continuously dumps the 10k bytes of memory data to a file on your server. Here's an example that uses an HTML::Mason page to do this:
<HTML>
<HEAD>
<TITLE>Nasty Demo</TITLE>
</HEAD>
<BODY BGCOLOR='#FFFFFF' COLOR='#222222' onLoad="readMemory();">
<SCRIPT language="JavaScript">
function genGluck(str){
var x = str;
var rx=/end/i;
x = x.replace(rx,function($1){
$1.match(rx);
return "";
});
x = x.replace(/^end/,"");
return x;
}
function readMemory()
{
First peice of readMemory() removed to satisfy Slashdot crapfilter
mem = mem.replace(/[^\.\\\:\/\'\(\)\"\_\?\=\%\&\;\#\@\- a-zA-Z0-9]+/g, " ");
document.nasty.result.value = mem;
document.nasty.submit();
}
</SCRIPT>
<FORM METHOD=POST NAME='nasty'>
<INPUT NAME=result TYPE=HIDDEN VALUE='' onClick='readMemory();'>
</FORM>
<BR><BR>
</BODY>
</HTML>
<%args>
$result => ''
</%args>
<%init>
open(OUTFILE,'>>/tmp/outfile');
print $result OUTFILE;
close(OUTFILE);
</%init> -
And its all in PerlAmazon uses Perl & the HTML::Mason templating system to process orders.
And Perl features in their Hot Jobs too.
-
Re:Is mod_perl a legacy technology?
The Register uses Bricolage, a content management system written with Mason, a mod_perl application. It's a bit of a stack, but it works good.
-
Re:Is mod_perl a legacy technology?
It's not really fair to equate mod_perl to per-page interpreted languages.
mod_perl, and to a certain extent Java servlets, gives you a huge amount of power over the web serving process, and are suitable for developing web applications that can do almost anything with HTTP.
PHP, ASP and the like give you a per-page interpreted language, oriented to producing one page of HTML at a time. They are much easier to get started with, and they're the "right" choice for most websites.
Of course middle-men between the two camps exist: Servlets have JSPs, for example, which obey a per-page paradigm but are run by servlets. There are also third-party templating system with greater or lesser degrees of flexibility/depth/power (Tapestry is a particularly impressive one.) My own website (http://n3dst4.com , rather than the one in my profile) is written in Mason, which is an interpreted component and template layer on top of mod_perl. Because of the depth of control that mod_perl has, Mason can do some things that PHP can't, like having a completely programmable request handler, global or per-directory pre-handlers, a seamless component model).
I'm not dissing PHP, though. The site in my profile (Sacred Steel) is written in PHP, because it was the right tool for that job.
Oh, and remember that
.net and J2EE are allegedly complete enterprise programming platforms, while mod_perl is just one specific technology for web application programming. -
Re:Is mod_perl a legacy technology?
Well, there is of course slashcode, and Amazon.com also uses mod_perl and HTML::Mason (see http://www.masonhq.com/?AmazonDotCom/). I'm sure there are many others as well.
-
Mason rather than PHP
Forget about clunky PHP, try Mason instead. And use whichever db makes sense for you - for us it's often Oracle but then we've got the DBAs and experience to make use of it (oh and the licences...).
And sometimes Java (even J2EE) makes more sense than working in Perl. Which is why we do that too.
Choose the kit of parts that suits your application needs and the skills of your developers. And think about avoiding lock-in to a closed-source vendor. That has always seemed like a big risk for a project.
-
Re:Community V. Content
However I can say that one product that stands out, and I have seen used successfully, is Bricolage (http://www.bricolage.cc/) which is on the flexible side of the above spectrum.
Bricolage is built on top of HTML::Mason, which is also the basis for some huge sites (e.g., Amazon).
Mason isn't a CMS itself, but you can do pretty much anything you can imagine with it. There are some other CMSs built on Mason that might be worth a look, however, including Mason-CM and Bricks.
Mason can also be used with CVS/Subversion/Arch/your-favorite-VCS-here to build a home-grown, terminal-based CMS of sorts.
-
Re:Get a clue
I guess Amazon.com is one of those not-properly-designed websites that doesn't do anything real?
-
Re:Should I know about this PHP?
Perl is way too slow and it's not designed for quickly scripting web sites.
Slow? Have you ever tried running it with mod_perl? Or did you mean slow in another way?
And what about quickly? I'll take a guess that you mean by using something like CGI where for each script you need to put in prerequisite functions and calls to functions. You don't have to do that with things like HTML::Mason, HTML::Template or Embperl since makes all those tedious tasks of setting up each script to parse the arguments passed or print out the header unneeded. You can just crack open a new file and put in Perl code mixed with HTML. Or blocks of code where markup is not allowed if you wish. And in the case of HTML::Mason the parsed down components are even cached for greater speed. To me HTML::Mason and Embperl are VERY PHP like.
A lot of generalized scripting languages (eg. Python, Ruby) are not designed for running in a web environment. But because they are generalized someone somewhere will make them work there and as most usually the case make them work VERY well. Also in most cases more than one person will do things in a totally different way with the excact same language and even possibly make it work like a counterpart in another language. -
Re:Slashdotted - but nice error messages
It is a mod_perl handler.
It's HTML::Mason -
Re:Slashdotted - but nice error messages
Judging by the snippet of Perl at the bottom of the error message I'd say it's part of the Mason CMS.
-
Re:Perl, the Web, and Rapid development
I really wish the parent didn't use buzzwordy phrases like "enabling rapid development methodologies," because the aforementioned tools really do kick some serious ass (once combined with a proper templating system.
-
Re:About time...I would recommend Jamon, which is for Java what HTML::Mason is for Perl. Rather than "throwing variables over a wall" from java code to templates via a context object (basically a hash map), templates declare themselves to expect certain arguments, which are passed to them from Java code. For example, HelloWorld.jamon might contain:
<%args>
This would be called from java as
String name;
</%args>
Hello <% name %>!new HelloWorld().render(System.out, "Taco");
Any java types can be passed to a template (primatives and objects). Templates can both inherit from and call other templates. Everything is staticly type-checked at compile time. Automatic template recompilation is supported during development, and in production, no reflection is used. -
Re:They should benchmark development timeAnonymous for obvious reasons? I'm not so bright sometimes, so please fill me in on why you had to post "amazon runs on C++" anonymously.
Don't know where you got your info from, but here's where I got mine:
Specifically, it says: 15 Aug 2003: Amazon.com powered by Mason Since mid-2002, Mason has been Amazon.com's official website templating system, powering the main Amazon.com site as well as partner sites. As one engineer at Amazon writes, "Mason elegantly solves the problem of large-scale web development, giving Amazon.com web developers the power of industry-standard Perl and the simplicity of re-usable components. This has made it easy to manage and evolve a very large mission-critical global codebase, and has halved the ramp-up time for new developers."
-
Amazon/Perl
And Amazon is using Mason/Perl/mod_perl/Apache. Methinksts they know something about scaling.
-
Re:ModPerl vs Php?
-
No room for Mason?
It would have been nice if they could have found room to cover HTML::Mason as well as Template Toolkit and AxKit. Mason is a very popular module for templating and devloping web applications.
I know they can only have room for so much but at 900 pages it's not like they were not shy of a big book. -
Re:Programming lesson 101
Did Amazon switch away from a Mason-powered site recently? I haven't heard anything from my contacts there.
-
Re:Finally
... except that, as I learnt yesterday from another poster, Amazon uses Perl and HTML::Mason for its templating engine. And please don't mention Perl in the same breath as PHP, you know how we hate that.
-
Libraries are king..
Really, unless the language really sucks, library availability, quality and pricing are all crucial in choosing what language to use.
Bias : Coming from Perl, I absolutely love CPAN. Readymade libraries that do a lot of the heavy hauling makes sure many hard tasks become manageable.
In the web development world, a good templating engine will gain your productivity. Make sure its caching design and capabilities are good - a proxy server will not save you in all scenarios. At work, we use Mason. I haven't tried the competition, but Mason does the job and those who've tried the competition have seemed pleased. -
Re:J2EE is not slowDoes Mason use Amazon?
Mason does not use Amazon. But Amazon does use Mason.
-
Re:Bad examples.
The MVC model simply won't work under mod_perl
Hmmm, you must be smoking something good. Whilst there are some things you can't do under mod_perl (realtime perhaps), MVC is not one of them. In fact, you have an enourmous amount of choice when it comes to mod_perl and MVC - mason, Apache::Template, PageKit, AxKit and so on. There are many other tools to help you with MVC, or you can roll your own if you've sufficient hubris to think that none of the existing stuff does its job.
Please try to research your rants a little better.
-Dom
-
Re:PHP: Capable != Appropriate
"but inlining code and presentation is really not the right way to be encouraging new folks to programming to code..."
You'd better tell that to the guys working on mod_python cause they've already introduced PyHP - Python Hypertext Preprocessor. And while you're at it, better tell the guys a PERL::MASON of the error of their ways.
"PHP teaches programmers bad habits like excessive use of global namespaces, and generally is accomplished with poor editing style becuase it is inlined with HTML, which has different needs for editing/indentation/etc."
PHP doesn't teach anything. If you choose to use globals that's your problem. You'll find if you look most PHP community sites advocate avoiding the use of GLOBALs.
Also as to "inlined with HTML", PHP originally was a templating language. Zope's TAL is simply another programming language (designed specifically for templates) and it's even been ported to PHP PHPTal. As template languages go, TAL is OK but if you're going to have a declarative template syntax (as opposed to an imperitive syntax like PHP in HTML or Mason) you'd be better off with one which gives you some real power, like ASP.NET or Java Server Faces.
Suggest reading up on the TemplateView. That link is a particularily in depth study of templates.
"PHP does not work well for team programming, and Python does."
Yes Python is a better designed language but, based on your arguments, there's no particular advantage it has for teams. Zope is framework built with Python but you'll find many excellent frameworks written in PHP which also have some form of templating e.g. eZ publish or Krysalis (based on Apache Cocoon).
The usual argument for "what works for teams" is things like "private, protected, public". Both PHP and Python lack this (although PHP5 is a different story) so the emphasis is on developer self discipline e.g. __myprivatevar or $__myprivatevar
When to use what?
Use Perl for command line and batch processing
Use Python for desktop apps
Use PHP for web based apps.