Concurrent process management in Yii

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

Introduction

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’ »

Share this post with a friend Share this post with a friend

Database structure and filtering approach. SMS Notification system.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...

The database structure

In the previous post I outlined the system’s specs and use cases. We also selected the primary use case we should start from – that is filtering screen.

Continue reading ‘Database structure and filtering approach. SMS Notification system.’ »

Share this post with a friend Share this post with a friend

Requirements and Use Cases. SMS Notification System.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Background

I’ve graduated in March 2010 and I don’t need to visit university any more. However, I enjoyed studying there and I know what challenges my fellow students-programmers have. That’s why I continue the job started this autumn – computer club, we call it “Geeks’ Club”. Sure, we’re not true geeks there, but we tend to be :) So I’m helping students who’re interested in web-technologies and in object-oriented programming. I explain them things that are not covered in the standard university course. Things, that are more practical and they can be paid money for.

Continue reading ‘Requirements and Use Cases. SMS Notification System.’ »

Share this post with a friend Share this post with a friend

8 Firefox plugins I use every day

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
Loading ... Loading ...

Firefox is great for web development mainly because of the large number of plug-ins available. Here’s my list:

  1. Web developer toolbar – great thing for the web development. Personally I use resizing features, password revealing and elements highlighting.
  2. Firebug – absolute winner. This is actually the main tool for development I use. I’m going to write a more detailed post about it later. For now, you can enjoy this video
  3. Cache status shows cached size in the status bar. But the main use is it’s ability to clear cache in a few clicks. This saves lots of time clicking here and there when developing complex JS application.
  4. Live HTTP Headers allows to view all HTTP headers that go here and there while you’re requesting the page. It’s a great thing when you need to grab some content from the password-protected area or inspect what’s going on when you request page.
  5. YSlow is a firebug plug-in from the Yahoo team which analyzes your content and shows you the ways of the client-size optimization of your page. It’s recommendations are really valuable. Try it and you’ll never uninstall it :)
  6. SitePoint HTML reference is a firebug plug-in too, that adds HTML help to the every HTML tag and CSS property. It also provides examples and best practices. I don’t think this is great value for gurus, but definitely useful for all others :)
  7. Fasterfox is a plug-in that boost Firefox performance. It is in the “experimental” state, but quite stable. I haven’t ever experience any problems with it.
  8. Selenium IDE is designed as a helper tool for creating selenium tests. It is really great and handy tool if you use automated testing. I’m going to cover this in my blog later.

And what are your favourite plug-ins? How do you use them?

Share this post with a friend Share this post with a friend

What is a framework and why you should use one?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 2.00 out of 5)
Loading ... Loading ...

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?’ »

Share this post with a friend Share this post with a friend

Low Coupling and High Cohesion – GRASP (Design patterns series)

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Low coupling

When designing some architecture, you face with the problem “which object should perform X task?” We discussed this question in my previous post in this series. There we noted, that object should perform the tasks he has enough info for. He should be an “expert”. But because one of the main OOP characteristics is interaction between objects, it’s often hard to answer this question.
Continue reading ‘Low Coupling and High Cohesion – GRASP (Design patterns series)’ »

Share this post with a friend Share this post with a friend

Grabbing password-protected content with cURL

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.00 out of 5)
Loading ... Loading ...

Introduction

Websites, that aggregate something become more and more popular because we need all information available in one place and accessed fast and easily. From time to time, you come across with tasks, that require retrieving some data from the password-protected area. For example, I use Guru.com for my job search. They post lots of the projects there, but they don’t offer convenient listing and filtering. So I developed my own tool, that grabs everything from there and ranks it all in the way I need. So, we’ll take a look at different types of password-protected areas and see how to deal with any of them

Continue reading ‘Grabbing password-protected content with cURL’ »

Share this post with a friend Share this post with a friend

NetBeans 6.5 for PHP – My Experience

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Introduction

Personal productivity depends on the tools greatly, so I pay much attention to the programs I use. My previous post in this field was about MySQL workbench which I consider the best free DB design tool for MySQL.

When I started coding PHP, I used Linux so I used Kate, which only had syntax highlighting and allowed to save multiple files opened as a project :) Next was Quanta, the Linux IDE for PHP. I spent lots of time developing there until I installed trial version of Zend Development Environment (ZDE) 5.5. That was really cool. I liked it very much and used for quite long time. Around half a year ago I heard about NetBeans and decided to try it out. I was thinking quite long about it, I didn’t have enough time to install and go through all it’s functions. Finally I saw that I will never have this time, so I started using it around 1.5 months ago. While using, I was putting down some notes about the things I liked and the ones I didn’t. So now I just want to present my list :)

Continue reading ‘NetBeans 6.5 for PHP – My Experience’ »

Share this post with a friend Share this post with a friend

Building high-loaded portal – InnoDB vs MyISAM

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading ... Loading ...

Preface

In November 2008 I’ve got a nice project, that resulted in a complex search engine, that specializes in clothing. I can’t give the link now, but will do when site officially launches. Key features of such service are:

  • Large number of users, which search with various parameters, rate items, leave comments, create articles etc.
  • Large database, that is updated frequently

Sure, the site is running on a dedicated server, sure I use caching, but optimal DB is a key to success.

Continue reading ‘Building high-loaded portal – InnoDB vs MyISAM’ »

Share this post with a friend Share this post with a friend

Eurovision 2009 – My Impressions

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 3.67 out of 5)
Loading ... Loading ...

I’m not a music fan, I don’t usually watch this, but yesterday my girlfriend had birthday and she likes such things, so we were watching Eurovision together from beginning to the end. And I don’t regret it! :)
As for me, the show Russians prepared, was not excellent, it was mega-excellent(I’d even say supercalifragilisticexpialidocious;)) – the show, the scene, all effects were so cool! I can’t compare with previous ones, but my girl says Eurovision never had such beautiful show. Russians showed they can do things good if they want to, which I’m very proud of :) I really liked the acrobatics and the girls in the shallow water above. Dima Bilan’s initial song and his show was somewhat philosophical, at least it seemed to me so.
Continue reading ‘Eurovision 2009 – My Impressions’ »

Share this post with a friend Share this post with a friend