Maybe it’s nothing special and difficult but i remember the day (some time go)Â when i had a problem with setting up default database encoding in my application. I recently received some questions about it so i decided to post this here and help some of you.
Continue reading ‘Symfony - how to set up default database encoding?’
After a couple of weeks I finally found some time to write about Symfony and ExtJS. This time i want to show how to put together to work Symfony 1.4, ExtJS 3.2 and Grid Filter Plugin - for me it’s the one of most powerfull filtering solutions i have ever seen.
Since my last entry about displaying data in ExtJS Grid Panel i have updated Ext library to 3.2 version - they have added some nice features (more information you can find in changelog 3.1 and changelog 3.2) and changed some ExtJs components (more details you will find later).
Continue reading ‘Advanced data filtering with Symfony 1.4 and ExtJS 3.2 [english]‘
Recently i created nice and simple Symfony widget: sfWidgetFormJQueryMultiSelect. It’s really simple in use and implementation. I have used code written recently by Eric Hynds: jQuery MultiSelect Plugin w/ ThemeRoller Support and standard sfWidgetFormChoice.
Continue reading ‘Symfony and jQuery: sfWidgetFormJQueryMultiSelect ver 0.1′
Last week I received my copy of new Symfony book: Symfony 1.3 Web Application Development. What is really interesting about this book that it has been released even before Symfony 1.3 Alpha version. The book gives an overview of Symfony Framework and covers almost each stage of application developing process: from creating the application structure and database schema, to creating the Admin Area, performance optimization and deployment. As we know the best way to learn is to learn by example and this book describies how to build milkshake shop quite well.
Continue reading ‘Symfony 1.3 Web Application Development - my review’
W ubiegłym tygodniu ukazała się wersja 1.3 alpha znakomitego frameworka Symfony. Z pewnością nie uświadczymy rewolucji podobnej do tej w momencie ukazania się sf 1.1 i 1.2, jednak liczne drobne zmiany jakie wprowadzono powinny dość znacząco usprawnić naszą prace - pełna lista zmian dostępna jest tutaj. Wersja 1.3 podobnie jak 1.1 ma być jedynie wersją przejściową do 1.4, która ma się ukazać dopiero w 2010 roku i która będzie wspierana do 2013.
Continue reading ‘Symfony 1.3′
After a couple of weeks i decided to write another post about Symfony 1.2 and jQuery. This simple tutorial shows you how integrate jQuery layout plugin, jQuery accordion widget for navigation and Symfony admin generator.
Symfony offers nice and powerfull admin generator feature. After rewriting in version 1.2 it uses form and filter framework which makes it really easy and customizable. For more details you need to check admin generator documentation .
“JQuery Layout plug-in was inspired by the extJS border-layout, and recreates that functionality as a jQuery plug-in. The UI.Layout plug-in can create any UI look you want - from simple headers or sidebars, to a complex application with toolbars, menus, help-panels, status bars, sub-forms, etc.”
What i really like about the admin generator is its… generator feature. After a couple of minutes we have all the basic actions for our models. We can also add custom actions and modify templates. The missing component for me is navigation. We can create some simple navigation between modules alone, we can also use nice Symfony plugin: sfAdminDashPlugin or jQuery plugin: layout. The picture below shows the final result of what i’m going to do in this tutorial.

Continue reading ‘Symfony 1.2 + admin generator + jquery layout plugin’
New jQuery 1.3 and its user interface have a lot of great features. But if we want to use our jQuery validation plugin with 1.3 version we need to upgrade plugin version to 1.5.1 (or higher), which is still compatible with 1.2.6. New Validate Plugin version (1.5.2) came up with some nice features like integration with UI Tabs. The following example shows a real implementation of user profile form divided in three sections.
Continue reading ‘Symfony 1.2 - using sfForm with jquery validation plugin - part 2′
It’s kind of update of function: unsetAllExcept. Lately I had a problem with unsetting some default widgets. Using for example propel and relations m-n, auto-generated forms have widgets that cannot be unsets using the current version of function - it only unset widgets by form object fields.
I think it could be useful:
<?php
/**
* unset all fields except given parameters
*
* @param array $fields Array of fields
*/
public function unsetAllExcept($fields = array())
{
$tmp = array_keys($this->widgetSchema->getFields());
foreach(array_diff($tmp, $fields) as $value){
unset($this[$value]);
}
}
?>
Celowo nie chciaÅ‚em tytuÅ‚ować wpisu Symfony vs Zend Framework bo wpisów o podobnej tematyce jest bardzo dużo. Jedne mniej, drugie bardziej konkretne i sensowne. Można siÄ™ spierać który z tych dwóch frameworków jest lepszy, jednak tak naprawdÄ™ pytanie brzmi, który jest dla nas bardziej odpowiedni, intuicyjny i z którym bÄ™dzie Nam siÄ™ lepiej pracowaÅ‚o. Ogólnie rzecz biorÄ…c bardzo drażniÄ…cÄ… sprawÄ… sÄ… wszelkie kłótnie: “który framework lepszy?”, “który wybrać”, “Zend Framework vs Symfony” - wszystko zależy od wymagaÅ„ projektu i programisty. Porównanie tym bardziej jest trudne, że Zf i Sf z zaÅ‚ożeÅ„ oferujÄ…c podobne możliwoÅ›ci, sÄ… zupeÅ‚nie różne. PostanowiÅ‚em wiÄ™c przedstawić moje skromne zdanie.
Z góry zaznaczam, że nie będę tutaj pisał nic o Cake PHP, CodeIgniter czy Kohanie. Nigdy nie miałem okazji pracować z żadnym z tych frameworków i w najbliższym czasie nie przewiduje, żeby coś w tym temacie się zmieniło.
Poniżej postaram się krótko i konkretnie przedstawić moje osobiste przemyślenia na ten temat, na podstawie własnych doświadczeń jakie mam w pracy z Sf i ZF. Wszelkie uwagi i opinie są bardzo mile widziane.
Continue reading ‘Symfony i Zend Framework’
I was wondering if there is any simple way in Symfony for calling cron job. I found in the documentation that we can use Batch files - it is kind of PHP script that looks similar to symfony front controller, all we need to do is to initalize symfony, parse project and application Configuration. Quite cool but there is better way (just in my opinion) to access all symfony features from the command line: tasks.
Every time we are creating project, generating modules, building models/forms we use standard symfony tasks. Task are grouped by namespace and name - this allows us to build intuitive script names. For example namespace: propel or doctrine, and the task name: build-model, build-sql. Why we should use tasks instead of batch files? Tasks are really simple, powerful and they take care of parsing command line arguments and options, initalizing needed configuration and classes. To create a simple task we have to create a class that exetend sfBaseTask and put it into lib/task/ directory. File name must ends with “Task.class.php” to be properly loaded.
Another great thing about tasks is that Symfony also provide task for generating new, custom tasks 
Continue reading ‘Symfony 1.2 - tasks and cron’
Najświeższe komentarze