Quick top level server language question
Right, so if you have to decide on a server-side language for a distributed Linux-based server backend, would you choose:
- PHP
- Mono ASP.net
- Java
- Python (I've just added this because Google use it)
As a C++ programmer, I'm thinking Java+Tomcat, but I'd love to hear experienced thoughts here, especially relating to debugging and IDE (likely Eclipse).
Also, pl开发者_JAVA百科ease, it's not a flame question. I'm seeing excellent sites written in all, I'm just thinking about the compile/debug/release cycle.
I'm effectively receiving some HTTP request, and performing a reasonably sophisticated server-side function in response. Sort of like a distributed, stateless RPC/REST system.
Cheers,
Shane
As a PHP programmer with some Java experience I don't recommend PHP. It's a powerful technology but it's full of rubbish and personally each day I hate it more and more.
I also vote for Java.
I would recommend Java on Jetty, as long as you stick to the Servlet standards, then switching the servlet container between Tomcat and Jetty should be fairly straight forward.
Have a look at restlet for rest support.
From the way things appear to me lately, you'll probably want to look at a Dependency Injection framework, so look at either spring or guice.
Logging frameworks ... probably slf4j.
Build scripts ... I like maven, but its not everyone's first choice. The learning curve can be a bit steep, although there may be some very useful archetypes, that can be used to set up an initial skeleton project structure.
You could use a maven archetype and then switch to using an ant build script.
If you choose not to use maven, I would encourage you to at least adopt the maven-style directory structure for your project layout.
Hmmm, having said all of that I wouldn't blame you for wondering how bad it could be to just do it the old way, like we used to with apache httpd and cgi scripts in C or perl.
Good Luck.
I'm not sure why you would jump to a new language for this. There are C++ libraries for writing server components and extensions. You might as well leverage your existing expertise.
Obviously, the details of the project may make that impractical, were we to know them.
Well I would only have to choose between:
- Java - Probably with a simple servlet to deal all the requests (supposing it is a small external API)
- Mono - Using Monorail (maybe ASP.NET MVC) supposing you don't need to expose SOAP web services
The troubling part is that you are not clear about if your server is also distributed (if your backend would be running in many servers at the same time), as that would mean some additional constraints that would narrow the language/technology choice, perhaps pointing to outside your initial list.
I'm a C# developer, and I don't think Mono is a great idea. Can be buggy sometimes.
When it comer to Linux, best go with "open" comunnity.
I vote for java
精彩评论