Posts Tagged ‘programing’

Vast majority (if not every) good development practice is established based on empirical studies and personal experience. One of those is “YAGNI“, as we do tend to develop more functionality and over-engineer a solution for a problem that does not exist. However, it seams that “You aren’t gonna need it” does not apply to localization.



There are several ways to construct object instance. Most common way is to use, of course, a ‘new’ keyword, however, as anything else, both theory and practice have decide to make this more complicated, and invent new fancy terms for it.


The client requested the display of cities in ascendant order by title, but first 5 cities has to be cities according to his choice. I had over 130 cities in table, fields: [city_id, title, position]. The solution was to either fetch all sorted by title and to extract those 5 and put them on top, or to update position of each city according the title ascendant order. The second solution is better, but I had to do that for over 130 rows.


Here it is, the video for the behaviors for Diem CMF. Hope you like it!

As I promised, I have revised the concept of the behaviors and new code is submitted to my fork.

How it is implemented?

DmBehavior is new object, and it can be connected with one container (either page, area, zone or widget – so there is support for all Diem page elements). With cascade, behavior cleanup is done as well.


Here is the nice idea: Diem CMF lacks of seriously good plugin for social networks. Since they are so important now in any fairly good web campaign, the major idea is to provide Diem with that kind of support out of the box. Beside FB widgets, AddThis widgets, or any other widget that will be implemented – the major point is to provide it with OpenGraph support as well. It is still in ALPHA stage of development.

Just started to work on new select symfony form widget plugin that wraps nicely looooooong list items with nice jQuery UI. It has to be improved, it is still BETA, but in process I have found out some bugs in my dmColorPickerPlugin and some bugs in dmDateTimePickerPlugin. Hopefully, I will have time to fix them all….

The plugin is based on Chosen, jQuery plugin. Unfortunately, not so much docs there, I need some config guidances in order to tune this up…

Here is the Github repository.