Archive for the ‘symfony2’ Category

My first Symfony 2 Web Application – The Journey – Installation

Happy New Year, 2013, its finally here … Well in 2012, I should say I had Symfony 2 envy, almost akin to a high school crush, so after suffering in silence for so long I have finally decided to jump in with both feet.

I am developing a simple website which is esentially a set of utilities for my home country Uganda, and the idea is that I can learn a bit more advanced PHP but also opensource it later to use as a teaching tool for other local developers (oh yes, I want to share my knowledge too). This will also give me the chance to see if I still got it in me because I do not touch code in my day job, akin to Neo in the matrix hacker by night.

So what I have I used, well an evaluation copy of Zend Studio 9 (used to use an older version at my work place), Symfony 2 (latest distribution), Twitter Bootstrap, JQuery, Git (I am using a private Bitbucket repo) and well an open Google tab. My first words are wow!! Alot has changed in the world of PHP since I last used it, Composer, Less, Sass which requires Ruby … But hey here goes

BTW I am running all this through a WAMP (http://www.wampserver.com/en/) install again the fastest I could get things to work, you could use XAMPP too but I have never done so. I am using PHP 5.3.13 with MySQL 5.5 on Windows 7 64bit. One question I may receive: As a newbie why are you going for the whole enchilada (Symfony2, Composer, Bootstrap Integration etc) – since this is a clean break I am trying to also get an understanding of the different tools that have been developed, how to use them and what they mean for the “average” web developer to answer the question – are they worth it?

  1. So first step was installing composer, which I did following the instructions here http://getcomposer.org/doc/01-basic-usage.md after which I installed it globally so that I could call it anywhere following the instructions in the answer http://stackoverflow.com/questions/12059397/is-there-any-way-to-install-composer-globally-on-windows  
  2. Next was to install Git using Git for Windows (http://msysgit.github.com/) needed even for local staging
  3. Being a git newbie, I could not get things to work properly to create the project I followed the workflow below: (I stand to be educated on a better workflow)
    • Created a new Git project on Bitbucket
    • Created a new PHP project from Git within Zend Studio – which gets everything configured well
    • Downloaded the Symfony 2 standard edition and copied the files into the new project
    • Followed the instructions here to commit it …
  4. Integrated Twitter Bootstrap using the Mopa Bootrap Bundle ( https://github.com/phiamo/MopaBootstrapBundle) however this required me to install Ruby for the LESS integration using Ruby gems while I initially run into a couple of problems with the installation of mopa/composer-bridge it was probably a connection issue. Also note the following:
    • Running the composer update command requires a console with administrator privileges to be able to create the symbolic links
    • The lessc.bat file in the Ruby install folder needs to be updated to use absolute paths to ruby.exe other than the relative paths in the file
    • Well after a lot of troubleshooting I found out that the ruby gem for Less was depreacted so I ended up using LessPHP (PHP compiler for less in pure PHP) following the instructions at http://isometriks.com/using-less-with-symfony2

Now the initial installation is done, I have my Symfony2 project running with Twitter Bootstrap integrated, it has been about 10 hours of work, but totally worth it as a learning experience

Advertisements

Uganda Web Developer Workshops: Rotary Style – Idea looking for Partners and Direction

This is an idea that has been growing in my mind, and I seem to finally have a handle on it. I have been a professional PHP web developer for the last 12 years, and have gone through the learning and transition cycles from learning a new language from Visual Basic 6 and MS Access to Java/JSP/Servlets to PHP, and developing in the language from direct database access using mysql_query through a custom developed database class into Zend Framework for 2 years with Doctrine 1 and 2 ORMs.

My biggest challenge has to do with the fact that there are no places to go and talk code, PHP/Javascript/Database in Uganda, along with the experiences and challenges facing web development with “need-to-have” practices like:

  1. Refactoring
  2. MVC design for web applications
  3. Version control – branching, merging, version tagging and management
  4. Testing – unit and functional testing, load testing
  5. API development (okay this is pushing the enveloper)
  6. Continuous integration, code quality metrics – complexity, modular development, cyclomatic complexity
  7. Team Style development – PSR 0 and PSR 1 compatibility
  8. Frameworks – Symfony, Zend Framework, Kohana, JQuery, Twitter Bootstrap
  9. Advanced CSS and HTML 5 – style guides, browser targetting, mobile development

I am also looking at doing this Rotary style, 1 hour developer meetings once in 2 weeks, then later once a week, same night, same location.

The bottom line is that we develop the quality of the available pool of web developers by growing a community, having role models, to also put a brighter face on the industry, improve perceptions and make it clear that this is an area that has professional practices. It is a win-win for all involved

Any ideas who has done this before, what were your challenges and trials, who would like to partner on this?

%d bloggers like this: