How to install ApiGen in NetBeans 8.0 using PEAR

Hi All,

Today I am going to show you how to correctly install ApiGen in NetBeans 8 IDE using PEAR. Well, ApiGen is a handy, powerful and customizable code documenting tool which will help you to generate code documentation for your source code. So let’s begin installing ApiGen in to NetBeans.

  • First, you need have PHP installed in your machine and environmental variables set for the installed PHP. (If you need any help in installing PHP or setting environmental variable, just drop me a comment below, I will help 🙂 )
  • Open up your command prompt in Administration mode (right click and run as administrator)  and type this command to enable PEAR auto discovery mode. Auto discovery mode will help you to automate dependency installation. Because ApiGen requires tools such as Texy, Nette and so on. The good thing is when the auto discovery mode is on, it will install all these dependent tools automatically for you.
    pear config-set auto_discover 1

    apigen Continue reading

Share

Extending Symfony 2 Web Application Framework Book Review

Hi all,

Recently I found a book which is related to Symfony 2. The book is called Extending Symfony 2 Web Application Framework by Sebastien Armand. So I made a brief review about it. Find my review below.

I would say, Extending Symfony 2 Web Application Framework by Sebastien Armand is one of the few knowledge sources out there in the market which seriously discuss Symfony 2 in many directions. The book is organised in valuable six chapters and guides you through a real time social website (meetups) example. These chapters contains many deep discussions regarding Symfony 2 services, listeners, dependency injection, commands, templating engine including Twig, database layer of Doctrine including creating a your own data type and so much more. Also this book covers a handy discussion regarding ensuring the security and increasing the performance while maintaining a good solid code. As an overall, this book is ideal for someone who is already familiar with Symfony 2 framework, but loves to enhance and polish their thorough understanding about Symfony 2, tailor / structurize pre build applications using much effective approaches and developing easily shareable bundles.

Where you can buy the book :- http://www.packtpub.com/extending-symfony-2-web-application-framework/book

Cheers!

Share

Create your first route | Symfony 2 | Beginners guide

Hey Symfony 2 lovers,

Let’s have a good understanding about routings in Symfony 2. Routing is the navigational paths (directives) in your application. For instance if you want to show all your products in your shopping cart application, which was developed by Symfony 2, routing could be either ‘your_cart/web/app_dev.php/show_all_items’ or ‘your_cart/web/app.php/show_all_items’. In here ‘your_cart‘ is the name of your application, ‘web‘ is the default path in Symfony 2 (you can hide this later), ‘app_dev.php‘ and ‘app.php‘ are two environments in the same application, such as development and production environment. These environments are there to distinguish your application in different purposes which I am not going to discuss any further. Our main concern in here is the ‘show_all_items‘ bit. This is a routing which fires a function in a controller. If you are new to a frameworks this concept might be little surprising to you. This is how the major frameworks work. When you hit a path, such as ‘show_users‘ will call a predefined function in a predefined controller. If you see something like this ‘show_users/10‘, probably that is to show how the user which has the id of 10, something like that. This 10, will be passed to a method as a parameter, such as ‘public function showUser($id)’.
Continue reading

Share

Injecting Services in Symfony 2

Hi all,

Let’s have a quick but precise look at injecting various services in Symfony 2 today. Before going any deep, what does it mean by injecting services ? Well, if I am not so wrong, not many PHP frameworks do favour injecting services as Symfony 2 does. Injecting various services into the application is a really beautiful, cool thing, I would say. If you manage to inject services properly, you really don’t want to take care of object creations. Well, what’s injecting service actually is ? Injecting a service in Symfony 2 is, you define, a service or set of services (in PHP, classes) at the application load time, then you reuse those services as much as you want, any time during the execution, without redeclaring or creating objects of those services (classes). In other words it will help you to “standardize and centralize the way objects are constructed in your application” . There are 3 types of injections in Symfony 2, which are,

  1. Constructor Injection
  2. Setter Injection
  3. Property Injection

In this post, I will be discussing about the ‘Constructor Injection’, because I thought it might be useful to know how this type of injection works before knowing the remaining two.  Continue reading

Share