Slashdot Mirror


Ask Slashdot: Choosing a Web Language That's Long-Lived, and Not Too Buzzy?

adelayde (185757) writes "In my day job, I work on a web based service with a lot of legacy code written in that older (and some may say venerable) web-scripting language, Perl. Although we use Modern Perl extensions such as Moose, the language just seems to be ossifying and we're wanting to move to a more up-to-date and used language for web applications, or even an entire framework, to do new development. We're still planning to support the legacy code for a number of years to come; that's unavoidable. This is a fairly big project and it's mission critical to the business. The thing we're afraid of is jumping onto something that is too new and too buzzy as we'd like to make a technology decision that would be good at least for the next five years, if not more, and today's rising star could quite easily be in tomorrow's dustbin. What language and/or framework would you recommend we adopt?"

36 of 536 comments (clear)

  1. Perl by XanC · · Score: 5, Interesting

    Perl 5 pretty much satisfies everything you're looking for. What's the problem with Perl again?

    1. Re:Perl by Anonymous Coward · · Score: 5, Funny

      /&%#%^&*)^ADVkjR$%^$E)!HJLGAZ^&R%\jkghlk/^

      Random garbage or valid perl?

    2. Re:Perl by trudslev · · Score: 5, Funny

      Valid garbage or random perl?

    3. Re:Perl by just_another_sean · · Score: 5, Insightful

      Nobody is forced to program that way in Perl. It can be fun and may or may not look cool on a t-shirt but no one recommends that as a way of doing it. Just because there's more than one way to do it doesn't mean you should choose the worst way.

      And to the submitter, I agree with the OP.

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    4. Re:Perl by MouseTheLuckyDog · · Score: 5, Insightful

      Nobody is forced to program that way in Perl.

      Mobody is forced to write Perl that way, but many people are forced to read that kind of Perl.

    5. Re:Perl by Mordok-DestroyerOfWo · · Score: 4, Funny

      /&%#%^&*)^ADVkjR$%^$E)!HJLGAZ^&R%\jkghlk/^

      Random garbage or valid perl?

      Why can't it be both?

      --
      "Never let your sense of morals prevent you from doing what is right" - Salvor Hardin
    6. Re:Perl by Sarten-X · · Score: 5, Insightful

      A good language ... should do its very best to make sure you CAN'T code sloppily.

      Exactly, just like a good spoken language should make sure you CAN'T use profanity.

      ...But then, what about when profanity is appropriate? What if you need an emphasis that is so fucking strong that simply changing the tone of voice doesn't suffice? What if your whole damned speech is in reference to something condemned by a deity, or referring to Mohammed the thief, who assumed the name of the prophet?

      The point of any language is to express. For programming languages, the idea is to express instructions for two different processing styles simultaneously: the deterministic and predetermined understanding of the parser, and the non-deterministic and subjective understanding of colleagues. Similarly, spoken languages must account for the subjective understandings of every listener, some of which may have very different rules regarding obscenity.

      There is much more to coding "cleanly" than mere syntax. Structure is equally important, and it must change as the system design demands. If the rules of a language are too strict, then the whole program starts to look the same, and it's more difficult for future interpreters to understand the intent of the program.

      There is an art to writing clean code, just as there's an art to writing eloquent language. Strict rules don't always improve that art.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    7. Re:Perl by HornWumpus · · Score: 3, Insightful

      Regular expression are deterministic. Rob Ford, not so much.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    8. Re: Perl by GeekBird · · Score: 3, Insightful

      Agreed, which is why I get really annoyed with Python bigots. My main exposures to python have been trash piles like Anaconda and cowboy crap that is seven layers of libraries to implement and process check that has such poor syntax that it can't even fail, no matter how screwed the process.

      I've seen incomprehensible junk written in tcl, bash, java, javascript, c, c++, visual basic, fortran, cobol, basic and assembler, most often written by "experienced" coders who think comments and structure are anathema and risky to their job security.

      Give me "unsophisticated" and/or heavily commented code, thank you.

      --
      use Sig::Witty;
    9. Re:Perl by Cro+Magnon · · Score: 4, Funny

      /&%#%^&*)^ADVkjR$%^$E)!HJLGAZ^&R%\jkghlk/^

      Random garbage or valid perl?

      Yes.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    10. Re: Perl by vux984 · · Score: 3, Insightful

      That you think C aids in expressiveness over Perl, Python, Ruby, awk, Go, Swift, Rust, D, C#, Scala, Clojure, or even C++ shows you're talking out the wrong orifice

      I expect we're using the word "expressive" differently.

      C is a lot of things, but it is not terribly expressive or high level.

      Definitely not high level.

      C lacks concise and easy to use language syntax to express ideas, but almost any idea that can be imagined can be expressed (implemented) in C. That is what I meant by expressive.

      Higher level languages provide all sorts of direct language support for ideas that are not directly present in lower level languages, but all high level lanagauges ultimately compile down to machine code, which can be represented by assembler. Therefore, nothing that can be expressed in any language can't be expressed in assembler. Therefore assembler is maximally expressive. Anything else is just a subset of what you can do with assembler.

      However there is PLENTY you can do in assembler, that you can't do in any other language, and C, is the lowest level language above assembler, and while there are some things that can be done in assembler that can't be done in C, there's not a lot that can be done in a higher level language than C that can't be done in C.

      Not easily. Not concisely. And not safely... because if you implement a reference counting garbage collector in C to do your memory management (and you can) there is nothing in C stopping you from directly manipulating the GC state to achieve all kinds of stuff you can't do in the higher level language ...and should probably never do!! -- but this isn't about *should* -- its about *can*.

  2. Better yet... by OpenSourced · · Score: 3, Funny

    Which editor should we use?

    --
    Rome taught me patience and assiduous application to detail. Virtues which temper the boldness of great, general views.
    1. Re:Better yet... by Anonymous Coward · · Score: 5, Funny

      Anyone but Timothy.

    2. Re:Better yet... by tbuddy · · Score: 5, Funny

      +9001 Funny.

  3. Perl still works, and PHP is fine by ShaunC · · Score: 5, Informative

    Perl may be legacy to an extent, but it's a Swiss army knife that will get any job done. I don't see it going away anytime soon.

    I know it's in vogue to hate on PHP, but PHP is relatively modern, robust, and fully capable of handling enterprise tasks. It's widely adopted and there's support everywhere. Probably half of the websites and services you use every day are built on PHP, it's certainly not the worst language you could choose.

    --
    Thanks to the War on Drugs, it's easier to buy meth than it is to buy cold medicine!
    1. Re:Perl still works, and PHP is fine by Vellmont · · Score: 3, Informative

      Anyone cosidering PHP should read this the now infamouns "PHP is a fractal of bad design".

      http://eev.ee/blog/2012/04/09/...

      --
      AccountKiller
    2. Re:Perl still works, and PHP is fine by Anonymous Coward · · Score: 5, Insightful

      Sure, on paper it looks like you'll have a large number of viable candidates, but when you start interviewing you learn that the PHP "talent pool" is mostly just a pool.

      It's just as quick to hire a real developer and train them in PHP.

    3. Re:Perl still works, and PHP is fine by Mordok-DestroyerOfWo · · Score: 5, Funny

      > PHP is relatively modern, robust

      No it isn't

      Skillfully refuted!

      --
      "Never let your sense of morals prevent you from doing what is right" - Salvor Hardin
    4. Re:Perl still works, and PHP is fine by itzly · · Score: 4, Funny

      That's not an argument. An argument is a connected series of statements intended to establish a proposition.

    5. Re:Perl still works, and PHP is fine by danudwary · · Score: 5, Funny

      No it isn't.

    6. Re:Perl still works, and PHP is fine by Jesus_666 · · Score: 3, Insightful

      PHP is the boring, reliable choice. It's popular enough that it's probably still going to be mainstream in twenty years. The ease of entry means a steady stream of neophytes who end up checking out PHP at their first web language.

      It's not a pretty language but you can be reasonably certain that for the forseeable future it's going to stay. It's nowhere near as nice as Ruby on Rails or Python/Django but it does have a huge market share so there's both relatively many people who speak it and a lot of ready-to-use code, from snippets to frameworks.

      The huge amount of available code is a bit of a mixed bag, though - PHP attracts a lot of entry-level coders and in many cases it shows. On the one hand you have things like Twig (a clone of Django's template engine) that are a delight to work with; on the other hand you have things like most WordPress plugins, which consist of barely-working code written by someone who thinks that "model-view-controller" involves Kate Moss staring at a gamepad. The fact that PHP makes it easy to write code that is wrong but still runs doesn't help here.

      PHP has flaws. A lot of them. It's a pretty annoying language to work with. But it's not going to fade away anytime soon and that is its strength. If that makes it desirable to you then PHP is a reasonable choice. If it doesn't you might want to stay with Perl or take a look at trendier languages like Ruby, Python or JavaScript.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    7. Re:Perl still works, and PHP is fine by budgenator · · Score: 3, Insightful

      You just have to filter out the people who list HTML as programming.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
  4. Remove the ransom note excuse with Deparse by ksbraunsdorf · · Score: 5, Interesting
    If you don't like ransom notes (which perl programs may become over time) use this trick: get perl to reformat the code with a this command:

    $ perl -MO=Deparse ransom.pl >better.pl

    Most of the time that removes the crazy from the script. I just got a large legacy code-base and that little trick made my life much better. If the perl code works, then you are just looking for work to do. Newer is not always better.

    1. Re:Remove the ransom note excuse with Deparse by bytesex · · Score: 3, Funny

      I just did your deparse trick on my worst perl script, and it made it *worse*! I must be doing something right.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
  5. Java by Neruocomp · · Score: 3, Insightful

    Be careful with frameworks, because as soon as you find yourself having to do things outside of its protective little garden, you might as well give up on the framework. But in terms of long lived, go with Java. It has no buzz or the glory the pretty new things have and thats why its still in wide use in the enterprise.

    --
    Physics is like sex. Sure, it may give some practical results, but that's not why we do it
  6. Perl says your garbage is just that by Anonymous Coward · · Score: 3, Informative

    Well, it says it in it's own polite way:

    $ perl -e '/&%#%^&*)^ADVkjR$%^$E)!HJLGAZ^&R%\jkghlk/^ && print "Valid? No way!"'
    syntax error at -e line 1, near "^ &&"
    Execution of -e aborted due to compilation errors.

    1. Re:Perl says your garbage is just that by lsllll · · Score: 3, Funny

      syntax error at -e line 1, near "^ &&"

      Hell, at least it made it 2/3 of the way through.

      --
      Is that a roll of dimes in your pocket or are you happy to see me?
  7. Java or C# + AngularJS by mlk · · Score: 3, Interesting

    Find yourself a good REST writing API (I'd go Jersey & Guice, but many go Spring for Java) and then HTML AngularJS as your front end framework.

    --
    Wow, I should not post when knackered.
    1. Re:Java or C# + AngularJS by asylumx · · Score: 4, Insightful

      Agree. Also .NET MVC is really getting pretty good as a framework.

  8. Fractal rant makes about six good points by tepples · · Score: 5, Informative

    Anyone cosidering PHP should read this the now infamouns "PHP is a fractal of bad design".

    Which must be balanced with the "hardly" rebuttal. For example, PHP lets a program solve the exception/warning dichotomy cleanly in about six lines of code; see the manual's page about the ErrorException class. This leaves about a half dozen legitimate complaints:

    • No way to turn off the language's loosely-typed comparisons.
    • Parse errors and undefined function errors are fatal rather than throwing an exception that the caller can catch.
    • Inconsistent naming conventions in the standard library.
    • Associativity for the ternary ?: operator is the less useful side.
    • PHP allows the server operator to change program semantics in ways that are annoying to work around, such as not allowing a shared hosting subscriber to turn off "magic quotes" or not following HTTP redirects in libcurl.
    • PHP versions change the semantics of existing programs in ways that encourage shared hosting providers to continue to offer only outdated versions of PHP, making it impossible for web application developers to take advantage of new features.
  9. "Ossifying" vs. "Stabilizing" by DutchUncle · · Score: 4, Insightful

    ... because people saying that something is "ossifying" and jumping to the next fad is EXACTLY what makes things "buzzy".

  10. Random garbage or valid Python? by John+Bokma · · Score: 3, Interesting
  11. Yesod by John+Bokma · · Score: 3, Insightful

    http://www.yesodweb.com/ Lookie, it's even in the domain name ;)

  12. Hiring by oneiros27 · · Score: 4, Interesting

    Most of the people who know Perl well already have jobs, and aren't looking to change.

    We tried hiring someone to help me offload some of my work, and one the task I've gotten behind on is updating & maintaining some Perl code.

    We had one person who I felt could've jumped in, but that management didn't like (as he had previously worked here, and left). The rest were folks who we'd have to train on OO, closures, and other higher level concepts.

    If this hasn't been offered as a 12-month position, maybe we could've found someone. If we had advertised it as a general programming job, and then taught someone Perl, maybe it would've been gone better for us.

    With trendy languages, you at least get people willing to apply -- even if it's the case that they don't grok the language, you at least get someone you can train up.

    --
    Build it, and they will come^Hplain.
  13. I know why you are asking, you said "Legacy" by turp182 · · Score: 3, Insightful

    The key word in the summary is "legacy". This indicates that there is a large code base that the current developers are not too familiar with (deep knowledge, staff turnover causes this). This causes an organization to fear change due to the related complexity of changes and potential regression bugs. I'm going to guess that there aren't large, mature suites of unit and regression tests.

    So I believe you have:
    1. Complex code base without a lot of deep developer knowledge of the innards.
    2. Fear to change things too much due to complexity and the possibility of introducing bugs.
    3. Do not have effective, wide coverage testing implemented.

    But, you also have good knowledge of Perl and the architectural elements that compose the system (server software, external libraries, etc.). That knowledge is very valuable and shouldn't be dismissed just for the sake of changing the base language of a system. And you have a working system. How many person years of development have been put into it? Are you willing to spend that much time on the replacement (do you think a replacement could be built in less time, and if so, why?)?

    As well, rewriting large admin systems is very risky. I've personally seen two such efforts fail, a 100% failure rate from my personal experience (both had budgets over $5 million, one was over $40 million). Here's an article on this topic:
    http://hbr.org/2011/09/why-you...

    Consider keeping the existing system, but embarking on a long term (years) modernization/re-design/improvement effort to make the system more modern (ie. easier to work with). Focus on small, non-breaking changes that can go out with regular enhancement promotions (the modernization effort should be able to stop at any point, with any improvements to the system staying in place - this allows for tight budget control and financial risk mitigation). Hire a good application DBA to perform analysis and recommend changes to the data model. Hire a good software architect or bring in architectural consultants that can bring a different perspective to the understanding of the application, its goals, and how it could be improved.

    Here's an article on approaching IT projects in a "Small and Simple" manner:
    http://w.objectwatch.com/white...

    --
    BlameBillCosby.com
  14. Re:.Net / Typescript by AaronLS · · Score: 3, Interesting

    There is nothing overkill about MVC. It is far simpler than webforms. Webforms is the one that is overkill. The massive view state object that is serialized with every request, the fact that it tries to emulate windows forms controls with heavy objects and non-HTML tags. You want HTML, use MVC. You want the overkill of webforms controls? MVC is far faster even for simple cases.

    I did webforms for even applications ranging from simple to complex for 3 years, and I've been using MVC for almost 3 years now, and I can tell you MVC is far simpler for both cases. Webforms was designed to be familiar to people coming from a Windows Forms background, and that layer that created on top of the simple html/http request/response model of the web is overkill. The viewstate for example is designed to give the programmer the sense that state is continuous through the user's interaction, as if it were a webforms app, to hide the request/response web model from the programmer. But this is overkill and actually makes things more difficult to debug and work around. Having to tweak what goes into viewstate and what doesn't. For those who do it alot it is probably second nature, but it is an unnatural layer of abstraction over how the web works.

    Try to do something as simple as a small survey that has a dynamic list of questions. On postback, even though you have no intention of showing the user the form again, in order to capture the user's response you must recreate the entire form, and make sure you do it in just the right event handler in the pipeline. In MVC, all you need is a POCO in the Action method parameter.