1stwebdesigner |
PHP vs Ruby vs Python: Three Programming Languages in a Nutshell Posted: 30 May 2014 06:00 AM PDT There are lots programming languages out there and each works to do specific and unique tasks. Each language has a unique set of keywords and special syntaxes for organizing program commands. In today’s article, we’re going to take a look at the three popular languages: PHP vs Ruby vs Python. We will check how they work, how they differ from each other, who uses them and how popular each language is. At the end of this article, you will have the idea which one to learn and which the best option for each specific task is.
PHP: Most Popular Scripting Language for the WebPHP (Hypertext PreProcessor) is a server scripting language designed by Rasmus Leodorf, a powerful tool to create dynamic and interactive websites. It is fast, flexible, widely-used scripting language for everything from a simple blog to the most popular and dynamic websites in the world. Advantages of PHP
Disadvantages of PHP
Who Uses PHP?PopularityAccording to Wikipedia, as of January 2013, PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers. SyntaxA PHP script starts with < ?php and ends with ?> The default file extension for PHP files is “.php”. A PHP file usually contains HTML tags, and some PHP scripting code. <?php // PHP code goes here ?> Ruby: Interpreted, Pure Object-Oriented Programming LanguageRuby (programming language) runs with Ruby on Rails or simply rails, an open source, full-stack web application framework. It is a dynamic, imperative object-oriented programming language developed by Yukihiro Matsumoto in Japan. It was influenced by Perl, Eiffel and Smalltalk. It a has dynamic type system and automatic memory management. Advantages of Ruby
Disadvantages of Ruby
Who uses Ruby?PopularityAccording to the Ruby website, it is ranked among the top 10 on most popular programming languages worldwide (such as the TIOBE index). Much of the growth is attributed to the popularity of software written in Ruby, particularly the Ruby on Rails web framework. SyntaxAll Ruby files will have extension “.rb.” Using the Ruby interpreter available in /usr/bin directory, you can run Ruby codes. #!/usr/bin/ruby -w puts "Put something here"; Python: General Purpose Programming LanguagePython is a widely-used high level (but it also used in a wide range of non-scripting language) design for programmers to express concepts with fewer lines of code. It was conceived in the late 1980s and was implemented by Guido van Rossum. Python code resembles the pseudo-code just like all the scripting languages. The elegant design and syntax rules of this programming language make it quite readable even among the multi-programmer development teams. It supports multiple ways of building the structure and elements of computer programs, including object-oriented and functional programming. Advantages of Python
Disadvantages of Python
Who uses Python?PopularityAccording to Wikipedia, since 2008, Python has consistently ranked in the top eight most popular programming languages as measured by the TIOBE Programming Community Index. It is the third most popular language whose grammatical syntax is not predominantly based on C, e.g. C++, C#, Objective-C, Java. SyntaxInvoking the interpreter without passing a script file as a parameter brings up the following prompt: $ python Python 2.4.3 (#1, Nov 11 2010, 13:34:43) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> Typing the some text to the right of the Python prompt and press the Enter key will output the text: >>> print "Put some text here!"; Job DemandBased on Jobs Tractor which analyzed more than 45,000 developer jobs advertised on Twitter during the past 12 months, the results are the following:
Although PHP still has the higher statistics on this site, remember not to use statistics as the basis for learning or using a programming language. So Which Is the Best Programming Language to Use and Learn?The answer you’ll have from the most of the programmers is: “You can do everything with all of them”. All of them are good options. There is no real good or bad answer. It always depends on what you want to accomplish. If you take a step to learn a programming language, chances are, you will use built-in frameworks to use for your projects. Basically, a web framework makes it easier for you to develop your application. Most sites have a common set of functionality (like handling sessions and data validation) and a framework is something that prevents you from re-writing this each time you create a website. PHP has several number of developed CMS frameworks available if you already dived in learning it. The most popular PHP CMS are WordPress, Joomla, and Drupal with most of them having loads of plugins. You can write new ones easily with a few days of patience and going through the tutorials. There are others that are quite good too, but using the popular ones increases your probability of finding support quickly or finding that plugin you might need. For Python, there is the Django and CherryPy web framework, which give you quite a good tool kit. If you go for Ruby, I think you’ll be a bit more limited (since that the language is newer) but the its basic framework is Rails. You also need to consider which language offers the best support so that you can find answers quickly in case you encounter problems with your codes.
And that’s it. Hope you had an overview about which programming language to learn. I believe you also have your own views. We want to hear from you. Leave a comment about what you think. |
You are subscribed to email updates from 1stwebdesigner To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |