 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Liip Blog: Table Inheritance with Doctrine
by Chris Cornutt March 28, 2012 @ 09:30:09
On the Liip blog there's a recent post looking at table inheritance with Doctrine, the popular PHP ORM tool. In the post, Daniel Barsotti talks about a database model that needed some updating due to their searching needs.
Our first idea, and it was not that bad, Drupal does just the same, was to have a database table with the common fields, a field containing the type of item (it's either an event or a blog post) and a data field where we serialized the corresponding PHP object. This approach was ok until we had to filter or search LabLog items based on fields that were contained in the serialized data.
To resolve the issue they turned to multiple table inheritance, relating the LabLogItem to both a BlogPost and Event. They also show how it could be modeled with a single table, but opt for the multiple method. Included in the post is the Doctrine-based code showing how to create the parent entity for the LabLogItem and the two child entities for the blog post and event. There's also a brief snippet showing how to use them with the EntityManager.
voice your opinion now!
table inheritance doctrine orm tutorial multiple
Rob Allen's Blog: One-to-Many Joins with Zend_Db_Table_Select
by Chris Cornutt February 08, 2012 @ 09:28:20
Rob Allen has a tip for the Zend Framework users out there using the Zend_Db module to connect to their database resources - how to do a one to many join with the help of Zend_Db_Table_Select (easier than it sounds).
Let's say that you want to set up a one-to-many relationship between two tables: Artists and Albums because you've refactored my ZF1 tutorial. [...] Assuming you're using Zend_Db_Table, the easiest way is to turn off the integrity check and do a join in a mapper or table method.
He includes a few lines of source to illustrate, calling the "setIntegrityCheck" value to "false" to tell ZF not to worry about the additional join value over to the artists table. The result is a new column value with the artist's name instead of just the ID.
voice your opinion now!
onetomany database table join zendframework zenddb component
Kevin Schroeder's Blog: Call for webinars (Zend)
by Chris Cornutt January 18, 2012 @ 11:50:07
Kevin Schroeder is looking for suggestions. He wants to know what the PHP community wants to hear about in upcoming webinars from Zend.
Just wrapped up a call working on our webinar schedule for the year. We've got a bunch of ideas but we'd like to also get your input as well. Yes, I know y'all want ZF2 webinars. We have that down. I would also like to do an HTML5 and mobile webinar but I need an SME (Subject Matter Expert) for that. [...] I would also love to have webinars on how to use various API's, even if there is not native PHP support. So, what kinds of webinars do you want?
Leave your suggestions in his comments along with one already suggesting a "Why PHP?" checklist of sorts to help encourage companies/employers to go with the language.
voice your opinion now!
opinion webinar share zend zf2 html5 api
Developer Drive: Building a PHP Ad Tracker Creating the Database Tables
by Chris Cornutt January 16, 2012 @ 12:48:30
On Developer Drive today there's a new post (the first in a series) from Gerald Hanks about building an ad tracker in PHP. In this first part he sets up some of the background - the database that will hold the tracker information.
Banner ads for services related to the web site owner's industry allow customers to view products that tie into the site owner's core business. In exchange, the web site owner can charge the banner ad owner for every impression (banner ad appearance) or click-through (when a user clicks the banner ad). In order to build a banner ad management system, we must first create the database tables that will hold the ad information, the client data and the activity schedule for each ad.
He includes the SQL you'll need to create a few tables - the tracking table for the ads themselves (their metadata), the clients table to handle the groups wanting the ads and the activity table to track views and click-throughs.
voice your opinion now!
ad tracker database table tutorial clickthrough
PHPMaster.com: Zend Job Queue
by Chris Cornutt January 13, 2012 @ 08:37:31
In this most recent post to PHPMaster.com Alex Stetsenko takes a look at the Zend Job Queue functionality, a part of the Zend Server installation. He talks about some basic usage to make HTTP requests and a more extended example showing report generation.
Web applications usually follow a synchronous communication model. However, non-interactive and long-running tasks (such as report generation) are better suited for asynchronous execution. One way to off-load tasks to run at a later time, or even on a different server, is use the Job Queue module available as a part of Zend Server 5 (though not as part of the Community Edition). Job Queue allows job scheduling based on time, priority, and even dependencies
In his two examples, he shows the code involved to create a new Queue object and define a HttpJob in it. The first just calls a "sample.php" script that's exposed as a part of your external-facing site and shows how you can get the current status of the job. The more advanced example shows a call to a "report.php" script with a set of options defining things like "type", "length" and "priority". He also points out some other options that can do similar things like Gearman, NodeJs and RabbitMQ.
voice your opinion now!
zend job queue zendeserver tutorial task status
Zend: Zend Takes The Pulse Of Developers In The APP Economy
by Chris Cornutt January 12, 2012 @ 12:56:15
In this new press release Zend has announced the posting of the results from their "Zend Developer Pluse" survey - a survey taken of developers world-wide about their habits, preferences and desires.
Zend Technologies addresses [the question of how a new demand for a new generation of apps] in Zend Developer Pulse, a new survey series that takes the pulse of a vibrant community of developers from around the world. The company's first developer survey conducted in late November 2011 offers insights on emerging technology and career trends captured from 3,335 respondents. The findings are summarized in a report now available at [http://www.zend.com/topics/zend-developer-pulse-survey-report-0112-EN.pdf].
The press release mentions some of the details from the survey including that 66% of developers will be working with mobile app development projcts, that next-generation UI deveopment scored high in skillsets, there was a strong interest in cloud development and that there's been a strong rise in the need for PHP development skills in the last year.
You can read the entire report here.
voice your opinion now!
zend survey pulse results developer
Freek Lijten's Blog: The real problem of the hash table dos attack
by Chris Cornutt December 30, 2011 @ 12:53:35
In response to some of the comments being made about the hash table Denial of Service attack recently posted Freek Lijten has posted his thoughts about the real problem with the whole situation - how it was handled by the communities involved.
Interesting they may be, but I want to address what in my opinion is the real problem: The way the communication around it was handled by different projects and the fact that the exploit could still exist at all. [...] In the presentation Wälde and Klink talk about their disclosure process. The PHP project had them wait 3 weeks for a first response while this is obviously a serious matter.
He argues that things like a commit message mentioning a DoS prevention fix instead of just mentioning the fix have the potential to do more harm than good. He also points out that other communities were notified of the problem (like Python) and some still haven't responded to the issue.
This attack was the result of good research and it is important that it is disclosed. More importantly however is the fact that organisation got by with years of not noticing it and even worse, reacted very poor after being informed. I can't say I have a ready solution to avoid these kind of things in the future, perhaps that will prove to be an interesting discussion.
voice your opinion now!
dos attack hash table opinion community response
|
Community Events
Don't see your event here? Let us know!
|