Featured Post

Google Kraków Open House 2014

In the evening of the last Thursday (2nd October 2014) I was attending Google Kraków Open House 2014, which took place in the office very close to Main Marlet Square, where Googlers (Google’s employees) work. Although there were about 40-60 people invited, there was a selection before the event,...

Read More

A review of the book: Zend Framework 2 Cookbook from Packt Publishing

Posted by evolic | Posted in Book review, Programming, Web development | Posted on 04-05-2014

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

0

Review of the book: Zend Framework 2 Cookbook written by Josephus Callaars, issued by Packt Publishing.

There is many cookery books although I haven’t seen yet any about Zend Framework 2.
No matter how you name the book, title is just a title and every book have to stand out of the competitions. Otherwise is will be just one of the many cookbooks…

 Zend Framework 2 Cookbook

To be honest – there is no too much books about Zend Framework 2, so writing such book is worth fighting for.

The typical cookery book contains many recipes, provided with nice looking pictures and hints about how to make some dish or meal. Cookbooks teach people by practice and repetition till we reach perfection.

We won’t become good cook-progammer in 24 hours, which is quite often used in the books related to Computer Science, trying to convince us that it is possible.

Did the author rised to the occasion?

I will try to answer for that question in this review.

[PL] Recenzja książki Zend Framework 2 Cookbook

Posted by evolic | Posted in Book review, Web development | Posted on 03-05-2014

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

2

Recenzja książki Zend Framework 2 Cookbook autorstwa Josephus’a Callaars wydanej przez Wydawnictwo Packt Publishing.

Książek kucharskich jest wiele, choć poświęconych Zend Framework 2 wcześniej nie widziałem. Nazwa-nazwą, tytuł-tytułem, jednak każda książka musi się czymś wyróżniać na tle innych. Inaczej będzie po prostu jedną z wielu książek kucharskich… a tych jest jak na lekarstwo.

Okładka książki: Zend Framework 2 Cookbook

Co prawda książek poświęconych Zend Framework 2 jest wciąż niewiele, także jest o co walczyć.

Książka kucharska zawiera zwykle wiele przepisów, opatrzonych ładnymi zdjęciami i wskazówkami jak konkretne danie wykonać samodzielnie. Uczy więc przez ćwiczenie i powtarzanie, aż dojdziemy do perfekcji.

W końcu dobrym kucharzem-programistą nie staniemy się w 24 godziny, jak często przekonują nas książki poświęcone technologiom informatycznym!

Czy autor tej książki stanął na wysokości zadania?

Postaram się odpowiedzieć na to pytanie w niniejszej recenzji.

[PL] Recenzja książki Zend Framework 2 Application Development, wydawnictwa Packt Publishing

Posted by evolic | Posted in Programming, Web development | Posted on 15-02-2014

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

0

Recenzja książki Zend Framework 2 Application Development from Packt Publishing

Na początku tej recenzji chciałbym zaznaczyć, iż jest to moja druga książka o Zend Framework 2 (ZF2), jaką miałem okazję czytać. Daje mi szerszy obraz na literaturę poświęconą nowej wersji znanego frameworka oraz możliwość porównania niniejszej pozycji z inną książką, którą miałem przyjemność czytać wcześniej.

Zend Framework 2 Application Development

Szukasz książki typu “reference book“?

Pisząc o tej książce chciałbym wspomnieć o bardzo ważnej rzeczy: nie jest to książka opisująca Zend Framework 2 bardzo szczegółowo (po angielsku reference book), traktująca o wielu komponentach frameworka i jego architekturze. Jeśli szukasz takiej właśnie książki to zachęcam do lektury innej pozycji, a wiem, że takowa istnieje, bo taką książkę miałem okazję przeczytać przed tą pozycją. Wystarczy trochę wysiłku by ją zidentyfikować (jej autor jest pochodzenia niemieckiego).

Review of the book: Zend Framework 2 Application Development from Packt Publishing

Posted by evolic | Posted in Programming, Web development | Posted on 13-02-2014

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

2

Review of the book: Zend Framework 2 Application Development from Packt Publishing, written by Christopher Valles.

Zend Framework 2 Application Development

At the beginning of this review I would like to say that it is my second book about Zend Framework 2. This gives me a bigger picture and I could compare this book with the previous one.

What I should say first is to that this is not a reference book. If you are looking for the one, which describes Zend Framework 2 in details, covering many components and new things in second version of the framework – I would recommend to find another book and read it. I was hopefully a reader of such book – it was the first book I read about ZF2.
Although the author wrote in the book that he covers over 90% components of the framework – I revised it and in my opinion it is just a misunderstanding.

CSS and JavaScript files order in Zend Framework templates

Posted by evolic | Posted in Programming, Web development | Posted on 07-06-2013

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

0

Today I would like to focus on one thing in Zend Framework (no matter if I talk about version 1.x or 2.x).

There is a problem with positioning CSS and JavaScript files in templates (using headLink() and headScript() helpers). I will demonstrate it in below samples and give the solution for that situation.

So let’s begin!

Unit testing in Zend Framework 2

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 07-04-2013

Tags: , , , , , , , , ,

3

Overview

Today I would like to focus on the unit testing in applications made with Zend Framework 2 and Doctrine 2 ORM. Sample unit tests were included with Zend Framework 1.x and they are also attached to Zend Framework 2 Tutorial.

Important is, that we have two approaches of testing controllers for the latest version of the framework:

  • first, based on class PHPUnit_Framework_TestCase,
  • and the second, which uses AbstractHttpControllerTestCase class.

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.