Tuesday, February 27, 2018

Learn PHP / Ruby / Python?

I was browsing through few learning sites, forums and discussions – One prominent topic where everyone is trying to debate “Which is the best programming technology for web App” considering the current scenario of technology;  Unfortunately, choosing a programming language can be a major hurdle. It’s been a couple of weeks I was going the knowledge-base across and multiple discussion with people who worked on these. I'm sharing all the info I got in form of comparison. There are various aspects we need to consider before comparison and some many deny that comparison itself,  I just picked these three because of the popularity and trend of these three across the industry.

Now the entire comparison will provide you clarity on 3 points:
  • History and background
  • Why it’s used
  • Advantages and Disadvantages

In the conclusion will share my views on what's best for you to use or learn

A brief background, along with advantages and disadvantages - rather I call benefits and limitations 


PHP
Ruby
Python

server-side scripting language
server-side web application framework
Interpreted high-level programming language for general-purpose programming
Introduced by
Rasmus Lerdorf
David Heinemeier Hansson
Guido van Rossum
First released  / appeared in
1995
2005
1991
Background
Developed as a personal homepage tool
Evolved from the  project management tool “Basecamp”
As a hobby, Rossum write an interpreter for the new scripting language he been thinking from a long time
Purpose
Create dynamic and interactive websites
Seamless database table creations, migrations, and scaffolding of views to enable rapid application development
Multi-paradigm programming language.

Current stable version
7.2.2 [Jan 31,2018]
5.1.5 [Feb 14, 2018]
3.6.4  [Dec 19, 2017]
Popularly known for
Fast and flexible
Dynamic, Imperative object-oriented programming language 
General Purpose Programming Language

Market Share

3.4%
2.5%
5.1%
Who is using it [in popular]
Facebook / Wikipedia
Twitter / Groupon
Google /YouTube
Usability
Follows classic approach
Extensively documented
Elegant, powerful and expressive
Most readable programming language
Learning curve
Easy to learn
Needs to know at least one or 2 programming language
Highly recommended for new programmers and simple syntax
Popularity
1
3
2
Performance


Consume less memory and high performance
Advantages or Benefits 
  • Free
  • Easy to learn
  • Provides extensive database support
  • Offers great number of available extensions and source codes
  • Allows execution of code in restricted environments
  • Offers native session management and extension API
  • Can be deployed on most web servers
  • Works on almost all OS and platform

  • Open-sourced
  • Works on multiple platforms
  • Can be embedded into Hypertext Markup Language (HTML)
  • A Very High-Level Language (VHLL)
  • Offers encapsulation of data methods within objects
  • Pure OOP (Object-Oriented Programming)
  • Super advanced string and text manipulation techniques
  • Can easily be connected to DB2, MySQL, Oracle, and Sybase
  • Scalable and big programs written in Ruby are easily maintainable
  • Clean and easy syntax
  • Ability to write multi-threaded applications with a simple API
  • Offers advanced array class
  • Able to write external libraries in Ruby or C
  • Better security features
  • It has a debugger
  • It has flexible syntax
  • Easy and quick to learn
  • Runs on multiple systems and platforms
  • Readable and organized syntax
  • Offers rapid prototyping and dynamic semantics capabilities
  • Easily construct applications by testing and importing crucial functions
  • Reusability through carefully implementing packages and modules
  • Object-Oriented Programming-driven

Disadvantages or Limitations 
  • Not suitable for desktop applications
  • Error handling is traditionally poor
  • Global configuration parameters can change language semantics, complicating deployment and portability
  • Objects are CallByValue by default, which is the opposite of most languages and catches lots of programmers off-guard
  • Generally considered to be less secure than the other programming languages
  • Learning it can be difficult
  • Lacks informational resources
  • Slower processing time (CPU time) compared to other programming languages
  • Development and updates are slower

  • It doesn’t really do multi-processor/multi-core work very well
  • Smaller pool of Python developers compared to other languages, such as Java
  • Absence of a commercial support point, even for an Open Source project (though this situation is changing)
  • Database access layer limitations
  • Reputed to be slower than languages such as Java



If we look at the TIOBE Programming Community index which provides the popularity of programming languages index - It shows Python, PHP, and Ruby in the first 10 trending programming skills across the industry. So popularity is almost the same for the three.

Let's look few highlights on each and then jump to conclusion 

PHP: 
  • Is the popular, so help is easily available
  • Syntax is very similar to C and C++, provides ease to developers in adaptation 
  • Works well with most popular online database MySQL and also with many RDBMS
  • It can run both on Windows / Unix servers
  • As it's fully object-oriented language helps to build large and complex web applications

Ruby:
  • Contains many ready-made plugins and modules, which allow developers not to waste time [Time-efficient]
  • Need to follow standardized file storage and programming conventions that keep a project structured [Consistent]
  • It's an open source framework distributed under the MIT license [Cost-effective]
  • It comes with inbuilt Minitest tool, which will help in expectation syntax, test benchmarking, and mocking.
  • Encourages TDD
Python: 

  • Contains numerous third-party modules that makes it capable of interacting with most of the other languages and platforms
  • Provides large standard library, many high use programming tasks have already been scripted into the standard library
  • It's free to use and distribute, including for commercial purposes.
  • Learning Ease and Support Available
  • User-friendly Data Structures:

As most programmers will agree, all three will do everything and there's no Good / Bad to choose. It always depends on what you want to accomplish. For example:


After so much excitement, I'm not telling you any groundbreaking rule. So like in the above picture it always depends on what the goals you are trying to achieve in the project or scenario you are with.  I'm a fan of Python because its been on the web since 1995 and is a powerful scripting language with simple syntax, it's also easy to learn and easy to write. On the other hand, it's slower because it is an embedded language, runtime overhead can be a problem in larger applications. Also deploying Python web applications isn’t as straightforward as it is in other languages like PHP. So, Always remember it depends on your development needs, the scale of your application, necessity of the customer and many other underlying factors to determine the language you need to use. When you bring all of these factors together it's a purposeful discussion on which language to choose or best. 

Feel free to add your points and views, Thank you!! 

1 comment:

  1. Get all Technology and Programming Learn latest technology, software development skills, b.tech, MCA and BCA

    computer programming training.

    ReplyDelete