Sinatra Up and Running.pdf
(
6730 KB
)
Pobierz
Sinatra: Up and Running
Alan Harris and Konstantin Haase
Beijing
Cambridge
Farnham
Köln
Sebastopol
Tokyo
•
•
•
•
•
Sinatra: Up and Running
by Alan Harris and Konstantin Haase
Copyright © 2012 Alan Harris. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (
http://my.safaribooksonline.com
)
. For more information, contact our
corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com
.
Editors:
Simon St. Laurent and Mike Hendrickson
Production Editor:
Melanie Yarbrough
Proofreader:
Melanie Yarbrough
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Robert Romano
Revision History for the First Edition:
2011-11-21 First Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449304232
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc.
Sinatra: Up and Running
, the image of a whip-poor-will, and related trade dress are
trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-30423-2
[LSI]
1321480476
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Taking the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Characteristics of Sinatra
2
Is It a Framework?
2
Does It Implement MVC?
2
Who’s Using It?
3
What Does a Production Project Look Like?
3
What’s the Catch?
4
Are These Skills Transferrable?
4
Installation
4
Thin
4
Up and Running
5
Breaking Down the Syntax
6
Testing with Telnet
8
Rock, Paper, Scissors or “The Shape of Things to Come”
10
Summary
13
2.
Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Routing
15
Hypertext Transfer Protocol
16
Verbs
16
Common Route Definition
18
Many URLs, Similar Behaviors
19
Routes with Parameters
20
Routes with Query String Parameters
21
Routes with Wildcards
21
The First Sufficient Match Wins
21
Routes with Regular Expressions
22
Halting a Request
23
Passing a Request
23
iii
Plik z chomika:
Pinus000
Inne pliki z tego folderu:
Programming Ruby 1.9 3e - Pragmatic (2010).pdf
(7398 KB)
Pragmatic.The.Rails.View.Mar.2012.pdf
(8128 KB)
Pragmatic.Rails.Recipes.Rails.3.Edition.Mar.2012.pdf
(5597 KB)
Packtpub.Ruby.and.MongoDB.Web.Development.Beginners.Guide.Jul.2012.pdf
(4804 KB)
Packt.Cloning.Internet.Applications.With.Ruby.Aug.2010.eBook-ELOHiM.pdf
(8471 KB)
Inne foldery tego chomika:
-- ▣▣▣ ELEKTRONIKA ▣▣ ▬▬▬▬▬▬▬▬▬▬▬▬▬
Pliki dostępne do 08.07.2024
►Kurs Java
♦✔✔PROGRAMY✔✔♦
1080p
Zgłoś jeśli
naruszono regulamin