News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Building a Simple Blog App with MongoDB and PHP
March 14, 2014 @ 09:19:36

On PHPMaster.com there's a recent tutorial posted showing you the creation of a simple blog application with MongoDB + PHP. It's a basic overview, so it's mostly about creates and reads, but it does help get things working.

If you want to create a blog using MongoDB and PHP, this article will teach you. [...] The reason I chose to build a blog application is because it is a basic CRUD application and it is very suitable for easing into PHP and MongoDB web development. We will build a plain user interface using Bootstrap with simple textboxes and buttons. A MongoDB database will store all the content.

He starts off by introducing MongoDB and some of the basic concepts around databases, collections and documents as they relate to it. He then moves into the installation process, getting and configuring a simple MongoDB instance running on localhost. He helps you get the MongoDB PECL driver installed for PHP and includes a bit of code to test the connection. Finally, he gets into the blog example itself and includes the full code to get it up and running.

0 comments voice your opinion now!
tutorial blog application sample introduction mongodb database

Link: http://www.sitepoint.com/building-simple-blog-app-mongodb-php/

SitePoint PHP Blog:
Social Network Style Posting with PHP, MongoDB and jQuery - part 2
November 19, 2013 @ 13:55:17

The SitePoint PHP blog has posted the second part of their series about the creation of a simple comment posting social site based on PHP, MongoDB and jQuery. In this second part they build on the structure from part one and add in posting and "liking".

In the previous part of the series, we explained the database architecture, post stream design and application flow required for developing our post mechanism wherein the user will be able to post a status, like/unlike other people's statuses and comment on them. This part of the series will drive you through the coding required to implement these functionalities. We will use the application flow and database structure as discussed in the last article. Don't forget to download the code from the github repo if you'd like to follow along.

First he shows you how to get new posts added to the database, POSTed to the backend PHP script. He also shows how to insert the contents back into the page and pull out the latest posts. Next up is the like/unlike-ing of the posts, handled by a simple submission to another backend script.

0 comments voice your opinion now!
tutorial mongodb social post jquery

Link: http://www.sitepoint.com/social-network-style-posting-php-mongodb-jquery-part-2/

SitePoint PHP Blog:
Social Network Style Posting with PHP, MongoDB and jQuery - part 1
November 15, 2013 @ 09:09:43

The SitePoint PHP blog has a new tutorial posted today kicking off a series about creating a "social network style posting" application that combines PHP, MongoDB and jQuery that feels similar to a nested commenting system you'd see on most social sites.

Post mechanisms similar to Facebook are nowadays very common within any application. The concept of Post-Like-Comment is familiar to everyone who ever used a social network. In this article, we will learn how to create a similar working model wherein the user will be able to post his status, like posts and comment on them. What's more interesting is that after learning things from this article, going forward you will be able to implement a lot of other features on your own.

In this first part of the series they start you off with the base code and introduce you to how the data is stored. They also walk you through how the "stream" part of the code works and the tracking of the current user. From there, there's a brief look at how to pull out the comments and display them to the page.

0 comments voice your opinion now!
social post tutorial mongodb jquery part1 series

Link: http://www.sitepoint.com/social-network-style-posting-php-mongodb-jquery-part-1/

OpenShift Blog:
Open Source Mapping with PHP and MongoDB
November 06, 2013 @ 13:47:38

On the OpenShift blog Ryan Jarvinen has a new tutorial showing you how to use MongoDB and Silex to create a basic mapping service. It takes advantage of the MongoDB spatial data and query functionality to help locate and map items from the dataset.

Whether your goals are civic-minded or otherwise, PHP can help you craft solutions that are every bit as simple and elegant as what you might expect to see from modern Python, Ruby, or JavaScript frameworks. This particular example is intended to serve as a reusable template for folks who are interested in producing their own mapping applications - substituting in their own collection of map points or other spatial data.

He starts with a look at the datastore - the MongoDB - and the kind of data it will contain. He's shared the dataset (and complete example code too) over on Github and includes the command to import it. He then starts in on the PHP side of things, showing you how to get Silex installed and add in some basic routes and CSS. He then uses the Leaflet.js library to import the data and drop it into an Openstreetmap-based map. The full code and data can be found in this repository over on Github.

0 comments voice your opinion now!
mapping mongodb leafletjs tutorial openstreetmap

Link: https://www.openshift.com/blogs/open-source-mapping-with-php-and-mongodb

Hannes Magnusson:
Query logging and profiling in MongoDB
September 18, 2013 @ 10:25:49

in a previous post Hannes Magnusson introduced the new stream handling notification feature in the MongoDB PHP extension. In his most recent post he elaborates on a subject mentioned in the previous post - query logging and profiling.

In my previous blog post I mentioned that the 1.5.0 release of the MongoDB driver for PHP has improved notification support using the PHP Notification API, and showed off a fairly useless (but fun) progress bar. Now its time for a little bit more practical examples using this system: Query logging and profiling.

He talks about some of the features in his pull request, including the new constants added to help make working with the logging on streams easier. He includes some sample code that handles the logging via an "update" callback function, parsing the log message type and save the related data to a class variable. An instance of this class is then assigned to the "notification" stream and passed in as an additional option when creating the MongoClient connection. He includes an example of querying a basic collection and how to extract the request information from the logging object instance.

0 comments voice your opinion now!
mongodb stream context tutorial log query profile notification api

Link: http://bjori.blogspot.com/2013/09/query-logging-and-profiling-in-mongodb.html

Hannes Magnusson:
PHP Stream Notifications <3 MongoDB
September 17, 2013 @ 09:02:54

In this latest post to his site, Hannes Magnusson looks briefly at an interesting use for PHP's streams functionality - reading data from a MongoDB connection as a streaming resource.

PHP Streams have several pretty nifty features that most people don't really know about; Filters, Wrappers, Context, and Notifications. Documenting these is a bit difficult, and getting the user to discover these features is even more problematic, as these things usually live outside of the normal path (function reference). Maybe I'll blog about these things in the future, but for now I want to talk about the Stream (context) Notifications - or more specifically; Stream Notifications in the MongoDB extension for PHP.

He talks some about what stream notifications are on a basic level and some general use cases for them. From there he moves into the MongoDB world and some changes in the mongodb 1.4 extension over to using streams. He also talks about some of the things coming in the 1.5 version including progress reporting for read/write actions.

0 comments voice your opinion now!
mongodb streams extension nosql notification

Link: http://bjori.blogspot.com/2013/09/php-stream-notifications-mongodb.html

Derick Rethans:
Introduction to Document Databases with MongoDB
September 06, 2013 @ 09:20:08

If you've been wanting to get into document databases (NoSQL stuff) but haven't had a good beginners guide to look at, Derick Rethans has just the post for you. It introduces some of the concepts behind these databases with just a splash of how to use it in PHP.

By now most you will probably have heard of the term NoSQL. It's a vague term that covers a lot of different types of database engines. The main classes of NoSQL databases are key/value stores, column databases, graph databases and document databases. [...] Apache CouchDB and http://mongodb.org/">MongoDB belong to the last category, Document databases. We will be looking extensively at MongoDB in this article.

He starts off with some explanation of basic terminology and quickly gets into some of the strengths of a document-oriented database. He talks about data models and collection interaction as well as an example query translated from ANSI SQL to the MongoDB format. He has a basic installation and configuration guide, both for MongoDB and installing the PHP driver you'll need to make the connection.

0 comments voice your opinion now!
introduction mongodb document database

Link: http://derickrethans.nl/introduction-to-document-databases.html

NetTuts.com:
Building a CodeIgniter Web Application From Scratch - Part 1
August 27, 2013 @ 11:42:02

NetTuts.com has started up a new tutorial series perfect for those wanting to get into PHP frameworks for modern hybrid (PHP backend, Javascript frontend) applications. This is the first part of their series introduces you to the technologies they'll be using and helps you get the basics setup.

In this series we're going to build a web billboard application from scratch, we're going to use CodeIgniter to handle the back-end service and BackboneJS for the web client. In the first two parts of the series we'll create the back-end service and then the client application in the last two.

They walk you through the steps to to set up a MongoDB to handle the data for the backend and configuring CodeIgniter to work with it. He helps you get it set up to handle REST requests from the BackboneJS frontend too (including OPTIONS handling). He shows how to parse the input and handle the output as well as models to connect to the database resources and how to handle sessions.

0 comments voice your opinion now!
codeigniter tutorial series backbonejs mongodb framework

Link: http://net.tutsplus.com/tutorials/php/building-a-codeigniter-web-application-from-scratch-part-1/

ServerGrove.com:
MongoDB TTL collections
August 26, 2013 @ 09:30:47

On the ServerGrove blog today there's a new post talking about TTL collections in MongoDB - queries with a time-to-live set on the indexes - and includes how to use them in PHP.

MongoDB (v. 2.2+) provides a mechanism to expire data from collections by setting a TTL -time to live- on indexes. This is a great feature if you have data that needs to persist in the database for a specific period of time. The TTL feature allows you to expire data using the MongoDB daemon instead of having to create cron jobs to delete expired data. [...] The MongoDB daemon (mongod) checks regularly for documents in collections with a TTL and removes the expired documents.

Using it from PHP is relatively simple - all that's needed is a configuration parameter on the "ensureIndex" call setting an "expireAfterSeconds" value. There's also a bit included in the post for the Doctrine users out there, showing the docblock comment to use to set the value.

0 comments voice your opinion now!
mongodb ttl timetolive collections expire seconds tutorial

Link: http://blog.servergrove.com/2013/08/23/mongodb-ttl-collections/

PHPMaster.com:
Rockmongo for PHP-Powered MongoDB Administration
July 29, 2013 @ 11:55:40

On PHPMaster.com there's a tutorial posted for those out there already using MongoDB for their architecture and might be looking for administration tools. In this recent post Ashish Trivedi looks at one offering, RockMongo (a PHP-based tool), and some of the features it provides.

There are many such GUI tools available, like Rockmongo, PHPMoAdmin, Fang of Mango, UMongo, MongoExplorer, and MongoVUE, to name just a few. When it comes to using MongoDB with PHP-based projects, Rockmongo and PHPMoAdmin are good options. In this article, we'll take a look at Rockmongo. Rockmongo is an open source MongoDB administration tool written in PHP5. You'll become familiar with using Rockmongo to create databases, collections and documents, query collections, and import and export data.

The download and install are pretty simple and he includes a screenshot of what you should see when it's all set up. There's also several other screenshots included showing how to do things like create databases, insert documents, use "explain" and importing/exporting databases.

0 comments voice your opinion now!
rockmongo mongodb database administration project tutorial

Link: http://phpmaster.com/rockmongo-for-php-powered-mongodb-administration


Community Events











Don't see your event here?
Let us know!


symfony2 hhvm install component performance overview security database unittest podcast facebook package composer language hack release introduction framework opinion application

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework