Netbeans-Codetemplates for Symfony2

14. April 2011 in IDE, Symfony, Symfony2

As I’m working with Netbeans when developing Symfony2-Applications I created some Code Templates and Shortcuts to work more effective with Netbeans and Symfony2. If you are interessted you can download the Settingsfile and import it to your Netbeans installation. There is a Symfony 1.x and Symfony2 version available.

You can get it here: http://www.symfony-zone.com/wordpress/netbeans/

If you miss a template just send me feedback

Using PdoSessionStorage in Symfony2

13. April 2011 in Sessions, Symfony2

Update: I wrote a more detailed cookbook for the Symfony2 documentation which is online from today: Documentation

 

As I told you in my last blog entry, I had the problem that there is no documentation on how to use the PdoSessionStorage in Symfony2. I opened a question on Stackoverflow but there was no one who could help me. Yesterday I found some time to investigate this problem. After reading the Symfony2 sources I found my way. So here it is:

All you need to do is to change some parameters in the app/config/config.yml file (or one of the environment dependend config-files):

session:
    default_locale: %locale%
    lifetime:       3600
    auto_start:     true
    storage_id: pdo
    db_table: session
    db_id_col: session_id
    db_data_col: session_value
    db_time_col: session_time
  • db_table: The name of the session table in your database
  • db_id_col: The name of the id column in your session table (VARCHAR(255))
  • db_data_col: The name of the value column in your session table (TEXT or CLOB)
  • db_time_col: The name of the time column in your session table (INTEGER)

Now you have to define a PDO connection in the config.yml. For that create a new service:

services:
    pdo_connection:
        class:    PDO
        arguments:
            dsn:      "mysql:dbname=sf2demo"
            user:     root
            password:

That’s it :)

Lessons learned from a Symfony2 – Training session

11. April 2011 in Symfony, Symfony2, workshop

I have given my first Symfony2 training session last week. It was a bit short (two-days) but I was able to cover the basic parts of Symfony2. As I have given a lot of symfony 1 trainings in the last three years I was pretty excited how this session will work out. Everything was new, the slides, the samples and of course the framework ;) Here are some facts I learned in this two days:

The good

  1. ASP- and Java-Users love Symfony2 :) Depepency Injection, POPOs, Entity Manager. All these concepts they know can be easily used with PHP.
  2. The new WebTestCase possibilities are incredible. Everyone liked the concept of using BrowserKit and Crawler to test simple webpages. The Usage of PHPUnit instead of
  3. Twig got some positive feedback too. Some didn’t really see the positive effects in using Twig instead of PHP on first sight but after some samples a a quick glance at the possibilities of the included filters and functions most of the attendess were convinced.
  4. Doctrine2 is fast and easy to use. Java-/Hibernate-Geeks had an easy start here because of the familarity of the API
  5. Veteran-PHP programmers without framework experience liked the possibility of MVC, environments etc.
  6. The new security subframework got some very positiv feedback too. Seems a good solution for most of the people

The bad

  1. Lack of documentation at the time of training. This is obvious and predictable. The training was done with PR9 and PR10 of Symfony2. Some of the documentation is pretty good at the moment wheras some is up to none existant or useless. A configuration reference was mostly missed. There are a lot of configuration parameters buried in the depth of Symfony and it feels like no one except of the core member are know how to use them (take a look at this for example: Stackoverflow). The Form-Framework is difficult to use at the moment because of the lacking documentation
  2. Compared with symfony 1 I saw that it is more difficult to get the attendees to a point of initial understanding how a Symfony application is build and working. This is because of the lack of Convention over configuration. At the moment I’m feeling the Configuration over Convention difficult to explain.
  3. The possibility of using different ways of configuration was kind of confusing to some of the attendees. When should I use YAML, XML or annotations? Difficult to get a common understanding on this. This was even worse under the configuration possibilities are not proper documented. Doctrine is a good example here. The Annotations are described in detail but the YAML not. I’m not sure how this will work out for large development teams when some will start to use YAML others PHP…
  4. Best-Practises are missed too. This is also understandable cause ther is no stable version but I think this is something that will take some time (probably until 2.1 or even 2.2). The biggest problem: Where to put the code? Especially database oriented code.

The flexibilty of Symfony2 is incredible but I have learned the last days that this is a high hurdle to take for a lot of developers. Compared with symfony 1 I think the lack of best practises and convention over configuration is the most time consuming part of getting productive with Symfony2. The new possibilities and features of Symfony2 are awesome and it is interessting to see how good some of the existing Bundles already are.

I have two more Symfony2 trainings coming in the next months. Im excited to how Symfony2 will evolve over the time.

Timo

First Sourcecode of TimeHive online

3. February 2011 in Symfony, TimeHive

I have been workign on a new open source project in the my sparetime of the last few weeks. TimeHive is a project timetracking solution written in Symfony. The sourcecode can be found at GitHub . At the moment there is no dedicated webpage for TimeHive, but I will setup one in the next few days. The installation has to be done manually at the moment (See README file).

Here are some teaser screenshots :)

timehive_dashboardtimehive_timesheet

Take a look at it. I appreciate every feedback (bug, patches, ideas…)

Timo

Letzte offene Symfony Schulung in 2010

31. July 2010 in General

Hallo,

vom 29.09. bis 01.10. werde ich meine für dieses Jahr letzte offene Symfony-Schulung halten. Der Schulungsort wird voraussichtlich Heilbronn sein (Baden-Würtemberg). Die Schulung kostet 990.- Euro pro Person und dauert 3 Tage.  Mehr Informationen auch zu den Schulungsinhalten gibt es hier.

Some seats free for the upcoming german symfony training

25. May 2010 in Symfony, workshop

There are some seats free for my upcoming german symfony training session (http://bit.ly/adl47z). This training takes place mid-june (16-18th June) in a training center in Heilbronn.

Es sind noch ein paar Plätze für meine kommende offene Symfony-Schulung verfügbar (http://bit.ly/adl47z) Diese findet am 16. bis 18. Juni in einem Trainingszentrum in Heilbronn statt.

Netbeans Settingsfile for Symfony

16. April 2010 in General

As I’m working with Netbeans when developing Symfony-Applications under Windows I created some Code Templates and Shortcuts to work more effective with Netbeans and Symfony. If you are interessted you can download the Settingsfile and import it to your Netbeans installation.

You can get it here: http://www.symfony-zone.com/wordpress/netbeans/

sfAmfPlugin 1.5.0 released

11. January 2010 in AMF, Flex, Symfony

Hi all,

I have just released the version 1.5.0 of the sfAmfPlugin.You can get it from here.

The new version brings some fixes and new features. Most noteably:

  • Updated version of SabreAMF inlcuded (latest development version)
  • Symfony 1.3 and 1.4 Support
  • First version of a AMF Service Browser (thanks to Benoît Gouchet)

The plan for the next version shows improvements for Class Mapping, VO and Caching. And I promise to create a better documentation for it…

German symfony trainings 2010

4. January 2010 in General

Hello all,I just anounced the dates and locations for my german symfony trainings/workshops. The workshops take place in Stuttgart and Heilbronn. The language of the workshops is german. 
You can find more information and prices at the following training-website
Maybe we can see us at one of these events :-)    

Vote for Lime-Support in Netbeans

23. October 2009 in General

The Netbeans-IDE already has PHPUnit support. It is possible to run the unit tests from the IDE and get the result shown in a pretty way. I opend a feature request at the netbeans tracker to support Lime too. I think Lime2  support should not be really difficult through the xUnit XML-Resultfile-Support of Lime2. If you like to have the feature in a future version of Netbeans just vote for it under: http://www.netbeans.org/issues/show_bug.cgi?id=175256

:-)