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.
Javascript. Code for input validation, data aggregation, automated testing, utility libraries (lodash etc.), concurrency and async handling (callbacks, promises, FRP...), domain specific code (on the UI: RIA, on the server side: SEO and mobile optimized initial payload delivery) etc. can all be shared. Heck, with PhantomJS or similar, headless testing and precomputed SEO aware payloads are straightforward. Use node.js or if Java cannot be avoided, Nashorn.
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.
Ruby is a great Perl replacement. It generates really nice looking content and is very readable. Do more with it than Perl with spending hours trying to understand some else's "snoopy swearing" code in Perl. Please be sure to look into Rails and Rake as well.
Use C++ and CppCMS: http://cppcms.com/
You get the benefits of a real programming language, not just a toy like Ruby, Perl, JS or Go. The code is checked by the compiler, you can compile it to run just about everywhere, and the compiled binaries are FAST. You don't need 10x or 20x the servers just because you're using an interpreted language that's really fucking slow.
And if you aren't a dumbass, you'll use the Modern C++ way. You will reduce your risk of security holes to a minimum, while getting a very efficient language to program with. Unlike Go, you'll get real OO if you need it, and real support for templates.
C++ is for those serious programmers who want to get real work done, and who don't have time to waste with overhyped crap.
Do you mean "stable"?
What the fuck is wrong with that?
Your job isn't to use hip new languages, it's to keep the service you run WORKING. For the people who PAY YOU. It's a TOOL for their business.
Ask the people paying your salary if they want you recoding things that work into your language-flavor-of-the-week.
So just jump on that band wagon, you already have a hate on for perl you'll fit in great with them.
PHP of old used to make it very easy to write applications with large security holes, but newer versions do a much better job of preventing developer's tendancies to shoot themselves in the foot.
I think it will be a very viable choice for web applications for the next 10 years or more.
There are a number of frameworks written in PHP that are pretty good as well. For my current project though, I've chosen to write a framework that is geared toward exactly what that project needed. I did choose to use an HTML framework to aid in the UI creation and standardization. For my project I chose "Foundation", but there are a lot of other good ones as well.. If your application has a requirement of being mobile device friendly (is there anything that doesn't?) then I would highly recommend a 12 column HTML framework.. If you don't know why a 12 column framework is the way to go, Google it, there are plenty of write ups.
The real headscratcher to me is the number of programmers who assume that because a language isn't adding features every couple years it is dead.
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.
What could possibley go wrong with that?
Very powerful and very flexible, without the heavy lifting of many frameworks. We use on a large ISP as RESTFull Server.
Python+Django was quite nice, when applied to a university course project. Some details a bit confusing at times, but the overall design of the framework was nice. I don't know how well it performs in real use, but it might be worth it to take a look at it, to study how things can be done.
Why because Javascript is proof that you can write a language that is worse then Perl.
Go Event-driven as a first-class concept.
Kernel API calls are all available as asynchronous now, so base your work on a system that thinks this way from the beginning. Everyone supports asynchronicity, but unless it's required then you'll have most of your libraries not supporting it. Event-driven scales better, and ends the threads complexity & delay found in most IO-bound tasks (which is most of the web).
Options:
- NodeJS: Modern HTML5 development is already Javascript-heavy. Package management is straightforward here: in your source control, yet dependency logic done in tools.
Disadvantage: Memory-use edge-cases. Tricky when 1 request needs many processors.
- Google Go: Synchronous-looking code ran asynchronously. Few libraries (vs Perl), but easy connection to C libraries.
Disadvantage: Compiled (library match issues, etc)
Python strikes the balance for me of being modern enough to not feel like it's constantly breaking, but also old and reliable enough to feel like it has widespread support in terms of libraries and is not going to fall off the map anytime soon.
Grails https://grails.org/
Built on Groovy (a JVM language), so it runs on most platforms.
The syntax is much nicer than Java.
You can have a web application up and running in a couple hours.
Just use Java.
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
Time to put on the DeVo and Whip It. Whip it good.
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.
today's rising star could quite easily be in tomorrow's dustbin
Well, at some point Perl was a rising star...
No matter what you're going to pick, it won't stand the test of time in the end.
Kidding aside, look for a set of qualities in whatever language/framework you want to use:
I know that it's probably generic bullshit you're getting from me, but you're going to get a thousand answers all screaming at once "Pyramid" "Django" "CakePHP" "CodeIgniter" and what not and unless you take a look at the languages and frameworks and see what people are / have been building with it you'll be none the wiser. Pick something you see yourself maintaining without pulling out all of your hair in the next couple of years.
There are a few axis along which you can do the comparison -
1. Developer Productivity - A save and reload framework might be more suitable if that is the existing mindset in your group. This seems to be a very underrated factor while judging your framework/dev set-up.
2. Existing codebase's dependencies - If you have a lot of dependencies which cannot be easily replaced in your new language, that is going to be a problem.
3. Performance of the framework - You want to have at least one large software shop using the framework whom you can use as a guide.
4. Community - This comes down to not just library support for future use cases; the rule of thumb is, if the first few setup issues you are having are easily solved by answers from StackOverflow, you are probably OK.
5. Recruitment - Languages/Frameworks often define the culture of a workplace and directly affect your recruitment base.
Actual Suggestions - 1. Scala/Play - Can use existing Java libraries. Encourages a less verbose coding style than is typical for Java. Twitter moved their Rails circus to Scala. A big con - their language bumps are apparently frequently non backwards compatible. So you might have to hold for a bit until things stabilize.
2. Rails - Easy setup. Solid Community. Good testing framework. Cons - Proven to not scale at Twitter. There are at least two other examples of Rails not scaling. Why jump ship twice eh? Dynamic typing is not exactly helpful when your code reaches a certain LoC count.
3. Golang - Good concurrency model. Easy to read code, almost a C-with-concurrency. Backed by Google; this is not going to be abandoned because a lot of internal Google teams are deeply invested in Go. Cons - Not as popular yet as Scala or Rails, so lesser library support; but rapidly expanding community.
ThoughtWorks has a languages and frameworks radar that can serve as a good 10,000 feet survey of the field - http://www.thoughtworks.com/ra... . In an ideal world, do not get too invested in any one framework.
The problems with perl - (I work in a large perl shop, if not the largest perl shop.)
Recruiting is a pain.
New devs need to get comfortable with perl idioms; a pattern that seems to encourage code obfuscation more than readability.
Optimal runtime concurrency is impossible. Even if you roll our own Futures library.
Bless is not safe. Consequently, you lose any sort of concrete interfaces.
There is no concept of unit testing.
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.
Changing language for a "newer" one seems like a really dumb reason. Does Perl not meet a specific need?
If someone was able to predict the future that well, they'd be buying out Warren Buffett instead of answering questions on slashdot.
Perl does seem to be on a downward popularity spiral. Whether it merits that or not would turn into a heated debate, so I'm only stating that from the perspective of having enough usage momentum to provide sufficient shop staffing options and support in the future.
PHP would be my rough best guess, if you want a dynamic language in the same general family as Perl. PHP is a bit clunky, but has huge current usage and has not shown any signs of slowing down. IF it started dying tomorrow due to some newfangled language or gizmo, it would take decades to fully kill.
Python and Ruby have failed to fully catch on mainstream, and the "white space" issue still haunts their growth. It just agitates enough developers to keep them down. (I'm not putting a value judgement on the white-space thing here, only looking at perceptions.) Plus, their communities seem to overdue "clever abstraction" coding, at least in terms of what the market prefers. They suffer part of what Lisp does, in terms of market perceptions and reactions to high coding abstraction. The market likes mid-brow languages, not high-brow.
C# is still too tied to Microsoft's fortune, despite having OSS clones. If MS sinks, it may take the clones with it out of industry support/momentum fear (not necessarily language merit).
And Java is currently haunted by Oracle's Big Lawyer ways.
Table-ized A.I.
You should look at the security and performance features. I strongly recommend something with memory residence in the web server, persistant database connection pooling, and taint checking (it catches a lot of security bugs). The only languages I know of that meet those critera are Perl (with mod_perl) and Ruby (with mod_ruby).
There's lots of other languages that have the performance features, but they're usually lacking in security. Java would give you the performance from the jvm daemon, but I don't think it has the taint checking, it's got a history of security issues (ie struts2), and (if you care) it eats a lot of memory. PHP has the performance from being embedded in the webserver, but has a long history of security bugs. There's a mod_python that gives you embedded python with db connection stuff.
Perl is the best language I know for parsing and extraction, due to regexps being tightly bound into the language. However, those regexps are less useful in web stuff.
. . . at least according to my Dad, who started programming in the late sixties.
"NASA used it to put a man on the moon, dammit. I doubt your projects are more complicated than that, so it should be all you ever need. (Unless you're writing a business application, of course. Then you should use COBOL.)"
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".
Don't focus on a language only. Also look at a good framework. My advice is the Banshee PHP framework. It mainly focuses on security, which is the only important thing these days. I know this will be seen as spam, but do yourself a favor and just take a look at it for 15 minutes.
It doesn't have to be like this. All we need to do is make sure we keep talking.
A lot of people recommend Perl but I have to disagree. I work on a large perl codebase everyday and I have done extensive work on Python and Javascript too. Python would be my pick among these three. It's much easier to read Python code than any other. You can write bad code or good code in any language but its easier to make code readable in python than in perl. Also, it requires a lot of context in your head to read regular perl code while someone who had a 20 minute tutorial can read python code.
http://preshing.com/20110926/h...
Perl Programmer for hire
[Dear Mr Censor, please let this through]
And yes, no irony here. Let me explain:
1.) The biggest threat you have these days are cyber-threats from private and state criminals. Strong typing, integer overflow checks and buffer overrun checks are a great countermeasure, even if not perfect. PHP on the other hand, is type-less so that these criminals have more opportunities.
2.) Higher R&D outlays will pay back later in reduced maintenance cost. Think of it as "building a solid house to last, instead of a soft-wood PHP house".
3.) Most of the "convenience" functions/frameworks of the PHP, Ruby, Python, Perl world have turned out to be security nightmares. Avoid them.
4.) Almost all software engineering shortcuts lead into the Great Cyber War Alley. Bite the bullet and build it in Ada. Hire competent, expensive people who know their shit instead of these PHP/Python/Ruby kids you can get for a McWage.
Der Computer
This is a tech site, right?
Perl Programmer for hire
http://www.yesodweb.com/ Lookie, it's even in the domain name ;)
Perl Programmer for hire
We all hate legacy code and want to work with something brand new but Perl is actually a very useful language. Don't forget to add performance to your list of desired attributes. Here is a performance comparison between several popular languages http://raid6.com.au/~onlyjob/p... . At least for the tests they were conducting; Perl was very quick.
/s
http://www.shutterstock.com/jobs/listings
We should strive for a decent definition of legacy.
...), not having security updates, ... e.g. Cobol or ...
What's not a fad is now legacy. I work on Ruby-on-Rails r3 and the programmers already consider it legacy, since r4 has been out a while. Legacy should mean something similar to all: maybe not easily runnable on today's hardware (needs special emulators,
Java, using Spring Boot with an AngularJS frontend.
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
but NodeJS is making strides these days. And despite a lot of talk otherwise, JS isn't going anywhere. The code reusability factor is really nice, the module ecosystem is growing by leaps and bounds. The framework side of things is where I think Node is currently still lacking. There are some options available, but in my experience so far the 'complete package' (RoR, Django) isn't arrived yet.
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
How about plain english?
It should stay around for some time and it's a language most people should already be quite familiar with.
(*duck-and-run!*) ;-)
Given any "clean" language, if you introduce enough complexity, like regular expression parsing, HTML emitting, inline anonymous functions/members, and so on, it's going to look like Perl. At least Perl has tools to mitigate itself through its module system to hide the crud. Top-level Perl programs look clean and maintainable if you push all the crud down into modules and subroutines. The same people who complain about Perl being ugly are the ones who write page after page of anonymous class implementations in Java.
What do you mean? When speaking of Python or Coffeescript, "white space" usually refers to semantic indentation, which I personally find a great feature (readable indentation is enforced and all those "}" lines are just gone) but I can see that it's a matter of taste. I don't know of any controversy over white space in Ruby.
TCL is both awesome and mature. It is also evolving, but the maintainers are very careful to maintain backwards-compatibility (unlike the Ruby-crowd). Two different Apache-modules exist.
Unlike with PHP, you can also write long-living TCL-programs — though PHP core is Ok, various extensions leak memory because nobody really uses the language for anything other than short-lived web-pages. Adding a GUI to your non-web program is also easy (with Tk), as is handling the cases, where GUI is not available — you can degrade gracefully to a non-GUI mode, rather than see the program refuse to even start.
The only real competitor to Tcl is Python, which is what Google are using, but extending Tcl with your C/C++ code is much easier, than extending Python (or any other candidate — Tcl's API is the best thought-out and stable).
In Soviet Washington the swamp drains you.
Why are you letting your hosting provider choose your language? Just get a VPS.
True, a VPS is a better once you get to a certain scale, but it can be more expensive for those just starting out. Shared web hosting from Go Daddy, for instance, starts at $3.49 per month, while a CentOS VPS from the same company starts at $19.99 per month. And a VPS is only going to get more expensive over time as IPv4 addresses run out.
Counterexamples would be appreciated.
Perl was used by programmers who wanted to spit out web pages or create back-end scripts to do things like send emails or file forms to a database. Non-programmers weren't invited.
Then PHP came along and could be used by web content creators who wanted parts of their page to be dynamic. This is just a better, easier to understand paradigm that allows people to collaborate much more easily.
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.
http://youtu.be/iSmkqocn0oQ
We recently shifted to GWT/Java for out web based projects here and have seen a major improvement in overall code quality and better overall performance in general.
We used to use PHP + JQuery.
Yeah, right.
Sadly, I really enjoy writing code for Zope. ZPT is a great way to integrate functionality to legit HTML, writing Python modules for Zope is incredibly powerful and even without them, the Python scripts and SQL functions built-in are very nice and easy to use.
I said sadly because its not nearly as well supported as that bastard child of the web, PHP. Zope gives Python an API wrapper that makes it easier to write large applications in than pure Twisted for instance, or PERL CGI on Apache even IMHO but its hard to find others who are accustomed to it so it can't be recommended here.
- Michael T. Babcock (Yes, I blog)
man perlref
If you haven't figured out what's wrong with that yet, I question whether you have experience working with any properly designed languages.
It helps if you close the quote _you added_.
You just suggested C for web development.
First, go bang your head against the sidewalk.
Afterward, refrain from participating in this conversation or any similar ones, as you have nothing useful to contribute.
It's not that. It's that Perl was badly designed from the outset. It added in features later, principally references, and did it badly. We're stuck with the legacy of all of those bad decisions.
You might try Mojolicious. Powerful out of the box with RESTful routes, plugins, commands, Perl-ish templates, content negotiation, session management, form validation, testing framework, static file server, first class Unicode support and much more for you to discover, amongst other things. It's very much Perl and modern.
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.
I am no fan of Perl, but if you have an application that is mission critical, has lots of legacy code, and just works, then you do not go about rewriting it just because there is some dislike for the language.
If it was something related, such as difficulty of finding suitable candidates for developer positions, then I would understand. But just because "perl is ossifying" does not cut it as a valid reason.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
Next question.
On the server side you're better off using PHP. It's by no means the greatest language out there but support is very strong and it can be a good language if wrapped in a framework which leads me to Symfony. There's a ton of MVC frameworks out there that all have their own pluses and minuses and I tried a ton but I eventually settled on Symfony because of it's high quality design, it's large community and how popular it is with established companies. I was leery of it initially due speed concerns but eventually it was pointed out to me that bandwidth and hardware are both cheap and programmers cost money. If you really want to get good performance anyway you're better off focusing on client side scripting. Learning Angularjs is the best way to do go. Angularjs is built on Javascript and it's geared towards fixing a lot of the issues people had with Javascript and JQuery. Symfony gives you a very good structure which can make you using a lot of JS easier anyway.
I've created a couple Python web applications for my company. I've found that a combination of a Gevent-based web server and a Pyramid framework application works well.
http://docs.pylonsproject.org/en/latest/
PHP is the scripting language to use for websites. It is also very well documented. You can get started coding without even needing a book because all you need to learn PHP is the PHP manual which is free and online at the PHP website, there is also a version available to download if you want to do some coding offline.
I've been using PHP for 10 years and it is still going strong as a dominate web language, there are also many free OSS frameworks if you wish to go that route.
And it will be around for the next 20 years too!
Dropwizard is an excellent framework for fast development of REST APIs, does not require a 'container', provides very high performance ... integrates with Spring/Guice ... use anything you want on the front-end ... https://dropwizard.github.io/dropwizard/
Speaking as a die-hard Perl programmer, isn't node.js the obvious answer for those who want "a web language"?
Seastead this.
If you do it for fun, then use whatever you want. If doing it for a job, then it has either been chosen for you by the Project or you select the appropriate language for the task. Of course can have problems if a certain language is better suited but you don't know it and then selected a dud. Probably avoid something that will go out of date soon and nobody will know what it is. For me, ugh I need to learn some of this (been doing html on Notepad since 20th century). My gripe are webpages with tons and tons of script that really don't do much except provide gates for marketeers to blast me with ads and pop-ups. I mean a site that is 2MB of stuff which a 60K html and a few 100K jpgs will do just as good (and download faster). I hate seeing "waiting for aodnqefhgthwe-rhew.googleanalytics.andotherstupidstufftodownload.xml" at bottom of window.
mfwright@batnet.com
Oh wait, I already did!
dontStop.pl:
#!/necklace/perl
use Java;
my $java = new Java;
my $package = $java->createObject( "orgy.package.com", "bigOne" );
$package->callPerlScript( "dontStop.pl" );
After writing tons of Java code that [checks a string variable for both null and equality to the empty string]
Not all implicit conversions introduce problems. Casting to a Boolean type, as the if statement does, is fine with the caveat that which values are considered "truthy" or "falsey" depends on the language. For example, PHP's ordinary bool cast rules are pretty much the same as Python's, except that the string "0" is falsey in PHP but truthy in Python. C and Java have their own definition: a nonzero primitive or a nonnull pointer is truthy. I find these implicit conversions, as well as some language-specific rule for implicit conversion to the language's string type, to make sense in general.
The practical problem with how PHP handles comparisons comes when it performs implicit conversions that make little sense. Strings more often than not end up converted to numbers before they're compared.
For the parse errors, you mean you don't do precommit hooks to do php -l to validate your checkins and don't have continuous integration setup?
You are correct that a lot of people do not. For one thing, they may lack the money to lease both a testing environment and a production environment from the hosting provider. Or they may lack access to server logs because the hosting provider doesn't provide server logs to customers on plans below the VPS tier.
For the undefined functions, if you're doing OOP, the language has had great support for autoloading classes for over a decade
Autoload failures caused fatal errors until 5.3, and some hosting providers were still on 5.2 after 5.4 came out.
The only valid complaint is that the major version isn't incremented often enough to clue people in that there are potential breaking problems.
True. But there are several cases in Python where the interpreter implements both sets of semantics and allows each source code file to select one or the other. Some, such as the division semantics, use the from __future__ statement; others, such as the parallel "classic classes" and "new classes" in the 2.x series, use other syntactic triggers. And unlike Python, where the initial #!/usr/bin/env line selects the interpreter version, the choice of PHP version depends on a server configuration that's often out of the hosting subscriber's control.
PHP is basically a thin wrapper for C libraries.
Thin wrappers are better when they're namespaced. Namespaces allow providing both traditional names and PEP 8-compliant names without overly polluting the global namespace.
These days it is more important to have a solid framework and set of libraries than to worry too much about the details of the underlying language that the framework is coded in.
e.g. PHP is not a great language IMO, it is good, but not the best, but Yii PHP Framework is awesome.
There aren't many technology choices good for five years, but ... I did my first web site in pearl in '94. Beat that for longevity.
Lua is a good choice for what you're looking for: It's not too buzzy, in that it's about as old as Linux. It makes an excellent framework language for many reasons. First, it's a simple C 89 library with a REPL thrown in for good measure. The C API is extremely clean and writing bindings for it is breathtakingly efficient. So, wiring in legacy code is always possible. Also, it is a multi-paradigm. You can make objects, program functionally, stick to good ole' procedural or mix and match. It has a long pedigree, but it has evolved nicely and is now an extremely stable language. It's modern in that it has first class function, block scoping, coroutines with a pretty robust set of functions to support them, a decent-but won't-set-your-pants-on-fire pattern matching system (LPeg is a module you can use for this and it's FAR better than regex, for my purposes). Parts will remind you of JavaScript, but most similarities end at the syntax. Lua is best thought of as sort of... C and Scheme have a baby... Or Scheme that doesn't hate you... Someone on Stackexchange (cannot find the link) said it nicely: Use something like Ruby or Perl if you want to solve a problem and you don't care to know all of the details of how it got solved. You're happy just to load up some modules and get it done. Use Lua if you're the kind of person who likes to really understand what is going on and like to hold the *entire* language in your head. We're using it to build a media framework and the experience has been awesome. Wikimedia recently picked it up and it's been in use in games for a while.
If a language isn'tlong lived or trendy / buzzy then there is a fair chance it's dead. I understand perl is boring now but I'd say stick with that or learn python and maybe brush up on JS without going full retard and doing everything in JS.
My sense is that the MEAN Stack (Mongo, Express, AngularJS, Node) is sort of winning. There's some packaging of it over at mean.io.
Personally, I'm really getting interested in Meteor (www.meteor.com). Watch the videos, and realize I saw a smart non-coder go from zero to *ridiculously* interactive site design in three months.
Rust will fill this hole.
And ended up writing my own language - obyx. About 3 people in the world know it, maybe 30 know of it. But it's pretty good!
Use C# and .NET. It's an ISO language, the framework is fully compatible with Linux thanks to the amazing work done by the Mono team, it's a powerful language, Microsoft open sourced a ton of the .NET components this year, MonoDevelop (or Xamarin Studio if you need support) is a good IDE, or alternatively Visual Studio Express (which is free) is even better. Haters gonna hate and all that, but objectively this ecosystem is one of the best for web development.
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.
Just do yourself a service and code everything in Common Lisp.
I know it's not widely used today, but if you're looking for something that most likely will be supported for a long time, why not a language created by a very large internet company? They're supposed to be using it for their services, so to me that indicates that they will be heavily vested in keeping it around for a long time.
Other than that, you never really know. What's popular today can become nothing but a footnote tomorrow. Some do last a while, but as something new and shiny comes along, people move on. You're best bet, IMHO, is to find something that's not too trendy, but still something that you enjoy working with and hope for the best.
1) Your problem statement is absent. The only thing you have is a worry that the current language is 'ossifying'. That means 'not changing' as opposed to 'not working'. Conclusion: no problem.
2) You don't want 'buzzy' implying that you want something stable, long-lasting .... 'ossified'? Conclusion: You've got that already.
Therefore: you've got what you need. Quit whining and work with it.
Note: you clearly don't have what you think you want ... but if you're asking the question here in \., you really don't know what you want. Therefore: you've got what you need. Quit whining and work with it.
A Promise: when your current software stops meeting your needs, you will able to identify the problems, and then what you need will become apparent.
"Consensus" in science is _always_ a political construct.
None.
Dancer? Mojo? or even trusty Catalyst won't do the job? Hard to believe.
What's wrong with assembly and its sibling, C?
cgic is very mature (1996-2014), and very stable (version 2.05 released in 2011, version 2.06 in 2014).
I have not seen an applet at any of my clients in over a decade. Server side java, however, is very common.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
If you want something used as a web language + more, I think the obvious go-to is Python. I'd personally pick that over PHP, Ruby, Perl etc, IMO it just has longer legs than anything else.
http://www.accountkiller.com/en/delete-slashdot-account Stop visiting Slashdot.
The naming convention makes reading code a lot more readable
Agreed.
With a try/catch you can catch every failure, not just one per line, with a single handler.
And with returning false, you can handle failures even within a generator expression. In Python, statements can do things that expressions cannot, and one of these things is try. This means if you include a function call that may raise an exception in a generator expression, you need to make and name a separate function that tries the call and translates the exception to a sentinel value indicating that a particular call in the list failed. If you're using the warning-to-ErrorException snippet from PHP's manual, then @expression behaves as if there were an inline try/catch: exceptions when you want them, nulls when you don't.
Point me to a rebuttal that is more than essentially "You're right, but it's fine and everyone else should be totally okay with it broken this way" and maybe I'll change my mind.
I wasn't trying to change anyone's mind about PHP being broken. I was only trying to point out that not everybody agrees that PHP is as broken as "fractal" rant author believes it is.
Try LiveCode... it is the current 'label" for an xTalk that has been around since 1983. It will be around for another 50 years at least... If Apple had not made some stupid decisions, it would be the language of the web today. Easy to code in, productivie, you can deploy to iOS, Linux, Windows, Android both desktop and mobile, use it on the web server. If the recent kickstart campaign succeeds you will able to design in LiveCode and export to HTML5.
I like to say "defecated" and see if anyone notices.
Some of the threads started here have said, "What's wrong with Perl?" There is nothing inherently wrong with Perl, it is still a fine language, if a bit awkward. Compared to other languages, it does feel quite ugly. I've always had a soft spot for Perl, as it was the language I used to make my first web site. I've been moving some legacy code away from Perl, and standardizing more of the organization than just my department into Python / Django. Python has a lot going for it in a lot of settings, and since we're in academia, it makes sense.
We're in Philadelphia, and something I've lamented is there's never been an active local Perl group. Just about every other highly-used language does (as in, the top 10 of the Tiobe Programming Index). PhillyPUG (Python), Philly.rb (Ruby), PyStar Philly (a women's Python learning group), PhillyDB... the list goes on and on.
Python is also the most consistently readable language I've used, and that goes beyond the forced indentation.
YMMV of course, but the major thing for me was having supportive, local communities supporting the language.
Perl. hands down.
alive to the universe, dead to the world
I read "check to see if the string is null or empty" as meaning "I don't care which". In practice, I've seen more uses for "I don't care which" than for distinguishing null from empty. In fact, a lot of cases call for not only treating null like the empty string but also disregarding leading and trailing spaces, and that's why I often end up using trim($some_string) in PHP or (some_string or '').strip() in Python.
Wow, this asswipe troll gets a +2, and I get moderated down to a -1 for posting something helpful? This site is hopeless now with the low quality troll moderators.
Another way to do it, supported by both existing static languages such as C++ and existing dynamic languages such as Python, involves constructing objects using factory functions and then using the language's facility for making objects comparable. Comparison expressions might look like intval($a) > intval($b) or strtotime($a) > strtotime($b).
PHP is not among my favorite languages, but it is clearly a viable choice for technical and practical reasons. It isn't exactly like the old days ("No one ever gets fired for choosing IBM") but it isn't far away either.
Also, PHP has the CLI, which is a reasonable choice for scripting in Linux shells. So hiring or training someone to use PHP for web development gets you the bonus that they can write other useful scripts too. This lets you avoid possibly less pleasant options such as Perl or BASH. Although I prefer Python or Scala for scripts if not using BASH, PHP is worth looking at for this.