Featured Post

Mozilla Firefox addons

Many of you probably use Mozilla Firefox, I can’t imagine that you haven’t heard about that browser at all. What I want to speak about is Add-ons, by big A, because add-ons themselves are the biggest feature and power of the Firefox. I will focus on the two kind of add-ons: Must have –...

Read More

Localizing application in Zend Framework 2

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 29-03-2013

Tags: , , , , , , , , , , ,

1

Today I would like to focus on translating application in Zend Framework 2.

Overview

By default, tutorial application has included Zend\I18n\Translator\Translator configuration in /module/Application/config/module.config.php as follow:

It has also attached translation files in gettext format under the /module/Application/language directory.

There is over a dozen files like en_US.mo and en_US.po. You can edit .PO files (gettext source) with Poedit – a free, open source and cross-platform gettext catalog editor.

.MO file is automatically created (compiled), when you save the .PO file.

Program has very intuitive interface and looks like that:

Poedit - main window

Poedit – main window

There was missing Polish translation, so I created it on my own.

Creating one to many relation in Doctrine 2 ORM

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 23-03-2013

Tags: , , , , , , ,

0

Introduction

In this tutorial I will present relational mapping between albums and songs.
In Zend Framework 2 Tutorial we had only one table – it was called albums, and stored albums data.

Today we will extend our sample application with new table – songs.
Each album can has many songs, but single song can be connected to only one album.
It is called relation OneToMany in Doctrine ORM.

Update your database with following:

Integrating FirePHP with Zend Framework 2 using Composer

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 23-03-2013

Tags: , , , , , , ,

0

Introduction

If you previously integrated FirePHPCore with Zend Framework using this description just remove require_once(realpath(__DIR__ . ‘/../../vendor/firephp/FirePHPCore/FirePHP.php’)); instance, where you include FirePHP library in global.php

Modifying Composer configuration

Now you need is to update composer.json file as follow:

At the end update your vendor libraries:

Now you should be able to use FirePHP using Zend\Log writer and as standalone \FirePHP::getInstance(true)

And that is all in this topic.

Integrating FirePHP with Zend Framework 2

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 22-03-2013

Tags: , , , , , , , , , , , , ,

1

In this post I will show you how to easily integrate FirePHP – Mozilla Firefox extension with Zend Framework 2. FirePHP enables you to log to your Firebug Console using a simple PHP method call. All data is sent via response headers and will not interfere with the content on your page. FirePHP is ideally suited for AJAX development where clean JSON and XML responses are required.

General information

At the beginning some basic notes:

So download server side version and unpack the archive.
Find the FirePHPCore inside and copy it to /vendor/firephp directory.

At this step you should have FirePHP.class.php in the /vendor/firephp/FirePHPCore/.

Now rename FirePHP.class.php to FirePHP.php.

Once you successfully installed FirePHP extension in Mozilla Firefox you can get to next step – setting up the Zend\Log in our tutorial application.

Writing DQL statements

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 21-03-2013

Tags: , , , , , , , , , ,

0

Today I would like to focus on something, what Doctrine 1.x users know, but it looks a little bit different – Doctrine Query Language (DQL) statements.

In the last tutorial we had had working Album Controller, which was using Doctrine Entity Manager, to get the Album data. Now we will focus on something more advanced – writing SQL alike statements to get some data from the album’s table.

So lets begin…

Portfolio website released

Posted by Tomasz Kuter | Posted in Web development | Posted on 19-03-2013

Tags: , , , ,

5

Today I would like to inform you that I created website presenting my portfolio – projects I was involved with. In my opinion site looks good and is very readable for any users.

Currently it is static page – non CMS attached, but I am going to create own Content Management System in close future.

Porfolio is available at: http://evolic.eu5.org/

Any feeedback from your side will be very valuable.

Below some screenshots.

Porfolio website - homepage

Porfolio website – homepage

Porfolio website - language selecion

Porfolio website – language selecion

Porfolio website - contact page

Porfolio website – contact page

Mozilla Firefox addons

Posted by Tomasz Kuter | Posted in Internet browsing, Web development | Posted on 15-03-2013

Tags: , , ,

0

Many of you probably use Mozilla Firefox, I can’t imagine that you haven’t heard about that browser at all. What I want to speak about is Add-ons, by big A, because add-ons themselves are the biggest feature and power of the Firefox.

I will focus on the two kind of add-ons:

  • Must have – as I describe add-ons, which normal Firefox user should have,
  • and web development add-ons, which every Web Developer should use in his/her work.

Must have extensions

First of all, I would like to mention about Adblock Plus, which of I was talking in older post. IF you won’t like to see insistent ads – just install Adblock Plus. Very helpful is also Element Hiding Helper for Adblock Plus.

Next one is Tab Mix Plus, which has the biggest number of options relating to tabs and session. If you would like for instance open new pages in new window from the address bar or search bar (not loosing currently opened page) – just install this extension.

Last one of the normal add-ons is Better Privacy. If you want to keep your presence in Internet more anonymous – it is perfect choice for you.

Full list of my must have add-ons you will find at the end of this post.

Web Developer extensions

Second list of extensions is Web Developer add-ons.

I will encourage all people concerned on creating web sites to use following extensions:

  • Web Developer – many useful features helping web developers,
  • Yslow – great tool released by Yahoo for profiling and optimising websites to speed up the page loading,
  • Page Speed – another website profiler created by Google,
  • Firebug – a must to have extension for web developers and webmasters,
  • FirePHP – if you are PHP developer – you will start using it and will never know why you haven’t been doing it before!
  • SenSEO – helpful if you would like to make some SEO optimisation of the websites you are involved with,
  • HttpFox – advanced tool for HTTP requests investigation.

The list of all add-ons I am using you can find below:

Integrating Zend Framework 2.x with Doctrine 2.x ORM

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 02-03-2013

Tags: , , , , , , ,

0

Today I would like to present Doctrine 2 ORM integration with Zend Framework 2.
I had some problems with this, so I would like to share the solution for my issues.

Downloading sample project

First of all you need to download example ZF2 project. We have two example projects created by Zend Framework team:

I propose to download first one.
If you downloaded ZIP archive from the GitHub repository, just go to extracted project directory and run command line from that location.

Downloading vendor libraries

Now try to download latest Zend Framework by typing in command line:

You shouldn’t experience any problems in that.

You can get a message from composer, that it is not up to date:

You can upgrade it by typing the command:

Downloading Doctrine 2 ORM

Now we should modify the composer configuration file to be able download latest Doctrine 2 ORM.