Can anyone tell the reasons for choosing a particular programming language over others for a project. I mean does this thought cross the minds at the design phases of a project, or all this stuff is just theoretical, and in reality people use whatever languages they are conversant with?
Some issues to note:
- Productivity of the language (including tools - IDE, debugger, etc)
- Employable set of people who have that particular language skills
- "popularity" of the language
- People in your organization who have the language skills
- difficulty in learning the language
- portability of the language/platform support
- applicability to the problem domain (I.E. device driver and python most likely is not a good idea)
There are others.
In some places I have seen horrible mandates on language choice by managers who did not understand new-fangled languages like C++ so they would only allow C. Or there are managers who believe all the hype and press and choose, for example, Ruby where it has no business being.
Most often it comes down to one that your organiation has competency with and is mostly suitable for the doamin.
If you want to incorporate a new language for your organization roll it out with test/small/trial projects.
It depends on a number of a factors.
If you're on a team, and coding a project in-house, you'll probably pick the language that the team is most conversant in.
If you're developing a project for a client, and the client has specified the language because you'll be handing the source code over to them, you'll use that language.
If you're trying to learn a new language, you'll use that language.
If you're a hobbyist with a favorite language, you'll use that.
Or any number of other reasons.
I don't know anyone who picks a technology in a vacuum based just on the project. Typically, your choices are limited by the technologies that you know and you need to ask yourself with the project is achievable given those technologies. If you have the ability to choose from more than one, you'll choose the one that best fits the project. For example, a project may be more amenable to a scripting solution so you would choose Perl or PowerShell.
If you the project isn't achievable with your current technology set, you either need to abandon it or learn one that will work. Say you absolutely need the highest performance so you may choose to pick up C or C++. Or, you may have existing solutions that it needs to integrate with or be using an external component that is easier to use from language/framework that you don't know. In both of those cases it may drive you away from the language you are most comfortable with.
The hard case is when you can do the project with the tools you know, but it would be much easier to do it with another technology set. Then you need to decide whether the pain of learning and maintaining another technology is worth the difference in development ease with the new technology.
- Does your project require speed? If so, use a lower-level language
- Do you want ease of use, a language with an incorporated library full of everything you need?
- Do you want a low-budget project? If so, use something everyone is more familiar with
- Are you working platform-independant? Again, if so, use a platform-free language perhaps Java?
There's a large array of factors which make the decision of language use.
I'd suggest a list of programming languages that roughly fit the bill and start writing down their pros and cons.
But usually its the language people are most comfortable with that does the trick.
Depending on your environment, there are several factors:
Does the organization have a mandate for what language(s) must be used?
What languages does the team know?
what are the goals of the project? Technology exploration? Proof of concept? Broadening technical skills? Rapid development of a production system?
Can the project schedule absorb the coming-up-to-speed overhead if the chosen language isn't well-known to all team members?
What are the available resources for learning the language?
What are the requirements and options for long-term maintenance of the project? Is it a throw-away? Will it need to have production support for ten years? Who in the organization has the skills to support it in the long term?
what is the payoff for choosing a candidate language? Does it offer some particular advantage that compensates for any learning curve? Is it "the best fit" for the deployment environment? Does it have a set of available libraries well-suited for the task?
As you can imagine, this list can be extended; the key IMHO is to look at the organization and the long-term vision for the project, not just the tastes of the current development team.
The language one is familiar with
The language that has all (or most of) necessary libraries freely available
- If the project is to be something new, not known yet, consider some language that allows fast prototyping (like Python). So you can do some quick draft and see what's going on there.
- The language with nice and friendly IDE (possibly also cheap one :-) ).
In most cases, the language is fixed not only because developer experience, but also application context - most applications need to interface with other applications, which is usually easier to do within the same language. These two points often merge and become entrenched, so that companies end up as a "Microsoft shop", or a "Java shop".
In the relatively rare case that you start a new project with no dependencies and have yet to hire developers, the main factors would be:
- How difficult/expensive is it to get enough programmers that are competent in a language, and/or how long does it take to become competent in it?
- What libraries or frameworks are there that could save you time?
- How "powerful" is the language?
Probably in that order.
As if the answers already provided don't already demonstrate what a complicated problem it is - bear in mind that a project need not be restricted to one language alone.
- You might choose to implement the project in a scripting language, then profile and create fast implementations of the performance-critical parts in a lower level compiled language
- You might write a high performance core engine in a low level language, embed a script engine and write the rest in the embedded script language (many video games do this)
- You might go SOA, in which case you can pick a different language for each service if you so choose
- You might be client-server, in which case the client and server can be written in different languages. Common case: web applications with Javascript.
Choosing languages for this kind of scenario, you have to think about the 'glue' that allows these languages to interact.
- Python and certain Scheme implementations are strong on embedability
- Perl has tools for writing modules in C
- Java has JNI for invoking compiled native code
- JRuby lets you use Ruby syntax to drive Java programs
- ... and much more
There are different criteria you should consider before your selection.
Firstly, categorize the web application type. You should realize the vastness of the application features and its complexity. If it is the simple content-based website, then you can use any pre-built open source like WordPress. If it is big e-commerce app, then Magento, Woocommerce, and opencart are some good preferences.
Secondly, development time limit. This is a very important factor. As quick as you can able to develop the app, you will get more time for marketing. If there is any pre-built similar application available, it will reduce the development time. Only some minor changes will be sufficient for the initial launch. In this case, you should be aware of how properly the pre-built application is documented and the easy availability of the expert developers who can do the necessary changes for you.
Thirdly, development budget. This is a major point behind the development platform selection. This is not a one-time investment. Its maintenance and future add-ons need regular developer support. So the availability of the expert developer and their charges is another major factor for selecting the right platform.
Fourth, application security. Get protected from all types of cyber threats and reducing the vulnerabilities of hacking. You should follow and go through all security guidelines before selecting the right programming platform. Fifth, application scalability. You should be aware of how much the application will be scalable for future advancement. Will it accommodate more user requests and whether will it be flexible enough to accept more add-ons without hampering its current performance?
Lastly, community support. It is quite obvious that during the development or future advancement, you will face various issues which may cause serious struggle if there is not enough community support available. You should not be worried if somebody else already has the solution to your current problem.
Now let me give you some idea about few popular programming platforms. First and foremost, PHP and its LAMP environment. Linux, Apache, MySQL, and PHP or in a short LAMP is the most popular one in this list. It is used not only for simple WordPress but also for complex systems so even Facebook utilizes it. It’s supported hosting cost is very cheap and other factors like quick deployment, affordable developers and huge available free open sources make its position top on the list.
The second one in the list is Python. It’s getting popularity due to faster development, deeper prototyping, simple syntax and good scalability. Lots of big applications are supported by Python including Instagram, Pinterest, Django, Google, NASA, Yahoo and many more.
The third one in the list is Ruby. Ruby on Rails framework has very simple structure and easy for developers. If you want to develop your web application from scratch, then Ruby could be one suggested option because it takes less time than other languages. Popular applications that are supported by Ruby include Shopify, Twitter, Groupon, etc.
The fourth one in the list is JAVA. It’s the most cross-platform language. Security, performance and dedicated development community is the most advantage of this programing language. But there is a huge con of JAVA is its development cost. Development is more expensive than in PHP or Python. Apart from that bigger projects can be difficult to compile and build using JAVA.
Fifth and last one in this list is C#. It’s not necessarily a web programming language. Instead, it’s a general programming language. ASP.NET web apps often feature a C# base. It’s security, performance, deployment and community support are awesome but the cost of development is way too high. You need to pay for everything and way too costly than the previous items in the list.
I hope the above decision-making criteria and programming languages list has given you a quick easy understanding of the right programming platform selection for your web application.
For more details, you can visit the video blog in the following link: https://www.tricksbysam.com/vlog/How-to-select-right-programming-platform-for-your-website.html
Also, it's important the platform you're developing on and the platform you're developing for. If it's an open source, personal project, then use the latest technology you can find so you can have some fun with it while learning something new that you know you ain't gonna use in your workplace on a short term. I for instance, made the same client app for KDE and GNOME,for the first I used Python, and for the second C# even when my day job is at a Java shop.
First of all, the components of code quality are familiarity with the task, with the language, and with the toolset available apart from the language. Once there is passable knowledge of a sane programming language, that is the least important element for productivity (if you need to be a wizard to get anything done, then that suggests that libraries or the language are not sane).
So, next of all, one would choose based on what support there is for the kinds of tasks one needs to do: in general, any environment that requires less boilerplate is going to be more productive.
Finally, one needs to consider the tradeoffs between using a new, more desirable element (language, tool, or library) as against the costs of doing that. If the team does that task all the time, then upgrading is likely to be valuable; by contrast if the team is in a state of chaos, the costs may be particularly high.
One thing that you SHOULD DEFINITELY consider and something that NONE of the other answers hit on is that you need the right tool for the job.
You should first ask yourself these things:
- What is my target platform? ex. Web, Console, Mobile (which ones), Windows, Linux, Multi-platform, Embedded system (controlling a drone)?
How fast does it need to get the job done? Maybe you do not need the ease of development accompanied with Java & C#, but you need the speed of good ole C programming language.
Does this application need REAL TIME processing? Do operations need to execute in normal wall clock time or do you care? ex. C++ can do this easily however Python is incapable.
After you answer these questions, I would then defer to the answer that @Tim posted https://stackoverflow.com/a/407241/5874935
I do agree 95% with picking a language that has a lot of community support. However, I completely disagree with picking a language that you already know for a project just for the sake that you already know it.
FOR INSTANCE, lets say that you're a Python programmer and the project that you are presented with needs REAL TIME capabilities... Well then Python would be a terrible choice that would hamstring the project for its entire life because it cant truly do real time processing.
It is best to try to stay as "programming language agnostic" to enable yourself to make the best engineering decisions possible for any given project.
If you don't know which language to choose, find someone with experience. It is meaningless for me (or anyone) to describe some algorithm for choosing a language. It's more a combination of gut feeling and experience than some flowchart-like decision.
来源:https://stackoverflow.com/questions/407227/how-to-select-a-programming-language-for-a-project