Posts tagged ‘Yii’


In my recent project there are quite many tasks that run in the background – generate thumbnails, detect colours on the pictures, run DB updates etc. Sure, all that is handled using cron and Yii commands. However there is a little problem. Consider we have DB update routine that should import new stock data from the datafeed. Datafeed is uploaded hourly, but upload can’t be scheduled to minutes – connection speed, different errors may interrupt the upload. On the other hand, sometimes processing takes 5 mins and sometimes – a few hours because in the first variant we just replace records and in the latter – download images for the new products.

Continue reading ‘Concurrent process management in Yii’ »

Building the best application…

Most of the beginners and, sometimes, even more advanced programmers, want to develop everything from scratch because they want have control over the every aspect of their application. I entirely understand this tendency. When you learned how to program and you can code nearly anything you want (this relates more closely to scripting languages like php, perl, js etc), you start to do something global. Something that will change the world. This may be a new CMS, a new framework, new blog of e-commerce engine. And when you start this, you want to code it in the most efficient way, optimizing every little thing: every function, every SQL query. At the same time, you want to reuse the code you’re writing. So you tend to create more general solutions than you really need. And this slows down the performance. And again you go into optimization, limiting the possible uses to some extent.
Finally, if you finish your application, it may be faster or better than similar ones (however, usually it is the same or worse), but remember how much time you spent developing it. Yes, you’re proud of yourself – you’ve created your own DB abstraction layer, that handles SQL injections in a very smart way. You’ve also developed your own ORM engine, that goes nicely with your DB abstraction layer. It is quite likely, that you’ve already created your very own template engine and a nice JS library that makes animation very easy. Great job, my fellow programmer!
Continue reading ‘What is a framework and why you should use one?’ »

Yesterday I’ve read a post on The Developer’s Day blog. Then tested this thing in Yii. There is a jQuery in my application, so I created test controller and test action, that only outputted “Hello, world” and called it from the firebug console Continue reading ‘Speeding up Yii or why should you use DB sessions’ »

The problem

Nearly every large application has some configuration parameters – site admin email, cache time for different blocks, number of latest news, number of items per search or catalogue page etc.

Continue reading ‘Handling Application Parameters in Yii – Using the Database’ »

The problem…

In Yii you can have all your JS and CSS files together with your PHP. For example, you have some view in /views/user/create.php and you can have your css & js in /views/user/assets/css/ and /views/user/assets/js/. That’s quite convenient when you reuse your views/controllers/components from application to application. But these directories are not accessible from the web, so there is publishing mechanism there. Continue reading ‘Registering group of JS files in Yii’ »

The history

In December I’ve got a project, that required sophisticated and quite complex DB and that DB was subject to change greatly during first development phase. Before that project I was using Sparx Enterprise Architect both for application design and DB design. But, frankly speaking, it’s not good at databases, especially MySQL. So I decided to pick up a new DB modelling tool.
Continue reading ‘MySQL Workbench – The Database Modeling Tool for MySQL’ »

Long journey to the framework…

I’m developing web-applications since 2004, I am crazy about nice architecture and first-class CSS+JS frontend. On the server side, I was using my framework, quite basic one. And all my projects were based on it.

In the October 2008 I finished one of my projects using my own framework. Then looked at it critically, then saw description of the Zend Framework (it had so many features, that mine didn’t!), and decided to move from my own development to the better product.

Continue reading ‘Yii – the framework of my choice’ »

Yii is a great framework. It gives excellent built-in functionality, but, from my experience, is quite sensitive to the server configuration. Mostly because it relies on the newest technologies.

So here is a list of things to check when you experience strange things Continue reading ‘Yii framework – tips when going production’ »