From PHP to Ruby on Rails Transition from PHP to Ruby by Leveraging Your Existing Backend Programming Knowledge
Become a proficient Ruby developer and expand your skill set by exploring the world of Ruby from a PHP developer's perspective Key Features Understand the notable differences between Ruby and PHP development Gain practical experience and proficiency in Ruby by contrasting PHP examples with thei...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, England :
Packt Publishing
[2023]
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009790336806719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Dedication
- Contributors
- Table of Contents
- Part 1: From PHP to Ruby Basics
- Chapter 1: Understanding the Ruby Mindset and Culture
- Technical requirements
- Ruby is meant to be read as sentences
- Everything is an object
- Transitioning to Ruby
- Summary
- Chapter 2: Setting Up Our Local Environment
- Technical requirements
- Installing Ruby locally
- macOS users
- Windows users
- Linux users
- Using a virtual machine
- VMware
- VirtualBox
- Vagrant
- Using Docker
- Using rbenv
- Summary
- Chapter 3: Comparing Basic Ruby Syntax to PHP
- Technical requirements
- Running Ruby code from the command line
- Running a simple code file
- Loading a source code file with the load method
- Loading a source code file with the require method
- Ruby classes and modules
- The include method
- Interactive Ruby Shell (IRB)
- Exploring types of variables
- Arrays
- Hashes
- Symbols
- Using conditional statements
- The if statement
- The if-else statement
- The ternary operator
- Repeating code with loops
- Using Ruby language enhancements
- The unless sentence
- The until loop
- Automatic returns
- Optional parentheses
- Questionable exclamation method names
- Summary
- Chapter 4: Ruby Scripting versus PHP Scripting
- Technical requirements
- Beyond Hello World
- Text handling
- The upcase method
- The downcase method
- The capitalize method
- File manipulation
- The split() method
- The map() method
- The join() method
- Creating and modifying file contents
- Command-line arguments
- User input
- Putting it all together
- Summary
- Chapter 5: Libraries and Class Syntax
- Technical requirements
- Let's get ready to bundle!!!
- Installing a gem
- Gemfile versus composer.json
- Integrating libraries into your code in Ruby.
- Declaring classes in Ruby
- Objects in Ruby
- Attribute accessors
- Inheritance in Ruby
- Summary
- Chapter 6: Debugging Ruby
- Technical requirements
- Debugging functions in Ruby versus PHP
- Gems for debugging
- The debug gem
- The pry gem
- The byebug gem
- Understanding IRB's usefulness
- Summary
- Part 2: Ruby and the Web
- Chapter 7: Understanding Convention over Configuration
- Technical requirements
- If there is Ruby magic, there is Rails magic
- Installing Ruby on Rails
- Starting our Ruby on Rails project
- Rails file structure explained
- MVC at its finest
- POST, GET, and SESSION in Rails
- Summary
- Chapter 8: Models, DBs, and Active Record
- Technical requirements
- Generating models using Rails
- Rails migrations
- Connecting to a database
- The Rails console
- Active Record operations
- Creating records
- Selecting record(s)
- Updating records
- Deleting record(s)
- Summary
- Chapter 9: Bringing It All Together
- Technical requirements
- Project preparation
- Setting up our application
- Processing data
- Setting up the CRUD interface
- Listing data
- Updating data
- Creating data
- Deleting data
- Do not, I repeat, do not repeat yourself
- Summary
- Chapter 10: Considerations for Hosting Rails Applications versus PHP Applications
- Technical requirements
- PHP versus Rails in terms of price
- DIY or have it done for you
- Why nginx?
- Error gossip and last words
- Summary
- Index
- Other Books You May Enjoy.