Record:   Prev Next
作者 Rege, Gautam
書名 Ruby and MongoDB Web Development Beginner's Guide
出版項 Olton : Packt Publishing, Limited, 2012
©2012
國際標準書號 9781849515030 (electronic bk.)
9781849515023
book jacket
版本 1st ed
說明 1 online resource (428 pages)
text txt rdacontent
computer c rdamedia
online resource cr rdacarrier
附註 Intro -- Ruby and MongoDB Web Development Beginner's Guide -- Table of Contents -- Ruby and MongoDB Web Development Beginner's Guide -- Credits -- About the Author -- Acknowledgement -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- Understanding NoSQL -- Brewer's CAP theorem -- What are BASE databases? -- Using ACID or BASE? -- Using Ruby -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Time for action - heading -- What just happened? -- Pop quiz - heading -- Have a go hero - heading -- Reader feedback -- Customer support -- Downloading the example code -- Errata -- Piracy -- Questions -- 1. Installing MongoDB and Ruby -- Installing Ruby -- Using RVM on Linux or Mac OS -- The RVM games -- The Windows saga -- Using rbenv for installing Ruby -- Installing MongoDB -- Configuring the MongoDB server -- Starting MongoDB -- Stopping MongoDB -- The MongoDB CLI -- Understanding JavaScript Object Notation (JSON) -- Connecting to MongoDB using Mongo -- Saving information -- Retrieving information -- Deleting information -- Exporting information using mongoexport -- Importing data using mongoimport -- Managing backup and restore using mongodump and mongorestore -- Saving large files using mongofiles -- bsondump -- Installing Rails/Sinatra -- Summary -- 2. Diving Deep into MongoDB -- Creating documents -- Time for action - creating our first document -- What just happened? -- NoSQL scores over SQL databases -- Using MongoDB embedded documents -- Time for action - embedding reviews and votes -- What just happened? -- Have a go hero - adding more embedded objects to the book -- Fetching embedded objects -- Using MongoDB document relationships -- Time for action - creating document relations
What just happened? -- Comparing MongoDB versus SQL syntax -- Using Map/Reduce instead of join -- Understanding functional programming -- Building the map function -- Time for action - writing the map function for calculating vote statistics -- What just happened? -- Building the reduce function -- Time for action - writing the reduce function to process emitted information -- What just happened? -- Understanding the Ruby perspective -- Setting up Rails and MongoDB -- Time for action - creating the project -- What just happened? -- Understanding the Rails basics -- Using Bundler -- Why do we need the Bundler -- Setting up Sodibee -- Time for action - start your engines -- What just happened? -- Setting up Mongoid -- Time for action - configuring Mongoid -- What just happened? -- Building the models -- Time for action - planning the object schema -- Building the book model -- What just happened? -- Have a go hero - building the remaining models -- Testing from the Rails console -- Time for action - putting it all together -- What just happened? -- Have a go hero - adding more books, authors, and categories -- Understanding many-to-many relationships in MongoDB -- Using embedded documents -- Time for action - adding reviews to books -- What just happened? -- Choosing whether to embed or not to embed -- Time for action - embedding Lease and Purchase models -- Working with Map/Reduce -- Time for action - writing the map function to calculate ratings -- What just happened? -- Time for action - writing the reduce function to process the emitted results -- What just happened? -- Using Map/Reduce together -- Time for action - working with Map/Reduce using Ruby -- What just happened? -- Pop quiz - swimming in MongoDB and Ruby -- Summary -- 3. MongoDB Internals -- Understanding Binary JSON -- Fetching and traversing data -- Manipulating data
What is ObjectId? -- Documents and collections -- Capped collections -- Dates in MongoDB -- JavaScript and MongoDB -- Time for action - writing our own custom functions in MongoDB -- Ensuring write consistency or "read your writes -- How does MongoDB use its memory-mapped storage engine? -- Advantages of write-ahead journaling -- Global write lock -- Transactional support in MongoDB -- Understanding embedded documents and atomic updates -- Implementing optimistic locking in MongoDB -- Time for action - implementing optimistic locking -- What just happened? -- Choosing between ACID transactions and MongoDB transactions -- Why are there no joins in MongoDB? -- Pop quiz - the dos and don'ts of MongoDB -- Summary -- 4. Working Out Your Way with Queries -- Searching by fields in a document -- Time for action - searching by a string value -- What just happened? -- Have a go hero - search for books from an author -- Querying for specific fields -- Time for action - fetching only for specific fields -- What just happened? -- Have a go hero - including and excluding fields -- Using skip and limit -- Time for action - skipping documents and limiting our search results -- What just happened? -- Have a go hero - paginating document results -- Writing conditional queries -- Using the or operator -- Time for action - finding books by name or publisher -- What just happened? -- Writing threshold queries with gt, lt, ne, lte, and gte -- Time for action - finding the highly ranked books -- Have a go hero - find books via rank -- Checking presence using exists -- Searching inside arrays -- Time for action - searching inside reviews -- What just happened? -- Searching inside arrays using in and nin -- Searching for exact matches using all -- Searching inside hashes -- Searching inside embedded documents -- Searching with regular expressions
Time for action - using regular expression searches -- What just happened? -- Have a go hero - validate an e-mail address -- Pop quiz - searching the right way -- Summary -- 5. Ruby DataMappers: Ruby and MongoDB Go Hand in Hand -- Why do we need Ruby DataMappers -- The mongo-ruby-driver -- Time for action - using mongo gem -- What just happened? -- The Ruby DataMappers for MongoDB -- MongoMapper -- Mongoid -- Setting up DataMappers -- Configuring MongoMapper -- Time for action - configuring MongoMapper -- What just happened? -- Have a go hero - creating models using MongoMapper -- Configuring Mongoid -- Time for action - setting up Mongoid -- What just happened? -- Creating, updating, and destroying documents -- Defining fields using MongoMapper -- Defining fields using Mongoid -- Creating objects -- Time for action - creating and updating objects -- What just happened? -- Using finder methods -- Using find method -- Using the first and last methods -- Using the all method -- Using MongoDB criteria -- Executing conditional queries using where -- Time for action - fetching using the where criterion -- What just happened? -- Revisiting limit, skip, and offset -- Understanding model relationships -- The one to many relation -- Time for action - relating models -- Using MongoMapper -- Using Mongoid -- What just happened? -- The many-to-many relation -- Time for action - categorizing books -- MongoMapper -- Mongoid -- Accessing many-to-many with MongoMapper -- Accessing many-to-many relations using Mongoid -- What just happened? -- The one-to-one relation -- Using MongoMapper -- Using Mongoid -- Time for action - adding book details -- What just happened? -- Have a go hero - create the other models -- Understanding polymorphic relations -- Implementing polymorphic relations the wrong way -- Implementing polymorphic relations the correct way
Single Collection Inheritance -- Time for action - managing the driver entities -- What just happened? -- Basic polymorphic relations -- Time for action - creating vehicles using basic polymorphism -- What just happened? -- Choosing SCI or basic polymorphism -- Using embedded objects -- Time for action - creating embedded objects -- Using MongoMapper -- Using Mongoid -- What just happened? -- Using MongoMapper -- Using Mongoid -- Reverse embedded relations in Mongoid -- Time for action - using embeds_one without specifying embedded_in -- What just happened? -- Time for action - using embeds_many without specifying embedded_in -- What just happened? -- Understanding embedded polymorphism -- Single Collection Inheritance -- Time for action - adding licenses to drivers -- What just happened? -- Basic embedded polymorphism -- Time for action - insuring drivers -- What just happened? -- Have a go hero -- Choosing whether to embed or to associate documents -- Mongoid or MongoMapper - the verdict -- Pop quiz - Mongoid, MongoMapper, and more -- Summary -- 6. Modeling Ruby with Mongoid -- Developing a web application with Mongoid -- Setting up Rails -- Time for action - setting up a Rails project -- What just happened? -- Setting up Sinatra -- Time for action - using Sinatra professionally -- What just happened? -- Understanding Rack -- Defining attributes in models -- Accessing attributes -- Indexing attributes -- Unique indexes -- Background indexing -- Geospatial indexing -- Sparse indexing -- Dynamic fields -- Time for action - adding dynamic fields -- What just happened? -- Localization -- Time for action - localizing fields -- What just happened? -- Using arrays and hashes in models -- Embedded objects -- Defining relations in models -- Common options for all relations -- :class_name option -- :inverse_of option -- :name option
Relation-specific options
Create dynamic web applications by combining the power of Ruby and MongoDB with this book and ebook
Description based on publisher supplied metadata and other sources
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2020. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries
鏈接 Print version: Rege, Gautam Ruby and MongoDB Web Development Beginner's Guide Olton : Packt Publishing, Limited,c2012 9781849515023
主題 Antisense nucleic acids -- Therapeutic use.;Cancer -- Chemotherapy
Electronic books
Record:   Prev Next