 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Introduction to MongoDB
by Chris Cornutt October 27, 2011 @ 08:27:47
PHPMaster.com has a new tutorial today for those wanting to get into the MongoDb document-driven (NoSQL) database but haven't known where to start. This tutorial walks you through some of the basics including setup and configuration of both the server and PHP client side.
There are a lot of implementations of the NoSQL concept, but one of the most famous and widely used NoSQL databases is MongoDB. I think it's one of the most interesting NoSQL databases available currently, and it's considered by many to be one of the easiest to use (which has helped it gain widespread adoption). In this article I'll introduce you to NoSQL with MongoDB. You'll learn how to install the MongoDB extension for PHP, and how to add, update, and retrieve document objects.
He starts with an introduction to MongoDB and links to their site to grab the latest version of the database. A few simple steps later (including a call to install the mongo PECL module) and your PHP install is ready to go. Code snippets are included showing how to connect to the server and insert/update/select document records.
voice your opinion now!
introduction mongodb database document nosql tutorial
DZone.com: The era of Object-Document Mapping
by Chris Cornutt July 08, 2011 @ 11:45:46
On the PHP on Windows section of DZone.com today Giorgio Sironi has posted about a different sort of object mapping than is usually thought of with databases - object-document mapping.
The Data Mapper pattern is a mechanism for persistence where the application model and the data source have no dependencies between each other. [...] But everytime we talk about the Data Mapper pattern, we assume there is a relational database on the other side of the persistence boundary. We always save objects; we always map them to MySQL or Postgres tables; but it's not mandatory.
He talks about two projects, MongoDb_ODM and CouchDb_ODM, that the Doctrine project is working on to help make working with document-driven databases as simple as the usual ORMs. He includes a brief code snippet showing how the feature will work (hint: a namespace of Document instead of Entity). He lists some of the features - including the usual ORM capabilities, support for collections, cascade of persistence - and where you can get the latest code for it (from github and PEAR
voice your opinion now!
object document mapping doctrine mongodb couchdb
Zend Developer Zone: ZendCon Sessions Episode 041 Documents, Documents, Documents
by Chris Cornutt March 07, 2011 @ 08:47:05
On the Zend Developer Zone today they've published the latest episode in their ZendCon Session series (as recorded at ZendCon 2010), a talk from Matthew Weier O'Phinney about document databases - Documents, Documents, Documents.
Welcome to the ZendCon 2010 edition of the ZendCon Sessions. The ZendCon Sessions are live recordings of sessions that have been given at previous Zend Conferences. [...] In this series we will be releasing sessions from ZendCon 2010! This episode of The ZendCon Sessions was recorded live at ZendCon 2010 in Santa Clara, CA and features Matthew Weier O'Phinney giving his talk: "Documents, Documents, Documents"
You can listen in one of a few ways - either via the embedded player on the Devzone site, by grabbing the mp3 itself or by subscribing to their feed to get this and other great episodes.
voice your opinion now!
podcast zendcon10 matthewweierophinney document database
ServerGrove Blog: Creating indexes for your Doctrine ODM documents with Symfony 2
by Chris Cornutt October 08, 2010 @ 08:24:41
On the ServerGrove blog there's a new post showing you how to create indexes for your Doctrine ODM documents in a Symfony 2 application.
Creating indexes in NoSQL / Document-based databases is quite different compared to traditional relational databases. Since the former are schema-less (there is no table creation), indexes do not get created when the collection or the document is created or inserted. Here is a quick tip that will create all the indexes defined in your documents when using Symfony 2 and Doctrine ODM for MongoDB. Indexes are a great way to speed up your queries, in fact, it is a crime not to include them in your documents.
Adding the index is as easy as putting a new annotation on the property in its document class (for @Index) and run a bit of code in Symfony to build it out. The two lines you'll need to execute are included in the post.
voice your opinion now!
symfony document orm doctrine index tutorial
Zend Developer Zone: Creating PDF Documents with Zend Framework
by Chris Cornutt August 31, 2010 @ 14:27:15
On the Zend Developer Zone there's a new post by Vikram Vaswani about a method for creating PDF files directly from a Zend Framework application (hint: it uses Zend_Pdf).
PHP comes with a number of options to help developers dynamically generate PDF files from within their applications. The Haru and PDFlib extensions offer a complete API for dynamic PDF generation, and there also exist a number of open-source PHP components that can be used for the same purpose. This article will introduce you to one such component, the Zend_Pdf component that ships as part of the Zend Framework, and illustrate how it can be used to perform sophisticated PDF operations from within a PHP application.
The tutorial walks you through some of the introductory steps to using the component (outside of the framework) and create a sample PDF with some basic text. It gets more technical by adding in pictures, text wrapping, drawing lines and shapes, styling text and using things like the My_Pdf_Table feature to easily create tables. There's even a bit at the end about using the properties of the file to set things like title, subject and author.
voice your opinion now!
pdf tutorial zendframework zendpdf document
Jonathan Wage's Blog: Blending the Doctrine ORM and MongoDB ODM
by Chris Cornutt August 26, 2010 @ 13:34:40
On his blog today Jonathan Wage has posted a tip on getting MongoDB connections and queries to work through the Doctrine ORM layer:
Since the start of the Doctrine MongoDB Object Document Mapper project people have asked how it can be integrated with the ORM. This blog post demonstrates how you can integrate the two transparently, maintaining a clean domain model. This example will have a Product that is stored in MongoDB and the Order stored in a MySQL database.
His code shows how to define the document and entity for the connection (a Product and Order) and creating an event subscriber to lazy load the product. He creates a sample Product and an Order for it and save them to the database. He also includes code to pull an order back out by its ID number and get an Order object back out (with Product data inside).
voice your opinion now!
doctrine orm mongodb document entity subscriber event tutorial
php|architect: PHPDOCX generating Word documents from PHP
by Chris Cornutt July 22, 2010 @ 10:23:18
On the php|architect blog today there's a new post about a tool that helps you create Word documents directly from your PHP application - PHPDOCX.
PHPDOCX is a PHP library that allows its client code to generate Microsoft Word documents in the .docx format from PHP scripts. PHP is increasingly being used for disparate goals and has to deal with data that comes from strange sources and has to be produced in stranger formats. [...] Starting with the 1.5 version, which has been released on July 12th, PHPDOCX is now compatible with PHP 5.3. The adoption of PHP 5.3 from operating systems is growing and it will at last replace the previous versions of PHP also in the servers of hosting providers.
He mentions some of the features it includes (like the library and automatic insertion of things like headers and footers) as well as two requirements for the tool to work - the zip and xsl extensions.
voice your opinion now!
generate word document phpdocx
php|architect: Zend Db 2.0 Kicks Off
by Chris Cornutt June 28, 2010 @ 12:09:38
As is mentioned on the php|architect blog today (from Bill Karwin) the requirements gathering stage for the Zend_Db 2.0 version of the database component for the Zend Framework has started. Ralph Schindler has issued a document talking about some of the issues that have come up in the component's past.
Requirements have been solicited from both community members in various conversations, as well as looking through the issue tracker for feature requests that have been on the backlog due to potential BC breakage. This document reflects those ideas, and it's now in a position where we'd like to start a discussion on the direction outlined inside it.
Suggested features include things like:
- Pluggable architecture
- Distinct abstractions
- Addition of a Metadata sub-component
- Better testability in the Unit Tests
- Base Plugins / Type Converter
voice your opinion now!
zenddb zendframework proposal requirement document
Ilia Alshanetsky's Blog: Google Docs Backup Script
by Chris Cornutt June 22, 2010 @ 11:50:50
Ilia Alshanetsky has created a simple script (that uses curl) to make a backup of your Google Docs to keep you and your data a bit safer (since Google provides no backup capabilities).
As part of the backup strategy we also wanted to capture incremental versions of the documents (on a daily basis) in the event we needed to go back to the prior versions. To this affect I whipped up a small (120 lines) PHP script that will retrieve all your Google documents and save them to a local directory, in the event the document was created/updated in the last 24 hours, thus ensuring snapshot support.
His script exports each of the documents contained in the account and puts them on the local file system prefixed with a year/month/day value to keep things unique. You'll need curl and SimpleXML enabled to be able to use the script, but it's a pretty simple thing to drop in and run on most PHP5 installations.
Here's the code in raw text and syntax highlighted versions.
voice your opinion now!
googledocs google backup curl document
|
Community Events
Don't see your event here? Let us know!
|