Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
PHP and MongoDB Web Development Beginner's Guide
PHP and MongoDB Web Development Beginner's Guide

PHP and MongoDB Web Development Beginner's Guide: Combine the power of PHP and MongoDB to build dynamic web 2.0 applications

$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (11 Ratings)
Paperback Nov 2011 292 pages 1st Edition
eBook
$9.99 $28.99
Paperback
$48.99
$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (11 Ratings)
Paperback Nov 2011 292 pages 1st Edition
eBook
$9.99 $28.99
Paperback
$48.99
eBook
$9.99 $28.99
Paperback
$48.99

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

PHP and MongoDB Web Development Beginner's Guide

Left arrow icon Right arrow icon

Key benefits

  • Learn to build PHP-powered dynamic web applications using MongoDB as the data backend
  • Handle user sessions, store real-time site analytics, build location-aware web apps, and much more, all using MongoDB and PHP
  • Full of step-by-step instructions and practical examples, along with challenges to test and improve your knowledge

Description

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.

Who is this book for?

This book assumes that you are experienced in web application development using PHP, HTML, and CSS. Having working knowledge of using a relational database system such as MySQL will help you grasp some of the concepts quicker, but it is not strictly mandatory. No prior knowledge of MongoDB is required.

What you will learn

  • Get MongoDB up and running on the machine (Windows/Mac/Linux)
  • Build a PHP-powered website with MongoDB as the data storage
  • Handle HTTP sessions with MongoDB
  • Store website analytics data in real time
  • Process large datasets with MapReduce
  • Use MongoDB to supplement your existing relational database‚Äì build data archives, cache tiers, store results of expensive SQL queries in MongoDB
  • Build location-aware web applications
  • Optimize MongoDB for better performance and security
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2011
Length: 292 pages
Edition : 1st
Language : English
ISBN-13 : 9781849513623
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Nov 25, 2011
Length: 292 pages
Edition : 1st
Language : English
ISBN-13 : 9781849513623
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 75.98
Instant MongoDB
$26.99
PHP and MongoDB Web Development Beginner's Guide
$48.99
Total $ 75.98 Stars icon

Table of Contents

12 Chapters
1. Getting Started with MongoDB Chevron down icon Chevron up icon
2. Building your First MongoDB Powered Web App Chevron down icon Chevron up icon
3. Building a Session Manager Chevron down icon Chevron up icon
4. Aggregation Queries Chevron down icon Chevron up icon
5. Web Analytics using MongoDB Chevron down icon Chevron up icon
6. Using MongoDB with Relational Databases Chevron down icon Chevron up icon
7. Handling Large Files with GridFS Chevron down icon Chevron up icon
8. Building Location-aware Web Applications with MongoDB and PHP Chevron down icon Chevron up icon
9. Improving Security and Performance Chevron down icon Chevron up icon
10. Easy MongoDB Administration with RockMongo and phpMoAdmin Chevron down icon Chevron up icon
A. Pop Quiz Answers Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(11 Ratings)
5 star 54.5%
4 star 18.2%
3 star 18.2%
2 star 9.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Edgar martinez Dec 12, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
awesome book. I recommend it to anyone coding in php who wants to use mongo and get started right away I was playing with php and mongo in chapter 1. Great book. I loved getting started very quickly. Mongo is very easy and you can rapidly see where the benefits would be 5 star book for sure.
Amazon Verified review Amazon
cedub Feb 17, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I enjoyed reading and building along with the book "PHP and MongoDB Web Development". The book is logically organized and contains many helpful hints and tutorials. I felt the content appropriately addressed the target audience, individuals with some background in web development looking to increase their exposure to a new technology. For me, the best part of the book is the useful examples and exercises, specifically using MongoDB to implement a session manager for clustered web applications, geospacial indexing, and web analytics with asynchronous writes. I found the exercises given in the book to be very relevant to the strengths of MongoDB. Furthermore, the book gives a good introduction to the Map/Reduce concept and provides good examples for those who may not be familiar with it. I thought the author did a nice job of illustrating the fact that while MongoDB has many benefits, it's not the perfect fit for every need. There are even times when it can and should be used with a relational database system and the author gives examples of when this would be an effective use and when it would not. The book provides good resources for those readers wanting to delve a bit deeper into more advanced uses and aspects of MongoDB. Overall, I found "PHP and MongoDB Web Development" to be an excellent reference for building applications with MongoDB. I would, and will, recommend this book to all of my developer colleagues.
Amazon Verified review Amazon
Fran Jan 18, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I learned fast and without problems. Of course Im going to need to read something more, bit the balance between time, effort, money and acknowledge is very positive.
Amazon Verified review Amazon
Joe Feb 29, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I found this book to be very informative for someone who is interested in MongoDB and wants to learn the type of database architecture MongoDB supports. This book has a web-centric view where it shows step-by-step examples that anyone can follow. Every chapter has a review of what is covered in the chapter, and plenty of examples to illustrate the author's points.My take on this subject is from the Database Administrator point of view, and here I found the book to be a little light on substance, but this book is clearly not marketed to that segment but to developers. Some of the advanced topics covered in this book are MapReduce, GridFS and Geospatial location and on these topics this book excels.This book would be a fine addition to any bookshelf and will have a special place in mine. It clearly shows the power of MongoDB and PHP in a Web 2.0 environment and would be a great reference to anyone in Web development.
Amazon Verified review Amazon
Alessandro Pellizzari Jan 08, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Disclaimer: I received the book from Packt Publishing to review it.I tried hard to be objective.General reviewIn a word: excellent. But it can be improved.If I recall correctly, this is the first book about integrating PHP and MongoDB.The writing style is easy and most concepts are clearly explained. Some dark spots remain in the functional programming concepts in the map-reduce dedicated chapter.A deeper explanation could have helped.Every chapter sports various code examples and quizzes scattered through the books help recalling just-read concepts. Maybe they are a little too few.Solutions to the quizzes are in the appendix.Every chapter also has "call to actions" (without solutions, naturally) inviting the users to implement solutions based on explained concepts.My preferred part of the books are the examples: the code is presented full and complete, and only after that, you can read the explanation, with snippets taken from it. You can have a full view of the code and analyse it by yourself, or read the description snippet by snippet.Most other technical manuals split the code, or fill it with comments, making it nearly unreadable.The book style appears to shift a little away from classical technical manual, reminding academic books.Sometimes it seems (often rightly) there is much more behind some functionalities and that the book teaches only the basic usage.In some cases it is clearly written (including a link) that you can deepen your understanding reading online articles.Some minor typos, like array fields defined by : (as in javascript) instead of => in PHP code, or missing quotes in array indexes, are easily spotted and don't lower the quality.Chapter 1: installationAfter a brief introduction to the NoSQL movement explaining its fundamentals,installation on Windows and Linux is described. As for OSX, it simply says "it is just like on Linux".Installation is so easy that it takes at most a couple of pages.Next comes server startup, covering base configuration options, and basic database and collections creation. It ends with PHP driver installation (using PEAR) and a little example script.Chapter 2: first applicationIt became the "hello world" of books covering web techs: you begin building a simple blog, covering insert, delete and alter operations. Then pagination and comments are introduced.It serves its purpouse in introducing CRUD (Create, Read, Update, Delete) operations in MongoDB, covering MongoDB query language, including limit, skip, cursors and safe writing concepts.The chapter ends with some peculiar operations (upserts, field increment, field removal) and the distinction between embedded and referenced document, also explaining how to do a "select" operation on embedded documents.Chapter 3: a session managerAfter a brief introduction, the book delves into creating a custom session handler.A (singleton) class is introduced to manage the connection to the DB, and it will be used throughout the entire book. A class is defined to handle the PHP session using a MongoDB collection. This can easily be reused in own projects, being nearly completely transparent.The chapter ends with a user login/logout example.It is useful to understand how to abstract access to MongoDB through a class, how to use upsert and also to know how to use a generic (even SQL) database to handle sessions.Chapters 4 and 5: aggregation and statisticsI cover the two chapters together because they deal with the same topics: map-reduce and group().Map-reduce is maybe the hardest topic for thos used to procedural or OOP languages, as it embraces function programming concepts. On the other hand, group() is similar to the SQL GROUP BY concept.These chapters' arguments are not easy to grasp, and I would have liked more examples. Luckily the given examples are very practical (tag cloud, web access statistics, ...) and not abstract aggregations.Capped collections are introduced here.Chapter 6: RDBMS integrationThis is maybe the least useful chapter, in my opinion, but it could be important to others. Several examples of how to connect to a SQL (MySQL) DB and MongoDB in parallel: how to use MongoDB as a query cache, or to archive old data, so to remove burden from MySQL queries.Chapter 7: GridFSThis chapter is a little thin, given the topic, but it gives you everything you need to start working with GridFS to store (binary) files in the database.MongoDB excels in its simplicity, and the examples are short and clear.One of the "call to actions" asks to implement a thumbnail gallery, saving the thumbnail along with the original image, but does not explain if you can save different files in the same document (hint: you can't).Chapter 8: geolocationThis chapter introduces MongoDB's geolocation features: 2D indexes and server-predefined procedures to search distance-based data.A good introduction, even if it leaves some itches to scratch about measure units (degrees? radians? meters?).Excellent explanation on how to use the data with Google Maps to visualize the results.Chapter 9: securityThe chapter with fewer PHP code lines in it, focuses on console administration for user (and password) access management.It also covers indexes creation and analysis: this part should have been introduced earlier in the book.Chapter 10: RockMongo and phpMoAdminA quick introduction to two web-based (PHP) interfaces for administration query and, above all, backup and restore of databases and collections.Covers pros and cons of both solutions, as well as installation and basic use.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon