Skip to main content

Blog

Doctrine custom repository on Symfony2

Here I am with the first post of the 2015. Happy new year! I'm still learning and working with Symfony2 and today I've had some problem about setting a custom repository class that extends a Doctrine entity. Here is the specific page and paragraph on the offcial documentation. They Symfony documentation is great, much be... [...]

Generate PDF documents using ZF2 and DOMPDF

If you are searching a library to generate PDF documents using Zend framework 2 in PHP, I suggest DOMPDF. You can integrate it with the framework and easily convert HTML documents to PDF.This is very useful if you have some data into your MySQL database and you want to create reports and documents. Just create a simple web pag... [...]

Symfony 2 and Doctrine

If y0u have a database, probably you need to generate entities automatically. We'll use the console on app\console. But there are other small tricks you have to know. Let's see some very useful commands:MySQL enumUsing basic Doctrine commands you can have an error about enum types. It's highly recommende... [...]

Amazon S3 storage, getting started

My Zend2 application must store attachment files but we don't want to store them on a shared hosting. We can have files from multiple website, so I was searching for a cloud storage solution. Here we have Amazon S3, an alternative to Dropbox or other services like this. We can interact with the AWS platform using SDK for our... [...]

Writing a Doctrine custom function

Unfortunately Doctrine does not support so many SQL function so you have to build a class to let him use a custom function. Let's start building a DATE_FORMAT function. Let's write the class:namespace Application\Model\Doctrine\Functions;use Doctrine\ORM\Query\Lexer;use Doctrine\ORM\Query\AST\Functions\Functi... [...]

Deploy a Symfony 2 app on a shared hosting

Move all the contents of the directory called web on the root of the Symfony2 projectRename app_dev.php in your index.phpEdit the .htaccess file replacing all app_dev.php with index.phpEdit your index.php simply updating the require_once paths to let it include the files on the right paths:<?php... [...]

Zend Framework 2 tips and tricks

Zend Framework 2 is becoming the most popular PHP framework. I'm using it every day since a couple of months and I still have many difficulties to build my own and simple web application. The learning curve is very steep and you have to handle a large amount of code. But it has a large community, strong MVC implementation, l... [...]

Bootstrap 3 template tools

Why have I decided t0 use Bootstrap 3 instead of 2 for my new project? I'm searching for new and simple templates made with Bootstrap 3. There aren't many options online but you can build your own template using different tools. BS3 is newer and I really love the new features such as font awesome and new g... [...]

Zend2 and Doctrine2 tricks

I am trying to work hard with Zend framework and taking advantage using a powerful ORM like Doctrine2. I have many difficulties but after many research and coding, I've gathered some useful tricks and links.Generate entities from databaseYour application must be connected to the database and you must set the doctrine... [...]

Zend Framework 2 and PHPUnit

Modules are the most exciting news on ZF2. All files seem to be organized and the core structure on your application is more clear.Unit Test on the Skeleton ApplicationFirst of all download and install the skeleton application using composer or download the zip file. There are some different way to download Zend2 + Skele... [...]

PHP coding standards

PHP is flexible, too much flexible! It hasn't specific variables types. And you have to pay attention to handling a workflow, especially if you are working with sessions, cookies, forms, and many other features. A coding standard in PHP is necessary anyway. Here we have specific ways about how to organize your code. Let... [...]

Symfony2, working with Doctrine entities

Let's see some commands and snippet to interact with Doctrine2. If you use Netbeans IDE, you'll see how easy is to call the entityManager and other objects of this ORM. But remember to put all queries on your model and keep the controller functions as clean as you can.Enum annotationDoctrine is integrated with Sy... [...]

What's new on Zend framework 2

As you know Zend 2 is very different from the first version. Let's start with this amazing answer on StackOverflow. Architecture ZF1 is based on MVC , ZF2 is based on MOVE. Huge difference. MOVE = Model Operations Views Events , MVC = Models Views Controllers.Models: it contains the application status and its inf... [...]

Browser automation and test tools

Here we are with a list of the most popular test and browser automation tools. The testing discipline is very complex and the tester is responsible even for the tools he's choosing to do his job. I hope the following links will be helpful for all beginner testers.Browser automationSelenium tools: RC, Server, Grid,... [...]

PHP 7.0 new features

Rasmus Lerdorf has revealed all the new features during a preview before the launch of PHP 7: check out this slide. I'm having a lot of problems to switch from a PHP 5.6 installation on Ubuntu or Kali Linux. Even PHPBrew is not helping me so I accept any hints and solutions. But let's see how we can install PHP 7. F... [...]

Facing Agile Retrospectives

The scrum teams use the retrospective to watch their steps, think about what they have done and search more improvements. Good things, bad things and mistakes. All must be clear and easy to understand. Do you think it's easy? Maybe if you work effectively with your team or better, if you are working in a team for a long time... [...]

Zf2 initializers, listeners and factory references

Almost always in a web application, you need to set some features before starting to do something in your controller. I'm having a lot of difficulties about keeping the code clean and simple in Zend. Let's see how initializers, listeners and factory pattern implementation can help us. I've gathered some very good res... [...]

Zend framework 2 performance

Even on localhost, if you look at the zend developer toolbar, you will see that the loading page time will be decreased after doing these actions. They are simple but there aren't so much explanations and documentations on the web.Generate template mapYour application will load the map for each module. Go to your mod... [...]

Pomodoro timers

Here we are with the pomodoro technique. This time management technique is very important tocontinuously improve our time management skill. Simply take your time and before starting the timer, calculate a short planning and some seconds or minutes to get conclusions and see what you've done during the session. More info... [...]

An overview on NoSql, Big Data and Graph database

NoSQL database on the web and the relation among them, big data and graph database. I want to understand how this technology work. BigData, NoSql and Graph databases are related.NoSQL databaseWe have a very big and interesting topic. Handling big data with databases, infrastructure or data warehouse. Big Table.... [...]