Webtuesday at local.ch offices

Posted: April 14th, 2010 | Author: Ivan Jovanovic | Filed under: community | Tags: , , | No Comments »

Every first Tuesday of a month, Zürich oriented web community gather for an evening of tech talks and some beer for, so called, webtuesday. Yesterday, we had pleasure to host event at  local.ch for the first time as unofficial opening for the community after movement to new offices. As Harry tweeted already during the event, it was pretty packed. I was personally happy to see lot of people coming since this was only my second webtuesday since I started working for local.ch 6 months ago.

Packed Webtuesday @localch offices

Packed webtuesday @localch offices (by Harry Fuecks)

This time Patrice and Chris from memonic.com gave great talk on the current state of the architecture and tools that are behind their startup. Since both of them worked for local.ch before (Patrice as Lead of Frontend Development, Chris as backend Java developer)  it was interesting to see how much they kept and where they improved along the way.

Interesting point was the choice of the language for their startup. At local.ch, we are kind of separated on frontend and backend development, before all, by the languages we use. Shortly, PHP on the frontend and Java in backend with HTTP communication in between, XML result got from backend parsed by XSL to produce HTML. At Memonic they decided to bring that together and make gap between backend and frontend development smaller by choosing Python as common language. Having experience with the Scrum and challenges which this kind of separation between frontend and backend carries, I see this as reasonable decision. I was surprised to hear that none of them had professional experience with Python before founding Memonic.

Their architecture is highly web service oriented. The way Patrice conceptually sees the architecture can be paraphrased like this:

“I see web services in our architecture as classes are used traditionally, or maybe better, as components of the traditional framework”

end of lousy paraphrase :) . So, if we take Zend Framework for example: imagine that instead of having Zend_Auth, Zend_Session, Zend_Log, Zend_Mail … and sending messages to their objects, you have web services that expose interfaces over HTTP. On the slides Patrice provided can be seen in smaller detail way their architecture is broken into smallest possible web services that communicate among each other. Web services are based on wsgiservice (Python WSGI framework to create REST web service) library that is open sourced by Patrice. One thing I was interested is what is the performance loss in HTTP communication overhead between components. In current state of the load they do not see it as problem and they see using HTTP features as e.g. caching more valuable than performance loss introduced.

Here are some links, if you are more interested to find out about local.ch, webtuesday or memonic.com.

A year behind my back

Posted: September 16th, 2009 | Author: Ivan Jovanovic | Filed under: personal | No Comments »

The year is behind me since I wrote last post. A lot, mostly good, has happened.

First and most important I have finished my studies. Now I can proudly say that I’m an Electrical Engineer in the field of Automation and Control Engineering. But wait, how does Senior Web Developer position relates to that? Let that be a topic for further evaluation :) Let just say that in one moment I had to decide what interests me more.

Somewhere at the beginning of February, after almost year and a half, our cooperation with Tilllate ended. Thanks to the Maarten, Leo, Silvan, Cyprian, Jia-yong Ou, Michael, Thilo and others for being friendly, positive and smart to create great surrounding to work in. I have raised my skill to much higher level and learned a lot about programming in high-traffic, heavy-loaded environment and gained much wider view on software development than I had before. I’d like to specially thank to Tilllate Chief Software Engineer Maarten Manders for having confidence that I will do proper job with some crucial parts of Tilllate, I hope I succeeded.

Read the rest of this entry »

PHP debugging with FirePHP

Posted: August 31st, 2008 | Author: Ivan Jovanovic | Filed under: php | No Comments »

FirePHP logoI really like when I stumble upon a creative and useful piece of software that could improve my everyday development process. I remember when I started using FireBug it was great help in the HTML/CSS/JavaScript development and debugging.

I’ve just found out FirePHP, FireBug plugin that enables the developer to send log messages from PHP code to FireBug console. Quite helpfull I can say :) It consists of Firefox extension (mentioned FireBug plugin) and small PHP logger that you actually use in your code to communicate with the FireBug console. Logger comes in procedural and object-oriented fashion so if you are striving towards exceptional performance of your PHP app, or just still old-school PHP4 (R.I.P.), then man you have your choice :) Otherwise use OO PHP5 logger class. I’ve manage to set the demo, that goes within the PHP library, in a couple of minutes and I’m looking forward for using it in the future.

Thanks guys for great work.
Official FirePHP website

Another cool thing that comes with the FirePHP is its integration posibilities with CakePHP, CodeIgniter, Drupal, ExpressionEngine, Kohana, PRADO, Symfony, TYPO3, Zend Framework. So there is some for anyone.

Moving to Ubuntu or Windows sucks!

Posted: August 12th, 2008 | Author: Ivan Jovanovic | Filed under: general | No Comments »

Ubuntu logoWhile writing this post, post-intallation update on my fresh Ubuntu installation is under its way. It was long time ago I started to feel constraints of Windows as web development environment. So, very logical step was to move to something more developer friendly than user (read dummy) friendly. After testing Ubuntu with VMware player I decided to go step further and use WUBI (Windows Ubuntu installer) to intall Ubuntu as Windows application in a folder that will act as separate filesystem for my linux installation.

Yes, I know it is not perfect solution, but since I’m running it on Toshiba laptop I was worried about drivers and related staff  and didn’t want to stay even without the Vista crap (TM).
After all installation was smooth and harmless and it seems that everything works as expected for now. Setting the development environment is the next challenge I’ll take. Apache, MySQL, SVN … here I come :)

Preserving ordering with WHERE IN() clause in MySQL

Posted: April 1st, 2008 | Author: Ivan Jovanovic | Filed under: mysql | 1 Comment »

Today I ran into the code that pulls from database list of elements with SELECT * FROM table WHERE id IN(2,5,3,16,22,56,48) where order of ids is important to be preserved after results found. When using SELECT this way you will get the results for every id but ordered by id in ascending order. I was looking around and found neat solution to make MySQL work for you to preserve the order of returned results. With ORDER BY FIELD clause like here SELECT * FROM table WHERE id IN (1,5,2,13,4) ORDER BY FIELD(id, 1,5,2,13,4) you can keep the initial ordering.

What is the catch. This way id field can not be used as indexed. Therefore, EXPLAIN SELECT * FROM table WHERE id IN (1,5,2,13,4) ORDER BY FIELD(id, 1,5,2,13,4) would give you the information that it is using filesort for results ordering which is not so nice. In general, when you have ids as the array with the ordering you need, it probably needs less resources to reorganize them in memory instead of letting MySQL doing it with filesort.

I’ll take some banchmarking tests on this to see about the concrete numbers that confirm or negate my presumption.