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?"
Perl 5 pretty much satisfies everything you're looking for. What's the problem with Perl again?
Which editor should we use?
Rome taught me patience and assiduous application to detail. Virtues which temper the boldness of great, general views.
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!
JavaScript isn't going anywhere, and is nearly required for web development in browsers... so having it on the server side just makes things that much easier. It's not particularly hard to learn... you hire people with JavaScript experience, and they can get spun up on Node.js in a week or so.
PHP or Java?
PHP has a number of CMS frameworks built in it.
Java has the JavaEE stack.
If you're using a high level language with WSGI for efficiency, then you can choose the one that meets your performance/complexity goals.
Friendly, maintainable, not high performance: Python
Higher performing, C, C++
Supports elegant solutions if your brains are wired differently: Haskell
But unless your code is a mess, there's nothing so valuable as a large codebase of working code with institutional knowledge built around it. That would be PERL.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
I work in a medium sized software development company, and we work exclusively with .Net usually Visual Basic .Net land, typically with the newer frameworks the differences functionality wise are fairly minor .Net 2,0 web forms and are now on .Net 4.0, everything is backwards compatible as far as I can tell between frameworks
C# is also an option in
we started with
Another direction would be php, or something more specialised such as Ruby for example
If you want rapid development cycles then having intelisense / auto completion / linq / entity framework is definitely something to look into
these languages are server side, you also may want to consider how much of your website wants to be written in client side languages such as javascript. Personally I'm planning on learning Typescript which is a subscript of javascript, basically easier to write and more class based with intelisense
It all comes down to what kind of functionality you want to put into your web apps, and what your developers feel comfortable with
As a greybeard who used to write dynamic gopher sites, I really like to write in Ruby/Sinatra now. It gives me access to lots of nice features (I can install activerecord when I need it) and I can build APIs super quickly and everything in between. And I can get down to the bottom of the network stack pretty easily when I want to. I do miss the Ruby/Rails built-in testing framework, but otherwise haven't looked back since switching from that environment.
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.
Very powerful and very flexible, without the heavy lifting of many frameworks. We use on a large ISP as RESTFull Server.
Why because Javascript is proof that you can write a language that is worse then Perl.
>Javascript. Code for input validation
Umm... Javascript in a web page can do nothing for input validation. Anyone can send anything they want to a server.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
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
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.
I'm going to second Groovy on Rails. AKA Grails. It's very mature and is one of the languages that compiles down to Java Opt code. You have a large eco-system of production apps that run in the container. The language is fairly approachable (saying this as someone who came originally from a Perl Web App background in the late 90s). You can also use Java Libraries if there's something you want to get out of box such as one of the many Open Source Apache Libraries or Google Guava Libraries.
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.
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:
... because people saying that something is "ossifying" and jumping to the next fad is EXACTLY what makes things "buzzy".
http://preshing.com/20110926/h...
Perl Programmer for hire
http://www.yesodweb.com/ Lookie, it's even in the domain name ;)
Perl Programmer for hire
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.
PHP is the language for web programming, just as C/C++ is the language for system programming.
People have been hating on C since at least the 1980s. It's still here. People have been hating on PHP since 2000 or so. It's still here.
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
I'm not going to take sides on 'what language to learn next.' You've not given us enough information on your codebase, the size and nature of your company, etc. I would say a rewrite is as likely to put you out of business than not, but that's ultimately your choice and unless I know all the factors I can't tell you if its a risk worth doing.
Regarding the link you gave on Perl 'ossifying', there was actually a signification discussion on the Perl Reddit about that article which I want to point out:
http://www.reddit.com/r/perl/c...
I would say the website that generated that article seems to be some sort of SEO play (they just have a bunch of articles on stuff that has some interest and controversy) and they stick ads on it. There's nothing mentioned in it that hasn't been mentioned 100K elsewhere (including here on Slashdot).
Perl has pluses and minuses but I've made a good career at it, and most of the code I've worked with is newer (seldom more for 5 or 6 years old), not legacy stuff from before the first dot com bubble. I'll probably make 200K this year, so I can't say its a bad choice. I work with lots of fun people as well. I also like Javascript. If I was starting today I might choose Scala, its a nice clean, fast language with a lot of forward looking concepts. Best of luck whatever you do.
Peace, or Not?
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
Every web framework and technology has benefits and drawbacks. It's a matter of finding the right fit for your company. It's a good thing they're letting you ask the question, because managers/bean-counters make bad decisions in this area claiming that devs can't "see the big picture." Find one that fits well with your system and needs.
But, I assume that's why you're asking slashdot--you don't know what's out there or what their benefits are.
Well, I've spent the past 7 years benchmarking web frameworks and systems and I'll share a bit of what I've found out. Keep in mind, all information given here is my opinion and subject to debate and correction.
First--if you need near-infinite scalability and the absolute best performance, there is nothing that can beat mongodb for a database backend with fastcgi++ for your "framework." Mongodb is a bit buzzy still, but there are good reasons for that. It scales extremely well, and was designed to scale at speed. Fastcgi is anything but buzzy, but it's the fastest there is and it's built right into most webservers--but you're writing C/C++ code so that's an odd beast to deal with.
Now that I've said something that management will undoubtedly shoot down, here are some other frameworks and what they were originally designed to do, and some highlighted features.
Python - Django : "perfectionists with deadlines." Django was designed to chug out simple, straightforward web applications as quickly and cleanly as possible inside of your overall project. Contains template inheritance that has a small learning curve and is very powerful. Uses any SQL backend you want and provides an abstraction layer for it with caching. Cons: can be pretty heavy for a webapp, and difficult to integrate into a production environment.
Python - Flask : Simple and lightweight. Uses the same templates as django, but no database backend. It's meant to be standalone and simple (5 lines of code will get a website up). It's easy for your code to grow unwieldy inside of flask.
Ruby - Rails : Continuous development and test-first environment. This is kinda the poster boy for buzzwords, in my opinion, but it has some strength beneath it. Ruby is largely on-par with perl, so you have that. Rails provides the data modeling and really streamlines a lot of the annoyances common to web development. They designed the system to be the whole "45 minutes to a production environment" pipeline. You're supposed to write your tests first, then your code, and you write your deploy scripts and settings before you even start your project.
PHP - Drupal : Make a website without knowing crap about making a website. Haven't used it personally, someone else can comment.
PHP5 : "Hey, let's fix all the problems with PHP4!" Seriously, though. PHP was meant to add one-off server side scripts inside of your html, and has grown to be so big in comparison. PHP5 is actually a good language though, but it took a while to get it there. It's best used for image data processing, in my humble opinion, but it's on-par with any other language out there.
So, search them, find out who is using which systems, and which ones seem the most similar to your setup and go from there.
Try hiring people who are over 30.
use Sig::Witty;
Generating HTML on the server is more or less outdated.
So a "web language" on the server doesn't make sense, the way it used to do (like perl cgi, ASP, JSP, PHP and decendents)
What you do now is write the frontend in one of the new JS/HTML frameworks that run exclusivly on the client.
AngularJS is popular and will likely stick around in one form or another. But pick any you like.
For the backend you want to expose REST services, that serves the content in a way that is easy to digest for the frontend (so you don't end up with too much logic out there).
For that I'd recommend taking a look at Scala (10 years old, and not going away) and the Play Framework (http://www.playframework.com/)
What is nice about the Play framework is that it not only makes it easy to expose REST services. It also makes it easier to deploy the client side framework.
Also take a look at using microservices. Using that architecture enables you to write the REST services in smaller components, rather than one big server. That way you can more easily replace each service, when you want to migrate to the next backend technology.
Most developers only use JavaScript because it's their only realistic option on the client side for web-based applications. It's kind of like the QWERTY standard: you have to use it because avoiding it is made difficult by entrenchment.
I don't know if better tools (IDE's, interpreters, lint-er's, etc.) could make it more tolerable, but most of us have had a crappy experience with JavaScript in browsers, and this has damaged its reputation such that unless something comes along that repairs its reputation on a wide scale, server-side JavaScript is a tough sell. You can't just make it good, you have to show the world it's good and that their shitty browser experience was the browser's fault and not JavaScript.
The browser only seems to give one of two unhelpful errors: "object not found" or "is not an object'.
As far as the language, I don't like its non-WYSIWYG typing model. It has too many nulls, nils, NaN's, Nuns, or whatnot that drive one crazy. I prefer a typing model where every value is or is treated like a string and is readily displayable. No damned hidden types/modes. (Some say Null is needed for RDBMS compatibility, but I've almost never needed such, and the API can use the string "[null]" or the like if null detection is really needed by an app.)
And it has too many "kinds" of data structures; these may be delimited or enclosed with square brackets, curly braces, parenthesis, and whatnot. Too many similar kinds of collections. Just make everything a dynamic ordered tree rather than have similar but not quite the same species of structures. Lisp at least got that part right.
And don't overload "+" to mean both addition and concatenation. Slap the bastard who put that "cute" feature in.
Oh, and literals starting with "0" are interpreted as octal. Cute Marie, real cute. That feature almost got me fired from a contract once because the customer didn't believe such a design flaw could exist in a common language, thinking it was my fault. There's probably only 7 JavaScript programmers who use lots of octal literals; why the hell did you ignore the other 99.999%? Were you targeting cephalopod coders?
And JS lacks typical string- and date-handling functions. Lots of octal-friendly shit and no fucking strings; must be cephalopods.
Table-ized A.I.
With regexes typically more comments than code just like anything tricky to understand instantly in any language. With the rest just as needed for understanding.
Consider the Carmack transform in C. Can you work out what it's there to approximate instantly based on that line of code without being told? It's things like that and very complex regexes that need the implications listed while the hundreds of lines around them probably don't.