Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Perl Programming The Internet

BBC Creates 'Perl on Rails' 216

Bogtha writes "Long-time users of Perl for their public websites, and having successfully used Ruby on Rails for internal websites, the BBC have fused the two by creating a 'Perl on Rails' that has the advantages of rapid development that Rails brings, while performing well enough to be used for the Beeb's high-traffic public websites. This is already powering one of their websites, and is set to be used in the controversial iPlayer project as well."
This discussion has been archived. No new comments can be posted.

BBC Creates 'Perl on Rails'

Comments Filter:
  • by thammoud ( 193905 ) on Saturday December 01, 2007 @12:42PM (#21544555)
    Take two of the weirdest looking syntaxes and fuse them together. Life time employment.
  • by A beautiful mind ( 821714 ) on Saturday December 01, 2007 @12:50PM (#21544623)
    Exactly. They should have just went with Catalyst. RoR is overhyped. Perl on Rails just appears to be a way to hype something. Catalyst is actually a nice MVC spirited implementation that has the advantages of well written Perl code.
  • Re:Madness, I say (Score:5, Insightful)

    by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Saturday December 01, 2007 @12:53PM (#21544641) Homepage Journal

    Sounds like a bunch of Perl coders who cant be bothered to learn another platform trying to keep themselves in jobs.

    Sounds to me like a bunch of Perl coders with a few million lines of corporate code who thought this would be easier than learning another language for one specific smallish project.

  • Re:Holy Crap (Score:5, Insightful)

    by Anonymous Coward on Saturday December 01, 2007 @12:56PM (#21544663)
    Strange it may be, but incomprehensible and a run-on it's not.

    "Long-time users of Perl for their public websites," - an appositive
    "and having successfully used Ruby on Rails for internal websites," - another appositive, successfully connected with a conjunction
    "the BBC" - the subject of the sentence (which the appositives are in apposition to)
    "have fused the two by creating a 'Perl on Rails'" - a perfectly fine predicate
    "that has the advantages of rapid development that Rails brings," - with a relative clause
    "while performing well enough to be used for the Beeb's high-traffic public websites." - and another modifying clause.

    In short: it's a sentence. It's grammatical. It's comprehensible. Quit whining.
  • Re:Madness, I say (Score:3, Insightful)

    by omeomi ( 675045 ) on Saturday December 01, 2007 @01:41PM (#21545011) Homepage
    If you tell me you 'need' a language to implement a website I know I need to find someone else to build it.

    Yeah! Especially HTML!
  • Re:Madness, I say (Score:5, Insightful)

    by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Saturday December 01, 2007 @01:52PM (#21545081) Homepage Journal

    They're talking about having tens of thousands of files in a directory, and having an archive of data on all shows the BBC is showing, but no mention of using anything other than flat files!

    Flat files that are pre-generated from a database backend, maybe. As in a cron job each night that does something like "for show in db.select(shows): generatestaticpage(show)". I'd be amazed if the whole site was just one big Dreamweaver folder that gets published.

    I really can't imagine what their circumstances would have to be for it to be a sane option to rewrite Ruby on Rails in Perl.

    "We have a database engine. We have a template system. We have a language that everyone in-house knows. Let's write a generalized method for combining the three!"

    I suspect that happens a lot more often than you'd think. If anything, I consider it a testament to the BBC that they've decided to release their code so that everyone else doesn't have to reinvent it.

    Disclaimer: I much prefer Python, and to me the BBC is that extra channel that has "Coupling" and "Ramsay's Kitchen Nightmares". I have no special love for Perl or the BBC. I just think that it's pretty cool of them to do this and wish them luck.

    Nice sig, BTW. :-)

  • by value_added ( 719364 ) on Saturday December 01, 2007 @01:57PM (#21545129)
    With all that the perl community sees in terms of mockery ...

    Sniff. At the very least, we'd feel better if others could learn that it's Perl and not perl. ;-) I'll take this opportunity (in anticipation of the inevitable complaints about unreadable notation) to point out the following:

    $ is for scalar, @ is for array, # is for hash

    Not so hard, was it? Notice the mnemonic qualities? Much of Perl has a striking resemblance to natural language, given that it's author, Larry Wall [wikipedia.org] is a trained linguist. For the most part, it's those qualities that makes it easy to read and easy to write. And fun. But then, as with any language, there's often a widespread use of abbreviated forms of expression, or alternatively, idioms [wikipedia.org], the use of which, when used by someone who is skilled, trained, or otherwise knowledgable, is commonplace and second nature, but when encountered by a non-native writer or speaker of that language, are difficult to comprehend and require time and practice to master.

    That said, for a language as powerful, widespread, thoroughly documented, and easy to learn as Perl, I do find it disappointing that it's popularity has been eclipsed somewhat over the years. Go Beeb!
  • by BorgCopyeditor ( 590345 ) on Saturday December 01, 2007 @02:17PM (#21545301)
    Only Perl programmers think Larry Wall is a trained linguist. It would be more accurate to say he remembered some terms from a few linguistics classes he took as an undergraduate (notably "topicalization") and used them as metaphors to describe the rationale behind some design choices he made in creating Perl. The explanations aren't terrible, and some things in Perl's syntax were indeed "intuitive" by comparison with C, but the notion that Perl "has a striking resemblance to natural language" is a dream of people who don't really know much about how "natural language" looks, i.e., non-linguists.
  • by jrockway ( 229604 ) <jon-nospam@jrock.us> on Saturday December 01, 2007 @02:17PM (#21545305) Homepage Journal
    > $ is for scalar, @ is for array, # is for hash

    % is for hash. And that's not really a good rule.

    Given %hash, it's called @hash{@keys} when you slice it, and $hash{$key} when you only want one element. References always are scalar, so even though $foo->{bar}[42][2]{baz} is referencing a hash of arrays of arrays of hashes, you have a $ on the front.

    Once you know the rules, it's fine... but it's not necessarily Perl's finest point (and this all changes in Perl 6 as a result). Even if you like Perl, you have to admit that there are lots of things wrong with it.

    There are just less things wrong with Perl than any other language :)
  • by eniac42 ( 1144799 ) on Saturday December 01, 2007 @02:24PM (#21545365) Journal
    I mean... say no more. A nudge is as good as a wink to a blind bat..

    Seriously though I dont know what the BBC is doing, smoking its way through £130m PA ($260m) of public money on computer "projects", like re-inventing mplayer/iPlayer/MediaPlayer.. Haven't we already done this? Shouldn't Aunty Beeb leave the hard-coding to the free market & concentrate on what it does best - artistic/jounalistic output?
  • by Anonymous Coward on Saturday December 01, 2007 @02:24PM (#21545369)
    When you're running a set of websites as staggeringly busy as theirs, paid for with public money, I suspect you'll have strict rules about what gets onto your servers.
  • Re:Madness, I say (Score:4, Insightful)

    by theshowmecanuck ( 703852 ) on Saturday December 01, 2007 @03:03PM (#21545737) Journal
    Personally I don't know why people are always jumping to the 'language of the week'. I don't think 'progress' is the answer. I think too many programmers suffer from the 'we want the coolest new gadget' syndrome. Perl is a good and able language and if they have implemented another tool to help them do their job, then good on them. Why the hell should they bother to learn another platform. That is a ridiculous and juvenile argument. Constantly having to learn new languages just because a new flavour comes along reduces productivity, and makes it difficult to hire new people as there will never be enough people who know the languages on the bleeding edge. Meanwhile they probably have tons of Perl code already in place working just fine. So what if they don't like to use your favourite tool of the week and want to advertise their own favourite. No matter what you may say, they still know how to successfully build and implement one of the highest trafficked news web sites in the world. Shove that in you pipe and smoke it. Get a grip for Christ's sake.
  • by jhoger ( 519683 ) on Saturday December 01, 2007 @03:45PM (#21546075) Homepage
    Perl is readable to those that know Perl. I know Perl and I find idiomatic Perl readable.

    And "job security" language choices is just as much a problem with regular employees as consultants. As a consultant there's been more then one occasion where I had to go and clean up the mess after some bored employee made an "interesting" language or framework choice presumably to keep themselves interested.

    -- John.
  • Re:Holy Crap (Score:1, Insightful)

    by Anonymous Coward on Saturday December 01, 2007 @03:59PM (#21546189)
    If your humans can't understand your Perl code without extreme effort, just put them to work coding in PHP again. And don't forget the dried frog pills.

    Seriously, Perl can be understood by anyone with a few brain cells, and once you open your mind for some new concepts, you'll find that it's much more concise and powerful than the competition.
  • Re:Madness, I say (Score:3, Insightful)

    by syousef ( 465911 ) on Saturday December 01, 2007 @05:53PM (#21547181) Journal
    Sounds to me like a bunch of Perl coders with a few million lines of corporate code who thought this would be easier than learning another language for one specific smallish project.

    It's called putting all your eggs in one basket. When the language is no longer popular they'll be begging anyone with experience of it to join and trying to rewrite the entire monstrosity. Don't believe me? Think about Oracle forms. Half my job is replacing legacy code. What you're describing is a neat way of creating a HUGE legacy codebase for the future. Excellent for the programmer's job security. Not so good for the employer.
  • by Tumbleweed ( 3706 ) * on Saturday December 01, 2007 @11:17PM (#21549091)
    Perl is readable to those that know Perl. I know Perl and I find idiomatic Perl readable.

    I think it more accurate to say that Perl code is readable to the person that wrote that particular piece of code. Since there are a million and one ways to do anything in Perl (and this is considered a 'strength'), then when another Perl hacker comes along and can't understand what the previous Perl hacker did, they rewrite the whole thing the way they know how to do it. That doesn't meet my definition of 'readable.'
  • Re:Super (Score:4, Insightful)

    by Nazlfrag ( 1035012 ) on Sunday December 02, 2007 @01:08AM (#21549641) Journal
    Ahh, the old 'double negative' development methodology. They should have just gone with Microsoft Office SharePoint Portal Server, that's got full enterprise grade quadruple negative power.
  • by chromatic ( 9471 ) on Sunday December 02, 2007 @03:59AM (#21550303) Homepage

    Rails is just as extensible as Catalyst, if not moreso...

    Have you ever tried to swap out ActiveRecord in its entirety for something else? The corresponding change in Catalyst is much easier than in Rails. (Rails 2.0 might have changed this; I don't know.) Rails is very proudly opinionated, while Catalyst goes to great lengths not to enforce any single particular component.

    ... how come the Perl community is tripping over itself to be Rails all of a sudden?

    Nice synecdoche, but Auntie Beeb's programmers are really not the whole of the Perl community. Plenty of the Perl community doesn't care one whit for web programming, for starters.

  • by zby ( 398682 ) on Sunday December 02, 2007 @07:46AM (#21550949) Homepage
    There is an insightful thread on the Catalyst mailing list [scsys.co.uk] about this. In summary it looks that:
    • The code has not been released - so all the discussion is a bit void
    • The reasons for it's development seem to be based on misunderstandings and 'white listing' of allowed modules (plus only Perl 5.6 allowed)
    • It looks like Siemens, which in some way administers BBC working environment, is very reluctant to white list new CPAN modules - so the BBC developers reinvent on a grand scale.
    If someone knows someone from Siemens involved in the whitelisting process - then please ask him why it is so slow and ask how the Perl community could help them to make it faster.
  • Re:Super (Score:2, Insightful)

    by ^Case^ ( 135042 ) on Sunday December 02, 2007 @12:15PM (#21551987)
    Why is it that every time somebody mentions Ruby on Rails people have to say it's slow and unscalable? I'm getting kind of tired seeing this myth propagated. Ruby may be slower than $LANG but it's not that much slower, and the Rails shared nothing architecture makes it infinitely scalable up to the point where the database backend can't keep up anymore. And once you get there it's not really the framework that doesn't scale anymore is it?

    Additionally the expressiveness of Ruby combined with the conventions of Rails leads to comparatively little code, making it easy to change the app to take advantage of advanced deployment strategies like using memcached scaling the app even further.

    So unless you can come up with concrete examples of unscaling Rails apps or arguments as to why Rails does not scale please keep quiet. Statements like yours without any arguments doesn't really provide much value, even if they are true. Thank you.

To the systems programmer, users and applications serve only to provide a test load.

Working...