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

Piotr Pasich:
CakePHP with Symfony's2 router
August 13, 2014 @ 09:46:27

Piotr Pasich has a new post to his site today showing you how you can use the Symfony2 router with CakePHP, another popular PHP framework. He talks about some of his own experiences using CakePHP and how one module "left a bitter aftertaste" when using it - the route handling.

The second version of CakePhp still has a lot old-fashioned patterns, singletons or lack of tests, but I can live with that. I saw a lot of better or worse frameworks in my life.

He goes through an example of the CakePHP routing including some sample code and a walk-through of the code that actually handles the request. He points out some of the "clean code" violations it makes and gets started integrating the Symfony2 router instead. He extends the CakePHP router and uses this plugin to bridge between the two. He then can call the Symfony router with only slight modifications to things like the "getPath" calls.

0 comments voice your opinion now!
cakephp symfony2 router integrate plugin tutorial

Link: http://piotrpasich.com/cakephp-with-symfonys2-router/

Inviqa techPortal:
Manage Project Dependencies with Bower and Composer
January 30, 2014 @ 12:20:40

On the Inviqa techPortal there's a new tutorial showing you how to manage your dependencies with the help of both Composer and Bower (a Javascript package manager).

As developers, most of us rely on third-party libraries as part of our web applications. PHP developers manage their dependencies with Composer, but how can you manage your client-side dependencies? Most projects start with one core JavaScript library (e.g. jQuery) and one or two plugins, but over time the application grows, and the list of JavaScript libraries grows as well. In this situation, Bower can help you, and in this article you will see how to integrate it into your own project.

You'll need Node installed to use Bower, but the installation process is simple - just one call to load it via npm. They help you get the configuration set up and how to specify its dependencies. Anyone familiar with how Composer works should feel right at home using a similar JSON structure. With that in place, you can move on to the next step, integrating it with Composer. In the Composer configuration, there's a setting for "scripts" that can be run before the install command is executed and some after the install is complete. This is where they call "bower install" to have it install the needed Javascript-based dependencies.

0 comments voice your opinion now!
project dependencies bower composer integrate introduction

Link: http://techportal.inviqa.com/2014/01/29/manage-project-dependencies-with-bower-and-composer/

Google Cloud Platform Blog:
Google App Engine for PHP with PhpStorm
October 24, 2013 @ 10:09:05

On the Google Cloud Platform blog there's a recent post showing you how to directly integrate the Google App Engine PHP support with the popular PHP IDE PhpStorm for seamless development.

Our IDE for PHP, PhpStorm, provides seamless integration with Google App Engine for PHP - allowing you to locally develop, debug and deploy your PHP applications on Google App Engine. When testing your application locally, we also support full emulation of App Engine services through the App Engine Development server. The [introductory] video shows how to get started with Google App Engine for PHP in PhpStorm. We also have a comprehensive tutorial which covers Google App Engine with PhpStorm in detail.

His example shows how to integrate the IDE with the Google Cloud SQL service. He shows how to create a new user (via the API console) and how to connect that user in PhpStorm. He includes a CREATE statement for a sample table and the PHP code to connect.

0 comments voice your opinion now!
phpstorm google appengine sql cloud tutorial integrate

Link: http://googlecloudplatform.blogspot.cz/2013/10/google-app-engine-for-php-with-phpstorm.html

Martin Sikora's Blog:
Silex + Doctrine 2 ORM
May 08, 2012 @ 11:12:16

Martin Sikora has shared some of his experience with setting up a Silex instance to work with Doctrine2 in a new post to his blog. The popular microframework comes with a built-in Doctrine service provider, so integration isn't overly difficult.

Silex is great for its simplicity, however for larger projects you probably want to use some ORM like Doctrine but there's build-in service provider only for Doctrine DBAL and not ORM.

He breaks it up into five smaller steps, each with code samples to help clarify:

  • Doctrine 2 ORM Service Provider
  • Create your entity classes
  • Mind Doctrine DBAL and Doctrine ORM versions
  • Doctrine CLI
  • Working with Doctrine ORM
0 comments voice your opinion now!
silex microframework doctrine2 integrate tutorial


PHPMaster.com:
Building a Domain Model - Integrating Data Mappers
March 19, 2012 @ 11:27:26

In this previous post PHPMaster.com introduced you to the concept of "domain models", structures defining how data should be formatted for consistency. In this second part of the series, Alejandro show show to integrate them with a data access layer (DAL) to make them easier to work with.

The phrase may sound like an cheap cliché, I know, but I'm not particularly interested in reinventing the wheel each time I tackle a software problem (unless I need a nicer and faster wheel, of course). In this case, the situation does warrant some additional effort considering we'll be trying to connect a batch of mapping classes to a blog's domain model. Given the magnitude of the endeavor, the idea is to set up from scratch a basic Data Access Layer (DAL) so that domain objects can easily be persisted in a MySQL database, and in turn, retrieved on request through some generic finders.

He includes all the code you'll need to create a (namespaced) database adapter (PDO), the mapping layer to tie the domain models together and using it all in a practical "blog" example with posts, comments and users.

0 comments voice your opinion now!
integrate domain model data mapper tutorial pdo database


DZone.com:
Selenium 2 from PHP code
November 16, 2011 @ 10:06:01

On DZone.com today Girogio Sironi shares some of his experiences testing out the PHP bindings currently offered to work with Selenium, the web application frontend testing tool that's become a standard over the past few years.

After trying out Selenium 2, it was natural for me to look for its support in PHP code; however, there isn't an official PHP Api distributed on Selenium's website. I tested all the PHP bindings I could find to see which is the best choice today.

He tried out a few different technologies:

The finishes the post with a quick summary for each of the offerings including strengths each has and situations where you might want to use them.

0 comments voice your opinion now!
selenium frontend test integrate phpunit webdriver


Kevin Schroeder's Blog:
Connecting to PHPCloud.com through Zend Studio 9
November 16, 2011 @ 08:02:19

If you're a Zend Studio user and have been wondering how to hook it directly into the phpcloud service from Zend, Kevin Schroeder has posted complete instructions in a new post today (complete with screenshots).

PHPCloud.com is the landing page for our new cloud offering. Using the Zend Application Fabric you can build your applications in the same environment as you will be deploying your apps to. The application is built on my.phpcloud.com and you can then deploy it onto any platform where the Fabric is supported. But how do you get started? Phpcloud.com has been built in a way where you can connect with any IDE. With Zend Studio 9 that connectivity has been built directly in to the IDE.

It's a simple six (well, technically seven) step process that involves setting up a new project, configuring some deployment options and hitting "deploy". Zend Studio makes it super simple to launch your application as many times as you need - a one-click deploy once things are all set up.

0 comments voice your opinion now!
zend zendstudio phpcloud deploy ide integrate


Lukas Smith's Blog:
Drupal using Symfony2 HttpFoundation is huge
September 06, 2011 @ 11:37:35

As Lukas Smith mentions in his latest post, the Drupal project has made a switch to use the HttpFoundation component of the Symfony2 project as a integral part of their HTTP handling.

[...] The fact that Drupal8 will use Symfony'2 HttpFoundation component is huge, because it will make integration a breeze. Basically Symfony2 converts a Request instance to a Response. So if both Symfony2 and Drupal8 use the same Request and Response classes it means that creating a sub-request and handing the response from Drupal8 into Symfony2 (or vice versa) will require no conversion at all.

He also points out Drupal's use of the ClassLoader component will make integration even easier. This is great news for Symfony fans out there that have been needing to work directly with a Drupal install (or even those wanting to create new Drupal additions in the environment they're familiar with). You'll have to wait for Drupal 8 to get these benefits, though.

0 comments voice your opinion now!
drupal symfony2 component cms integrate


DevShed:
Integrate Facebook Comments Code with Wordpress or PHP
June 23, 2011 @ 12:16:19

On DevShed today there's a new tutorial showing you how to integrate Facebook commenting with your PHP application via the Facebook Connect API.

Facebook comments are a great way to optimize your site for social media and add a level of user-engagement to you site. Quality website comments can increase your website's credibility, as well as its traffic. This tutorial will teach you how to use Facebook's API Connect to integrate comment boxes on your website in a few simple steps, utilizing a little PHP and some elbow grease.

You'll need to set up an application for your PHP app to make the connection. This will give you the unique keys for your application that'll be used in setting up the commenting. By including a Facebook javascript file, all you'll need to do is output a special "fb" HTML tag with the right attributes and a meta tag or two to configure it with your application's keys.

0 comments voice your opinion now!
facebook comment integrate application tutorial


Juhana Rasanen's Blog:
Using MongoDB with CodeIgniter
November 05, 2010 @ 11:01:28

On the Juhana Rasanen's blog today there's a new tutorial showing you how to use the popular NoSQL database MongoDB with an application written in the CodeIgniter framework.

Considering using MongoDB instead of a SQL DB in your next CodeIgniter project? Well, we were and decided to take a stab at it, and fairly soon discovered that it is pretty straightforward. Even more so, if you don't try to use CI Active Record, but use native PHP Mongo interface to store and query your data. That suits our case, as we are planning to access the data mostly from Javascript UI over Ajax - in which case it is quite simple to just get the document from Mongo as an array and then serialize it to the UI using PHP JSON functions.

He talks about his extension of CI_Session to handle the session management and user authentication pulled from the MongoDB and used as normal in your application. He's made the package available for for download if you'd like to see how its implemented (there's a README for installation instructions).

0 comments voice your opinion now!
codeigniter framework mongodb database nosql integrate session



Community Events





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


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

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