News Feed
Sections




News Archive
feed this:

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

NetTuts.com:
Understanding and Working with Relationships Between Data in WordPress
August 01, 2014 @ 09:21:54

NetTuts.com has posted the second part of their series looking at the "guts" of a typical WordPress installation. In the first part they gave an overview of the structure and contents of the various database tables. In this second part they get more into the relationships between them.

In the first part of this series on data in WordPress, I gave an overview of the WordPress database tables, and which tables are used to store what kind of data. In this second part, I'll outline how WordPress manages the relationships between that data. As you'll see, WordPress uses three kinds of data relationship - one-to-one, one-to-many and many-to-many. I'll look at each of these and what they mean for your WordPress site.

He goes through each of the relationship types and includes examples from the WordPress database to illustrate them. He then gets into a bit more depth, talking about the specifics of some relationships like: posts-to-users, posts-to-comments, comment-to-comment and the structure of the many-to-many relationships too.

0 comments voice your opinion now!
wordpress series data database relationship tutorial part2

Link: http://code.tutsplus.com/tutorials/understanding-and-working-with-relationships-between-data-in-wordpress--cms-20632

7PHP.com:
Jacques Woodcock - The PHP Community Is Much More Than PHP Codes or Frameworks
April 18, 2014 @ 10:14:49

In the latest in their series of PHP community interviews, the 7PHP.com talks with Jacques Woodcock one of the leaders in the Nashville PHP community and of the Nashville PHP User Group (see his previous interview for more on that). In this interview they focus on some quotes from Jacques posted on the SouthernAlpha startup Twitter account about giving back to the community.

The 'level of wisdom' in them was too strong to be left there, I had to bring it out and I'm thankful to Jacques 'TheKit' Guy for sharing with me (and hence you) his precious experience he gained down the years and elaborating more on those quotes.

They go through each of the quotes and let Jacques expand on them a bit - why he got started with the community, some ways that people can get involved in their local group and remembering that a community is made up of more than just single actors.

0 comments voice your opinion now!
jacqueswoodcock interview community 7php involvement humility relationship

Link: http://7php.com/jacques-woodcock-wisdom/

Phil Sturgeon:
Composer and PSR-0 Friends, Not Relatives
May 08, 2013 @ 11:15:42

Phil Sturgeon has a new post today that looks at the relationship between the PSR-0 standard (autoloading structure) and Composer - noting that they're friends, not relatives.

As a huge proponent of Composer, a happy user of PSR-0 and a voting member on the PHP-FIG I get into plenty of conversations about all of them and it worries me how much confusion there is in the community about these things not actually being related. [...] It seems that a lot of folks discover Composer and PSR-0 at the same time and seem to assume they are the same thing - especially since both Composer and PSR-0 have the idea of a "vendor" and a "package", but those two things are not related to each other either. These are a few points that I have wanted to clarify during some strange conversations over the last few weeks.

He goes on, trying to clear up some of the confusion around the idea of "vendors" and vendor names. He talks about naming schemes and how they may or may not be related to the vendor name on the package. He looks at the PSR-0 loading methods and how the structure of the library/repository effects that (noting that Composer can be made to accommodate something not PSR-0 by default). He suggests that PSR-0 needs to remain "implementation agnostic" and that Composer, at the same time, should remain "specification agnostic" .

0 comments voice your opinion now!
composer psr0 autoload vendor package relationship

Link: http://philsturgeon.co.uk/blog/2013/05/composer-and-psr0-friends-not-relatives

Michael Nitschinger's Blog:
Introducing Relationships in Lithium
March 05, 2012 @ 11:21:39

In this new post to his blog Michael Nitschinger introduces relationships in using the Lithium framework - functionality to link your models to each other to create dependencies.

The model relationship support in Lithium is one of the hottest topics on IRC lately, so I thought it would be a good idea to blog about it. Currently, Lithium supports 1:1 and 1:n relationships for relational databases. [...] This post gives you a little background on relationship types and their database representations before we implement a simple example in PHP.

He gives some code (and schema) examples of creating these relationships between tables for the two types - one to one and one to many. He also touches on the zero-to-zero relationships as well, nothing that they can be some of the most tricky to work with. He includes the SQL and the code you'll need to produce a blog example with models for Authors, Posts and Groups. Using the belongsTo/hasMany/hasOne variables he defines the relationships and uses the "with" keyword in the find calls to pull in those relations.

0 comments voice your opinion now!
relationship lithium framework model database introduction


Josh Adell's Blog:
Neo4j for PHP
June 17, 2011 @ 10:05:26

Josh Adell has written up a new post for his blog showing some of his experience connecting PHP to Neo4j, a graph database (and open source project). It helps to solve a problem of related datasets and the difficulties that traditional RDBMS have with them.

Lately, I've been playing around with the graph database Neo4j and its application to certain classes of problems. Graph databases are meant to solve problems in domains where data relationships can be multiple levels deep. [...] As you continue to add degrees, the query becomes increasingly unwieldy, harder to maintain, and less performant.

Graph databases, like Neo4j, handle these sorts of needs perfectly. There wasn't an official PHP interface for it, so he decided to create his own that worked with the REST interface the database provides. He includes a few code snippets showing how to connect and make a few requests - setting properties on objects, relating objects to one another and making queries that follow the paths from user to user and return them as a simple array.

0 comments voice your opinion now!
neo4j database graph tutorial rest relationship path


Cal Evans' Blog:
Six ways to be a better client for your developer - Point 8
February 24, 2011 @ 11:03:59

Cal Evans has posted the eighth tip in his six-tip series (but who's counting) about how a client can coordinate better with a developer and make a better relationship for the project. In this new tip, he suggests that the client "own it".

No, I'm not talking about own it as in Point 7 - "Do your part", I mean make sure that at the end of the project, you own the project, not your developer.

He mentions two of the aspects you, the client, will need to worry about once the last line of bug free code has been committed and delivered. Be sure that you own the domain name for the project and have a clear understanding of any intellectual property concerns that might come up (what codebase is it built on, who owns the code - client or developer, etc).

0 comments voice your opinion now!
better client developer relationship ownership domain codebase intellectual property


Chris Hartjes' Blog:
Sorting Relationship Results In Doctrine 1.2
February 05, 2010 @ 10:51:32

Doctrine allows you to set up relationships to link data in various tables together. Unfortunately, those aren't always in the order they need to be in. In a new post to his blog Chris Hartjes shows you how to sort these relationship results just by adding a simple line to your request.

I started digging around via search engine. Took me about an hour to find the solution. First, it took me half the time to dive deep enough to find out WHERE I can define the default sort order. Surprisingly, it was in an area that made total sense but I could not find before.

You can see an example of it in the "hasMany" call in his code snippet - the addition of the "orderBy" option and the value showing the sorting order. Here's the StackOverflow page that gave him the answer he needed.

0 comments voice your opinion now!
relationship doctrine sort tutorial orderby


Michelangelo van Dam's Blog:
Zend Framework data models
January 12, 2010 @ 12:05:05

Michelangelo van Dam has a recent post to his blog about a difficulty he was having with his Zend Framework application and setting up some data models.

I was struggling getting my data models (as described in the Zend Framework Quickstart) to work with relations. My first solution was to create a database view that merged that data using joins to collect this data in a format that I could use in my data models. This was going great until I looked at my database where it contained over 20 views (along with 20 data models, mappers and db table gateways) ! So I said to myself there had to be another way.

His other way came in the form of the Zend_Db_Table_Relationships component and, after a bit of work, it did just what he needed. He shares how you can set them up similarly by walking you through the creation of a sample application ("datamodels") and linking together a series of sample tables with a Db_Table class using relationships, a simple model to abstract data access and a model mapper class to redefine some of the based functions (like "findAll") to pull in data from other tables.

1 comment voice your opinion now!
zendframework data model relationship mapper


Paul Jones' Blog:
Solar Models vs. Zend Framework Models
January 08, 2010 @ 12:15:29

Paul Jones has added a new post to his blog today (in response to this one from Michelangelo van Dam about models in Zend Framework) on how to work with models in the Solar Framework and how the experience compares.

I read the article, and wondered how hard it would be to replicate his narrative using the Solar Framework model system. Turns out it's pretty easy: there's a lot of work that Solar does for you.

He describes the process in a series of ten steps with most of them being done for you by the tools included with the framework (the ones that aren't just setup tasks). The "solar system" toolkit includes a command line application that helps you build out the models and relating them is as easy as changing some values in the model classes with methods like "hasOne" and "belongsTo".

0 comments voice your opinion now!
solar framework zendframwork model relationship


Scott MacVicar's Blog:
PHP's Relationship with Commercial Entities
February 19, 2009 @ 10:26:41

PHP is always thought of as an open source free spirit that survives on the work that's done by the community around it. While there's no denying the massive amounts of work done by developers of the language, there's also another group that is doing their part to help the language flourish - commercial entities. Scott MacVicar takes a look at a few of them in this new post to his blog.

I thought I'd start with a quick thank you to all those groups and entities involved indirectly with PHP. The PHP project relies on donations to provide our service infrastructure, this is in the form of hardware and hosting from both individual companies and hosting companies to provide collocation.

Besides the hardware support there's also companies willing to allow their employees time to work on the project (such as Pierre from Microsoft). Other companies that have made large contributions include IBM's large amount of testing, Sun's work to improve PHP on Solaris and, of course, Zend's support of the project and the time its employees spend developing the language.

0 comments voice your opinion now!
language project relationship commercial zend microsoft ibm sun digg



Community Events





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


introduction voicesoftheelephpant series podcast bugfix install framework interview zendserver opinion library language release api package symfony community unittest laravel deployment

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