ebook img

Learn Rails 5.2: Accelerated Web Development with Ruby on Rails PDF

438 Pages·2018·2.88 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Learn Rails 5.2: Accelerated Web Development with Ruby on Rails

Stefan Wintermeyer Learn Rails 5.2 Accelerated Web Development with Ruby on Rails Stefan Wintermeyer Bochum, Germany Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/9781484234884 . For more detailed information, please visit www.apress.com/source-code . ISBN 978-1-48423488-4 e-ISBN 978-1-4842-3489-1 https://doi.org/10.1007/978-1-4842-3489-1 Library of Congress Control Number: 2018939414 © Stefan Wintermeyer 2018 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. the material contained herein. Printed on acid-free paper Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800- SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. Für Oma und Opa. I dedicate this book to my grandparents. Preface I write for developers who learn best by following short, clean examples. I don’t like the idea of coding one big application over the course of a book; I much prefer smaller, stand-alone code. Therefore, you can skip a couple of pages or even complete chapters without losing context. On the other hand, I’ll frequently be asking you to create another new Rails application. A word of warning: I’m not going to sprinkle in CSS beauty anywhere. Don’t let people fool you into believing that Ruby on Rails is easy to learn. It’s not! It’s one of the best and most effective frameworks to develop web applications, but it takes time to understand and master. The worst mistake of all is to not learn Ruby before diving into Ruby on Rails. To avoid this, the book starts with the basics of Ruby. You will not become a Ruby guru after reading it, but you’ll understand the basic ideas, which is most important. Newsletter and Updates I publish a free Ruby on Rails e-mail newsletter that offers news and general information about Rails. You can subscribe at https://www.wintermeyer-consulting.de/newsletters/ . Additionally, you can follow me on Twitter at https://twitter.com/wintermeyer . Consulting and Training I provide Rails consulting and training anywhere in the world, on-site or remote. If you are interested, please contact me by e-mail at sw@wintermeyer- consulting.de . Meetups and Conferences Please don’t be shy if you’d like me to speak or offer a training session at your local meetup or conference; send me an e-mail, and I’ll try to make it happen. Feedback Two things in particular highlight my work as an author: five-star Amazon reviews and reader feedback offered by e-mail or Twitter. Please reach out and reviews and reader feedback offered by e-mail or Twitter. Please reach out and let me know what you thought of this book. Have fun with Ruby on Rails! —Stefan Wintermeyer Introduction This book requires basic knowledge of HTML, plus the reader (you, in other words!) should have a basic understanding of programming. I’m not going to teach you what variables are. I’m just using them. I work a lot with example code and not so much with abstract definitions. This is a technical book. Therefore, there are parts that are mind- blowingly boring. But I try to keep them to a minimum. Each chapter and most sections work autarkic. You don’t have to read the book in order, and you can skip chapters if they are not important to you. All code examples work without any dependencies on earlier chapters. I’m not going to build a gigantic application to show how cool Rails is. I prefer the approach of small projects to analyze and discuss specific topics. Table of Contents Chapter 1: Ruby Introduction Ruby 2.5 Basics Hello World puts and print Comments Help via ri irb Ruby Is Object-Oriented Methods Classes Basic Classes Strings Numbers Boolean Values and nil Variables Naming Conventions Scope of Variables Methods Once Again Method Chaining Getters and Setters Converting from One to the Other: Casting Method to_s for Your Own Classes Is + a Method? if Condition Shorthand else elsif Loops while and until Blocks and Iterators Arrays and Hashes Arrays Hashes Range Chapter 2: First Steps with Rails Environment (Development) SQLite3 Database Why Is It All in English? Static Content (HTML and Graphics Files)

Description:
Learn to build Rails-based web applications using all the latest features offered in Rails 5.2. Author Stefan Wintermeyer begins by teaching the basics of Ruby 2.5 before proceeding through all aspects of Rails, utilizing clean, succinct examples – rather than a single large application. This book
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.