Categories
Ebooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Computer in the office
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Multimedia trainings
- Real estate
- Persuasion and NLP
- Taxes
- Social policy
- Guides
- Presentations
- Leadership
- Public Relation
- Reports, analyses
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
E-press
- Architektura i wnętrza
- Biznes i Ekonomia
- Home and garden
- E-business
- Finances
- Personal finance
- Business
- Photography
- Computer science
- HR & Payroll
- Computers, Excel
- Accounts
- Culture and literature
- Scientific and academic
- Environmental protection
- Opinion-forming
- Education
- Taxes
- Travelling
- Psychology
- Religion
- Agriculture
- Book and press market
- Transport and Spedition
- Healthand beauty
-
History
-
Computer science
- Office applications
- Data bases
- Bioinformatics
- IT business
- CAD/CAM
- Digital Lifestyle
- DTP
- Electronics
- Digital photography
- Computer graphics
- Games
- Hacking
- Hardware
- IT w ekonomii
- Scientific software package
- School textbooks
- Computer basics
- Programming
- Mobile programming
- Internet servers
- Computer networks
- Start-up
- Operational systems
- Artificial intelligence
- Technology for children
- Webmastering
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Narrative poetry
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
School textbooks
-
Popular science and academic
- Archeology
- Bibliotekoznawstwo
- Cinema studies
- Philology
- Polish philology
- Philosophy
- Finanse i bankowość
- Geography
- Economy
- Trade. World economy
- History and archeology
- History of art and architecture
- Cultural studies
- Linguistics
- Literary studies
- Logistics
- Maths
- Medicine
- Humanities
- Pedagogy
- Educational aids
- Popular science
- Other
- Psychology
- Sociology
- Theatre studies
- Theology
- Economic theories and teachings
- Transport i spedycja
- Physical education
- Zarządzanie i marketing
-
Guides
-
Game guides
-
Professional and specialist guides
-
Law
- Health and Safety
- History
- Road Code. Driving license
- Law studies
- Healthcare
- General. Compendium of knowledge
- Academic textbooks
- Other
- Construction and local law
- Civil law
- Financial law
- Economic law
- Economic and trade law
- Criminal law
- Criminal law. Criminal offenses. Criminology
- International law
- International law
- Health care law
- Educational law
- Tax law
- Labor and social security law
- Public, constitutional and administrative law
- Family and Guardianship Code
- agricultural law
- Social law, labour law
- European Union law
- Industry
- Agricultural and environmental
- Dictionaries and encyclopedia
- Public procurement
- Management
-
Tourist guides and travel
- Africa
- Albums
- Southern America
- North and Central America
- Australia, New Zealand, Oceania
- Austria
- Asia
- Balkans
- Middle East
- Bulgary
- China
- Croatia
- The Czech Republic
- Denmark
- Egipt
- Estonia
- Europe
- France
- Mountains
- Greece
- Spain
- Holand
- Iceland
- Lithuania
- Latvia
- Mapy, Plany miast, Atlasy
- Mini travel guides
- Germany
- Norway
- Active travelling
- Poland
- Portugal
- Other
- Russia
- Romania
- Slovakia
- Slovenia
- Switzerland
- Sweden
- World
- Turkey
- Ukraine
- Hungary
- Great Britain
- Italy
-
Psychology
- Philosophy of life
- Kompetencje psychospołeczne
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Audiobooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Real estate
- Persuasion and NLP
- Taxes
- Guides
- Presentations
- Leadership
- Public Relation
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
History
-
Computer science
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
Popular science and academic
-
Guides
-
Professional and specialist guides
-
Law
-
Tourist guides and travel
-
Psychology
- Philosophy of life
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Videocourses
-
Data bases
-
Big Data
-
Biznes, ekonomia i marketing
-
Cybersecurity
-
Data Science
-
DevOps
-
For children
-
Electronics
-
Graphics/Video/CAX
-
Games
-
Microsoft Office
-
Development tools
-
Programming
-
Personal growth
-
Computer networks
-
Operational systems
-
Software testing
-
Mobile devices
-
UX/UI
-
Web development
-
Management
Podcasts
E-book details
Log in, If you're interested in the contents of the item.
PHP and MongoDB Web Development Beginner's Guide. Combine the power of PHP and MongoDB to build dynamic web 2.0 applications
Rahbirul Islam Rubayeet Rubayeet, Rubayeet Islam, MongoDB
Ebook
With the rise of Web 2.0, the need for a highly scalable database, capable of storing diverse user-generated content is increasing. MongoDB, an open-source, non-relational database has stepped up to meet this demand and is being used in some of the most popular websites in the world. MongoDB is one of the NoSQL databases which is gaining popularity for developing PHP Web 2.0 applications.PHP and MongoDB Web Development Beginner’s Guide is a fast-paced, hands-on guide to get started with web application development using PHP and MongoDB. The book follows a “Code first, explain later” approach, using practical examples in PHP to demonstrate unique features of MongoDB. It does not overwhelm you with information (or starve you of it), but gives you enough to get a solid practical grasp on the concepts.The book starts by introducing the underlying concepts of MongoDB. Each chapter contains practical examples in PHP that teache specific features of the database.The book teaches you to build a blogging application, handle user sessions and authentication, and perform aggregation with MapReduce. You will learn unique MongoDB features and solve interesting problems like real-time analytics, location-aware web apps etc. You will be guided to use MongoDB alongside MySQL to build a diverse data back-end.
With its concise coverage of concepts and numerous practical examples, PHP and MongoDB Web Development Beginner’s Guide is the right choice for the PHP developer to get started with learning MongoDB.
With its concise coverage of concepts and numerous practical examples, PHP and MongoDB Web Development Beginner’s Guide is the right choice for the PHP developer to get started with learning MongoDB.
- PHP and MongoDB Web Development
- Table of Contents
- PHP and MongoDB Web Development
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Support files, eBooks, discount offers and more
- Why Subscribe?
- Free Access for Packt account holders
- Support files, eBooks, discount offers and more
- Preface
- 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. Getting Started with MongoDB
- The NoSQL movement
- Types of NoSQL databases
- MongoDB A document-based NoSQL database
- Why MongoDB?
- Who is using MongoDB?
- MongoDB conceptsDatabases, collections, and documents
- Anatomy of document
- BSONThe data exchange format for MongoDB
- Similarity with relational databases
- Downloading, installing, and running MongoDB
- System requirements
- Time for action - downloading and running MongoDB on Windows
- What just happened?
- Installing the 64-bit version
- Time for action - downloading and running MongoDB on Linux
- What just happened?
- Installing MongoDB on OS X
- Configuring MongoDB
- Command-line parameters
- File-based configuration
- Have a go hero configure MongoDB to run with non-default settings
- Stopping MongoDB
- Hitting Control + C
- From the mongo shell
- Sending INT or TERM signal in UNIX
- Creating databases, collections, and documents
- Time for action - creating databases, collections, and documents
- What just happened?
- Pop Quiz - configuring MongoDB
- Installing the PHP driver for MongoDB
- Time for action - installing PHP driver for MongoDB on Windows
- What just happened?
- Installing the PHP-MongoDB driver on Unix
- Connecting to the MongoDB server from PHP
- Creating a PHP-Mongo connection
- Time for action - creating a connection to the MongoDB server from PHP
- What just happened?
- Configuring the PHP-MongoDB connection
- Specifying timeout for the connection attempt
- Have a go hero connect to a MongoDB server on a networked computer
- Summary
- The NoSQL movement
- 2. Building your First MongoDB Powered Web App
- A MongoDB powered blog
- Have the MongoDB server running
- Inserting documents in MongoDB
- Time for action - building the Blog Post Creator
- What just happened?
- Creating databases and collections implicitly
- Performing safe' inserts
- Benefits of safe inserts
- Specifying a timeout on insert
- Setting the user generated _id
- The MongoDate object
- Have a go hero allow storing tags for an article
- Querying documents in a collection
- Time for action - retrieving articles from a database
- What just happened?
- The Mongo Query Language
- The MongoCursor object
- Conditional Queries
- Pop Quiz - what does this query do?
- Doing advanced queries in MongoDB
- Time for action - building the Blog Dashboard
- What just happened?
- Returning a subset of fields
- Sorting the query results
- Using count, skip, and limit
- Performing range queries on dates
- Have a go hero rewrite blogs.php
- Updating documents in MongoDB
- Time for action - building the Blog Editor
- What just happened?
- Optional arguments to the update method
- Performing 'upsert'
- Using update versus using save
- Using modifier operations
- Setting with $set
- Incrementing with $inc
- Deleting fields with $unset
- Renaming fields with $rename
- Have a go hero merge Blog editor and creator into a single module
- Deleting documents in MongoDB
- Time for action - deleting blog posts
- What just happened?
- Optional arguments to remove
- Managing relationships between documents
- Embedded documents
- Referenced documents
- Time for action - posting comments to blog posts
- What just happened?
- Embedded versus referenced Which one to use?
- Querying embedded objects
- Have a go hero get comments by username
- Summary
- 3. Building a Session Manager
- Understanding HTTP sessions
- Understanding PHP native session handling
- Time for action - testing native PHP session handling
- What just happened?
- Limitations of native PHP session handling
- Implementing session handling with MongoDB
- Extending session handling with session_set_save_handler
- The SessionManager class
- Time for action - building the SessionManager class
- What just happened?
- How the SessionManager works
- The constructor
- The open and close methods
- The read method
- The write method
- The destroy method
- The gc method
- Pop Quiz - what does session_destroy() do?
- Putting the SessionManager in action
- Time for action - putting SessionManager into action
- What just happened?
- Building the user authentication module
- Time for action - building the User class
- What just happened?
- Creating the login, logout, and user profile page
- Time for action - creating the login, logout, and profile page
- What just happened?
- Have a go hero implement user authentication in the blogging web app
- Using good session practices
- Setting low expiry times of session cookies
- Using session timeouts
- Setting proper domains for session cookies
- Checking for browser consistency
- Have a go hero store and verify User Agent in SessionManager
- Summary
- 4. Aggregation Queries
- Generating sample data
- Time for action - generating sample data
- What just happened?
- Understanding MapReduce
- Visualizing MapReduce
- Pop Quiz - MapReduce basics
- Performing MapReduce in MongoDB
- Time for action - counting the number of articles for each author
- What just happened?
- Defining the Map function
- Defining the Reduce function
- Applying the Map and Reduce
- Viewing the results
- Performing MapReduce on a subset of the collection
- Concurrency
- Performing MongoDB MapReduce within PHP
- Time for action - creating a tag cloud
- What just happened?
- Have a go hero repeat the earlier example with PHP
- Performing aggregation using group()
- Time for action - calculating the average rating per author
- What just happened?
- Grouping by custom keys
- MapReduce versus group()
- Have a go hero find the maximum and minimum rating for each author
- Pop Quiz - limitation of group()
- Listing distinct values for a field
- Time for action - listing distinct categories of articles
- What just happened?
- Using distinct() in mongo shell
- Counting documents with count()
- Summary
- 5. Web Analytics using MongoDB
- Why MongoDB is a good choice as a web analytics backend
- Logging with MongoDB
- Time for action - logging page visits with MongoDB
- What just happened?
- Capped collections
- Sorting in natural order
- Updating and deleting documents in a capped collection
- Specifying the size of a regular collection
- Convert a regular collection to a capped one
- Pop Quiz - capped collection
- Extracting analytics data with MapReduce
- Time for action - finding total views and average response time per blog post
- What just happened?
- The map, reduce, and finalize functions
- Displaying the result
- Running MapReduce in real time versus running it in the background
- Have a go hero find out usage share of browsers for the site
- Real-time analytics using MongoDB
- Time for action - building a real-time page visit counter
- What just happened?
- Have a go hero get unique page visits in real time
- Summary
- 6. Using MongoDB with Relational Databases
- The motivation behind using MongoDB and an RDBMS together
- Potential use cases
- Defining the relational model
- Time for action - creating the database in MySQL
- What just happened?
- Caching aggregation results in MongoDB
- Time for action - storing the daily sales history of products in MongoDB
- What just happened
- Benefits of caching queries in MongoDB
- Storing results of expensive JOINs
- Have a go hero replacing Views with MongoDB
- Using MongoDB for data archiving
- Time for action - archiving old sales records in MongoDB
- What just happened?
- Challenges in archiving and migration
- Dealing with foreign key constraints
- Preserving data types
- Storing metadata in MongoDB
- Time for action - using MongoDB to store customer metadata
- What just happened?
- Problems with using MongoDB and RDBMS together
- Summary
- The motivation behind using MongoDB and an RDBMS together
- 7. Handling Large Files with GridFS
- What is GridFS?
- The rationale of GridFS
- The specification
- Advantages over the filesystem
- Pop Quiz - what is the maximum size of BSON objects?
- Storing files in GridFS
- Time for action - uploading images to GridFS
- What just happened?
- Looking under the hood
- Have a go hero perform multiple file uploads in GridFS
- Serving files from GridFS
- Time for action - serving images from GridFS
- What just happened?
- Updating metdata of a file
- Deleting files
- Have a go hero create an image gallery with GridFS
- Reading files in chunks
- Time for action - reading images in chunks
- What just happened?
- When should you not use GridFS
- Summary
- What is GridFS?
- 8. Building Location-aware Web Applications with MongoDB and PHP
- A geolocation primer
- Methods to determine location
- Pop Quiz - locating a smartphone
- Detecting the location of a web page visitor
- The W3C Geolocation API
- Browsers that support geolocation
- The W3C Geolocation API
- Time for action - detecting location with W3C API
- What just happened?
- The Geolocation object
- The getCurrentPosition() method
- Drawing the map using the Google Maps API
- Geospatial indexing
- Time for action - creating geospatial indexes
- What just happened?
- Geospatial indexing Important things to know
- Performing location queries
- Time for action - finding restaurants near your location
- What just happened?
- The geoNear() command
- Bounded queries
- Geospatial haystack indexing
- Time for action - finding nearby restaurants that serve burgers
- What just happened?
- Summary
- A geolocation primer
- 9. Improving Security and Performance
- Enhancing query performance using indexes
- Time for action - creating an index on a MongoDB collection
- What just happened?
- The _id index
- Unique indexes
- Compound keys indexes
- Indexing embedded document fields
- Indexing array fields
- Deleting indexes
- When indexing cannot be used
- Indexing guidelines
- Choose the keys wisely
- Keep an eye on the index size
- Avoid using low-selectivity single key indexes
- Be aware of indexing costs
- On a live database, run indexing in the background
- Pop Quiz - the indexing MCQ test
- Have a go hero implement search in the blogging application
- Optimizing queries
- Explaining queries using explain()
- Optimization rules
- Have a go hero compare outputs of explain() for indexed and non-indexed queries
- Using hint()
- Profiling queries
- Understanding the output
- Optimization rules
- Explaining queries using explain()
- Securing MongoDB
- Time for action - adding user authentication in MongoDB
- What just happened?
- Creating an admin user
- Creating regular user
- Viewing, changing, and deleting user accounts
- User authentication through PHP driver
- Have a go hero modify DBConnection class to add user authentication
- Filtering user input
- Running MongoDB server in a secure environment
- Ensuring data durability
- Journaling
- Performance
- Using fsync
- Replication
- Pop Quiz - flushing data to disk
- Journaling
- Summary
- 10. Easy MongoDB Administration with RockMongo and phpMoAdmin
- Administering MongoDB with RockMongo
- Time for action - installing RockMongo on your computer
- What just happened?
- Exploring data with RockMongo
- Querying
- Updating, deleting, and creating documents
- Importing and exporting data
- Viewing stats
- Miscellaneous
- Using phpMoAdmin to administer MongoDB
- Time for action - installing phpMoAdmin on your computer
- What just happened?
- Viewing databases and collections
- Querying documents
- Saving and deleting objects
- Importing and exporting data
- Viewing stats
- Other features
- RockMongo versus phpMoAdmin
- The verdict
- Summary
- A. Pop Quiz Answers
- Chapter 1, Getting Started with MongoDB
- Chapter 2, Building your First MongoDB Powered Web App
- Chapter 3, Building a Session Manager
- Chapter 4, Aggregation Queries
- Chapter 5, Web Analytics using MongoDB
- Chapter 7, Handling Large Files with GridFS
- Chapter 8, Building Location-aware Web Applications with MongoDB and PHP
- Chapter 9, Improving Security and Performance
- Index
- Title: PHP and MongoDB Web Development Beginner's Guide. Combine the power of PHP and MongoDB to build dynamic web 2.0 applications
- Author: Rahbirul Islam Rubayeet Rubayeet, Rubayeet Islam, MongoDB
- Original title: PHP and MongoDB Web Development Beginner's Guide. Combine the power of PHP and MongoDB to build dynamic web 2.0 applications
- ISBN: 9781849513630, 9781849513630
- Date of issue: 2011-11-25
- Format: Ebook
- Item ID: e_3cr3
- Publisher: Packt Publishing