Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
From PHP to Ruby on Rails

You're reading from  From PHP to Ruby on Rails

Product type Book
Published in Dec 2023
Publisher Packt
ISBN-13 9781804610091
Pages 244 pages
Edition 1st Edition
Languages
Author (1):
Bernard Pineda Bernard Pineda
Profile icon Bernard Pineda
Toc

Table of Contents (15) Chapters close

Preface 1. Part 1:From PHP to Ruby Basics
2. Chapter 1: Understanding the Ruby Mindset and Culture 3. Chapter 2: Setting Up Our Local Environment 4. Chapter 3: Comparing Basic Ruby Syntax to PHP 5. Chapter 4: Ruby Scripting versus PHP Scripting 6. Chapter 5: Libraries and Class Syntax 7. Chapter 6: Debugging Ruby 8. Part 2:Ruby and the Web
9. Chapter 7: Understanding Convention over Configuration 10. Chapter 8: Models, DBs, and Active Record 11. Chapter 9: Bringing It All Together 12. Chapter 10: Considerations for Hosting Rails Applications versus PHP Applications 13. Index 14. Other Books You May Enjoy

Summary

In this chapter, we covered the syntactic differences and similarities between PHP and Ruby, Ruby’s tools for readability, and Ruby’s syntactic flexibility. We also learned about the question mark (?) and the exclamation or bang symbol (!). Making it this far means that you are indeed trying to reuse your previous programming skills but with a new language: Ruby. This is a great start because you can skip one of the most difficult parts of learning a new language from scratch: the logical part. And while we’ve only seen the surface of Ruby, more importantly, we got a clear glimpse of how Ruby developers think when they’re writing code. We learned that to a Ruby developer, readability comes first. We not only use syntax and language constructs to make this possible but we also use objects to increase the code’s legibleness. The more it reads like a sentence, the better. We looked at some simple examples of Ruby, and while you could follow along, it was not the purpose of the exercise. It was more to pique your interest.

To move along on this learning path, we now need the proper tools to start writing and running Ruby code. In the next chapter, we will look at the different ways to install Ruby and set up our local environment so that we can start learning real examples of Ruby, and eventually follow along in the process.

You have been reading a chapter from
From PHP to Ruby on Rails
Published in: Dec 2023 Publisher: Packt ISBN-13: 9781804610091
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}