Compare PHP vs Ruby (comparison and difference)
-· Easy Free software released under PHP license.
-· to learn (Short learning curve)
-· Large community of users and developers
-· 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
-· A great alternative for competitors like Microsoft’s ASP (Active Server Pages)
-· Can be deployed on most web servers
-· Works on almost every operating system and platform
-· Not suitable for making 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 secured than the other programming languages-· Zend
-· Yahoo
A 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.
1 2 3 | <?php // PHP code goes here ?>; |
-· Open-sourced
-· Works on multiple platforms
-· Can be embedded into Hypertext Mark-up 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
-· Has a clean and easy syntax that allows the new developer to learn Ruby very quickly and easily
-· Ability to write multi-threaded applications with a simple API
-· Offers advanced array class
-· Able to write external libraries in Ruby or C
-· Allows reserved word to be used as an identifier as long as the parser doesn’t perceive an ambiguity
-· Better security features
-· It has a debugger
-· It has flexible syntax
-· Powerful string handling-· Learning it can be difficult
-· Lacks informational resources
-· Slower processing time (CPU time) compared to other programming languages
-· Development and updates are slower
-· Google Sketch up
-· 37signals
-· GitHub
-· Shopify
-· Indiegogo
-· Basecamp
All Ruby files will have extension .rb. Using the Ruby interpreter available in /usr/bin directory, you can run Ruby codes.
1 2 | #!/usr/bin/ruby -w puts &amp;quot;Put something here&amp;quot;; |
Once you get passionate about development, you have to realize that you'll never stop learning. In a way, as technology evolves so rapidly, you need to get used to be an eternal novice. The point is being able to learn quickly, display adaptability and being passionate. Back to the question, depending on your level of knowledge of general programming, web specific languages like HTML and CSS and databases you may need from a few weeks to several months to reach a level that allows you to build a fully functional web application of average complexity with PHP. As a passionate Ruby on Railer, my personal opinion is that you may want to start with PHP if that is your first experience with web development. PHP is in fact a good language to explore the basis of server side web development. As soon as you are able to get a few things done in plain PHP, you will probably understand better how Rails (or your framework of choice) can dramatically improve your productivity and the quality of your output. Remember that Ruby on Rails, differently from PHP, is not a programming language. It is a framework built on Ruby language. As such, it helps you doing common things without having to code them every single time from scratch. Still, to make good use of it, you need first to understand what's happening at a lower level. for more visit : http://www.valuecoders.com/blog/