Should I consider Erlang for web mvc? [closed]
Want to improve this question? Update the question so it can be answered with facts and c开发者_StackOverflowitations by editing this post.
Closed 8 years ago.
Improve this questionCan I do that? I'm afraid that this can be an overkill and eventually I'll end up with much less productivity than with traditional stack like Ruby/Python/you name it. I understand that you will start with much lower productivity if you start to work with new technology but .. is it potentially worth trying and finally switch to Erlang as the only tool for web development and all the backend stuff.
Or is Erlang more suitable for only some high performance backend tasks?
Probably not.
Can you? Yes of course. Should you? Probably not.
If your goal is to learn a new language then sure, by all means do so. Best way to learn a language is to jump in and use it.
That said, established web frameworks and languages are popular for a reason, they work. Even more important, if you need people to work with you in the future, using a more obscure language narrows down the talent pool a ton. I've run into this problem a few times in the past, where something that started out as a learning exercise in language X ended up going into production. Then, once that developer moves on or into a different project, or the scale gets too large for a single developer, you are pretty much screwed at recruiting new talent.
As the comment from Jer said too, you really need to ask yourself why you would use Erlang for a web application. Certain tools and technologies are well geared towards certain tasks and some aren't. For example, a screwdriver is great at screwing in screws but is only a passable hammer.
Take a look at http://nitrogenproject.com/ it's a web framework based only on erlang.
Nitrogen is fine, but is not really mvc.
The question of weather you should use this or not really depends on your project. If you have other aspects of your project using Erlang, then the "nobody know Erlang" argument becomes moot.
It's still very hard to tell what level of adoption Erlang Web technologies will eventually reach, but Erlang in general is a solid platform and a very productive language once you understand it. The community is stronger than others will have you believe.
There is a reason that ejabberd is the canonical XMPP server and that rabbitmq is becoming the canonical AMQP server and that Damien Katz used it CouchDB. Erlang provides the best platform for distributed, scalable, fault tolerant servers, and web servers are no exception -- there is no reason to think wider adoption could not happen.
Actually yes can. For building REST APIs, I use WebMachine and for building web application, I really like Chicago Boss.
But it is really important to consider what are the requirements of your web applications. While it is true that Erlang enjoys a considerably good umbrella of third-party libraries, it is not on the bar with Ruby, Python or Java.
Productivity is different from one developer to another. One developer, could be really productive with SpringMVC. What I really care about is 'crafting' your system. And with Clojure and Erlang, I feel that I do craft my code.
The real question is whether you should consider MVC. The notion of MVC is a bit outdated in my opinion and only helps give the illusion of simplicity to clogged up frameworks.
If you want to have a lightweight framework or toolkit with the minimal touch that contributes to erlang's reputation for excellent performance, then yes consider erlang.
You should start by taking a look at Webmachine
Beside the specific answer focusing on web applications. Erlang.org get it's own estimates on productivities:
http://erlang.org/faq/how_do_i.html#idp32808400
5.16 ...estimate productivity in an Erlang project?
A rough rule of thumb is that about the same number of lines of code are produced per developer as in a C project. A reasonably complex problem involving distribution and fault tolerance will be roughly five times shorter in Erlang than in C.
The traditional ways of slowing down projects, like adding armies of consultants halfway through, spending a year writing detailed design specifications before any code is written, rigidly following a waterfall model, spreading development across several countries and holding team meetings to decide on the colour of the serviettes used at lunch work just as well for Erlang as for other languages.
I'm pretty sure you will be notable more productive in Python/Ruby than in Erlang, especially considering web development.
Speaking about Python which I'm dealing more with. Lots of libraries exist making most of web-related functionality easier to implement, tons of manuals are written covering almost every aspect of whatever you are planning to do.
Erlang is a tool for different tasks and it has a smaller community behind (for example, only one new answer appeared while I was writing mine; were it Python thread, there would be at least ten :)
精彩评论