News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Gonzalo Ayuso's Blog:
PHP and couchDB
March 16, 2010 @ 13:55:22

In a recent post to his blog Gonzalo Ayuso has a brief introduction to CouchDB and how you can use it in your application. Most of the post is made up of code samples showing some of the basic relational database operations translated over to a CouchDB database (found in this class).

I come from relational database world. NoSQL is new for me. Maybe I'm wrong but I want to use INSERT, UPDATE, DELETE and SELECT statements in CouchDB in the same way I use them in Relational database. The class is focused in the HTTP Document API. There is a great tutorial here that explains the API. Now I'll show the interface I've made to perform the statements with CouchDB.

There's examples of both simple and more complex selects, updates and deletes as well as the handling of exceptions via two types he's included support for - NoDataFound and DupValOnIndex.

1 comment voice your opinion now!
couchdb interface nosql rdbms



Sameer Borate's Blog:
Reading Google Analytics data from PHP
February 03, 2010 @ 11:06:08

In a new post to his blog today Sameer Borate has a tutorial about linking your application to the Google Analytics backend and using the requestReportData method to pull back interesting statistics on your sites.

Although no standard library is available from Google for PHP, some small and easy interfaces are available out there. In this post we will see how to access Google Analytics data using PHP using the GAPI library.

The GAPI library is an open sourced project that provides a direct, easy to use interface you can use to connect directly to the Analytics service without having to handle all of the manual stuff yourself. Sameer shows how to get information from the service like the top ten sources and visit counts, regional information and how to do some filtering on the results returned.

0 comments voice your opinion now!
google analytics interface gapi


Adam Jensen's Blog:
Cron tasks in Zend Framework apps
January 13, 2010 @ 08:45:41

In this new post to his blog Adam Jensen looks at creating cron jobs with the help of the Zend Framework without having to load up the entire MVC architecture to get there.

So, we're going to need a new application bootstrap and entry point, one that eschews the MVC routing and dispatch process in favor of something simpler. Essentially, all we'll need is to be able to run an arbitrary collection of cron "task plugins," the list of which can be configured in plain text via any of the various Zend_Config formats (e.g., the default application.ini file).

He starts with the base functionality, a task plugin interface that allows you to set up a "framework" to run the tasks in. He also creates a simple cron service that handles the execution of the tasks (this is the main executable) and includes the code for creating the bootstrap for the Zend Framework to understand how to use it all. Then to create a new task, all you have to do is extend the CronInterface.

0 comments voice your opinion now!
zendframework task cron tutorial plugin interface


ProDevTips.com:
Simple jQuery and PHP CRUD interface
January 11, 2010 @ 08:07:19

On the ProDevTips.com site today there's a new tutorial showing how to create a simple CRUD (create, read, update, delete) interface to your database tables with PHP and jQuery (here's an example).

I recently made a very simple but functional administrational interface using jQuery and Ajax to avoid having to refresh the page all the time thus simplifying development. The only convention/requirement here is that any database table that uses the interface has a unique id column aptly named id.

Their example is pretty simple - it lets you view the contents of the cells, allows you to change their values in the form fields (or delete the record) and save the changes. Complete code - HTML, PHP and jQuery - is included.

1 comment voice your opinion now!
jquery crud interface tutorial


Brandon Savage's Blog:
Why Interfaces Rock
September 25, 2009 @ 09:11:32

According to the latest post on his blog Brandon Savage thinks interfaces rock:

When I first learned PHP 5's object oriented syntax and rules, I didn't see much of a point to the interface options. I felt that I could do more by defining abstract classes and at least filling in some of the methods with some details. [...] As a developer, I've often wished there was a way to know that an object - any object - had implemented certain methods. With type hinting and the instanceof operator, it is now possible to determine whether or not an object has those methods, and interfaces make this even easier.

He includes an example or two of how type hinting can help you enforce and predict what sort of methods are defined in other classes. He also points out that this can be one of the major drawbacks of interfaces as well - because they are so strict, they have to be adhered to exactly.

0 comments voice your opinion now!
interface abstract class opinon


Community News:
PHPUnit Web Interface (Ajax)
June 11, 2009 @ 21:43:51

Popescu Valentin has submitted a tool that he and and Radu Gasler have created to help you run your PHPUnit tests via a web interface.

I made a web interface for runing PHPUnit test suites and seeing the results in a cool environment of AJAX. Features Runing speciffic tests or whole suite, seeing the errors and thrown exceptions connected to the test that thrown them, ability to see the code coverage result for the test suite. All these done in an interactive interface allowing run of the tests where the user can not interract with the system command line (web server). The software is totally free.

You can find complete details about the tool (and downloads) on its SourceForge page (as well as donate if you like it!)

0 comments voice your opinion now!
sourceforge interface phpunit


Ask About PHP Blog:
Google Analytics API class for PHP
May 29, 2009 @ 09:33:05

On the Ask About PHP blog today there's a new tutorial (and a new class) helping you to connect your applications with the Google Analytics backend.

I've been thinking about how I can make use of this API to enhance the sites I'm working on. But before kicking off ideas, I had to find out how to access and use the API. I finally came up with a PHP class that will do all the grunt work of calling the API, you just need to supply your report's parameter and the PHP class will return you an array of Analytics data.

The class [zip] makes connecting to the Analytics backend as easy as dropping in a username/password, defining which profile to use and the date range. The getReport() method does the hard work

0 comments voice your opinion now!
tutorial interface api analytics google


Juozas Kaziukenas' Blog:
SQL Native Client as MSSQL driver for Zend Framework
May 07, 2009 @ 12:07:02

Juozas Kaziukenas (thanks to his work in the WinPHP Challenge) has posted his look at using the SQL native driver to allow the Zend Framework to interact with a MSSQL database backend.

Now some of these issues [that Stuart Herbert pointed out] are fixed, however Microsoft native Sql driver is still not used. [...] However, none of these is available in Zend Framwork. So my task now (because of Winphp competition) is to come up with something what can be used to connect to Microsft Sql database with the new driver.

He looks at how to set up two different options for a database configuration: with a PDO_ODBC adapter and an adapterNamespace setting to define the adapter type to use and the other with an MSSQL adapter type.

0 comments voice your opinion now!
sql zendframework mssq native client driver odbc interface adapter


Phpro.org:
Introduction to PHP and MySQL
April 16, 2009 @ 12:06:30

On the phpro.org site today there's a new tutorial posted about the powerful combination of PHP and MySQL introducing a bit about both sides - connecting PHP to MySQL and working with SQL statements.

This tutorial is aimed at those new to PHP and MySQL. The object of this tutorials is to show by way of example how to use php to CREATE a database, how to CREATE a table, how to INSERT data into a database, and how to SELECT that data and display it on a web page. [...] his tutorial will grow in size and complexity as time permits. Lets begin with a brief description of what MySQL and PHP are.

The tutorial looks at connecting to MySQL, creating a test database, working with the data inside via insert/selects/updates and a few other miscellaneous tips.

0 comments voice your opinion now!
mysql interface tutorial connect sql crud


Federico Cargnelutti's Blog:
An Alternative to Zend_Controller The Model
April 14, 2009 @ 08:48:46

Federico Cargnelutti has posted the third part of his series looking at his alternative to the normal Zend_Controller in Zend Framework applications - Zf_Controller. This article focuses on its interface with the model.

The domain layer is separated from the other layers and has no dependencies on Zf_Controller. Adding the domain directory to your include path allows you to load and access Model classes from anywhere within your project.

His code examples show an IndexController extending the Zf_Controller and how a Model can be called from inside it through a getInstance (as long as the model directory is in your path). You can take a look at part one and part two for more information on this alternative component.

0 comments voice your opinion now!
zfcontroller zendcontroller model interface getinstance includepath



Community Events









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


opinion symfony framework zend hiphop codeigniter feature zendframework wordpress windows sqlserver microsoft conference developer facebook job extension release podcast performance

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