I have a problem with frameworks: the OOP, design patterns and refactoring code are good but we still need a lightweight framework to upload all files and let an application works on a simple hosting provider. Indeed you cannot handle apache configuration files or something on low level on an external server! My application is s... [...]
Read MoreA vulnerability about these popular libraries has been discovered. This video demonstrates how to execute arbitrary code in a vulnerable PHP application that is using Swiftmailer, PHPMailer or ZendMail. The attacker uses a python exploit script to catch informations about the victim and perform the execution of arbitra... [...]
Read MoreLooking at the structure of the CodeIgniter framework, I've seen many good features and possibilities for developing applications using this system. But for me, the worst problem is the file and directory structure. Handle multiple applications is very difficult and you must always keep an eye on updating your files. Ma... [...]
Read MoreAs 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... [...]
Read MoreLet'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... [...]
Read MoreModules 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... [...]
Read MoreI 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... [...]
Read MoreWhy 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... [...]
Read MoreZend 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... [...]
Read MoreMove 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... [...]
Read MoreUnfortunately 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... [...]
Read MoreIf 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... [...]
Read MoreEven 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... [...]
Read MoreAlmost 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... [...]
Read MoreIf 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 page... [...]
Read MoreHere 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... [...]
Read MoreZend2 and Symfony2 are the most popular and probably the best PHP framework. YII is a good alternative and there are other good choices like Fuel PHP or Phalcon. But I love these 2 frameworks. Let's see a comparisonZend framework 2ProStrong coreGood communitySupport for various database systems and servi... [...]
Read MoreOk this year Symfony3 will be launched but in the best practice book there are some good recommendations and warning for the next future. I'll try to summarize the most interesting concepts and warnings. There are a lot hints about what you can or must do and some warning about common mistakes and what you must not do.... [...]
Read MoreOk this year Symfony3 will be launched but in the best practice book there are some good recommendations and warning for the next future. I'll try to summarize the most interesting concepts and warnings. There are a lot hints about what you can or must do and some warning about common mistakes and what you must not do.... [...]
Read MoreI like PHP MVC frameworks and now Laravel has all my curiosity. It's fast, modern, clean, more lightweight and with good documentation both in the code and on the official website. Built using Symfony and the Symfony components, Laravel has tools and libraries to work even more efficiently with all modern features like diffe... [...]
Read More