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)’ »
Posted by Konstantin Mirin on October 6, 2009 at 08:00 under Design patterns, OOP, Programming.
Tags: design pattern, grasp, PHP, polymorphism, tutorial, UML
1 Comment.
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’ »
Posted by Konstantin Mirin on May 24, 2009 at 09:00 under PHP, Programming.
Tags: experiece, PHP, tip, trick, tutorial
10 Comments.
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’ »
Posted by Konstantin Mirin on May 22, 2009 at 09:00 under PHP, Programming.
Tags: choice, experiece, feedback
14 Comments.
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’ »
Posted by Konstantin Mirin on May 20, 2009 at 09:00 under DB Design, Databases, MySQL.
Tags: DB, design pattern, efficiency, MySQL, production
8 Comments.
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’ »
Posted by Konstantin Mirin on May 17, 2009 at 12:18 under Life.
Tags: eurovision, Life, show
Comment on this post.
OOP is a great concept, it simplifies the programmer’s life, especially in the field of interface development. Nearly all modern web-interfaces use JS in some way – for field highlighting, validation, help etc. It’s OK when there are such simple things.
And now imagine, that we have a set of dialogue windows (HTML+CSS) for adding a comment, rating, sending to the friend. Each of these boxes has a number of functions – check if user is logged in(if not – show login form), send AJAX request, process response, show error/success messages, position the box on the page etc.
Continue reading ‘OOP in jQuery’ »
Posted by Konstantin Mirin on April 30, 2009 at 22:19 under JavaScript, UI, jQuery.
Tags: framework, jQuery, OOP, tip, trick, workaround, yui
1 Comment.
This is an introductory post to the series, where I’ll cover all design patterns, their usage, diagrams. Besides patterns, I am going to guide you through the principles of the high-quality application design. We’ll start from these principles (GRASP), and then advance to patterns, see how they use these principles and develop several systems (architecture only). The whole series will take 10-15 posts. However, I don’t have exact plan yet
So, let’s go!
So what we’re talking about?
Actually, design pattern is no more, than a proven solution to some common problem. When saying “problem” I mean things you face with when developing the application architecture. These solutions are intended to make you application better – more extensible, flexible, simple.
Common examples of design problems (Let’s agree that in this series “design” means application, not graphics or DB design) are:
Continue reading ‘Creator and Information Expert principles – GRASP (Design patterns series)’ »
Posted by Konstantin Mirin on March 28, 2009 at 15:37 under Design patterns, Programming.
Tags: design pattern, efficiency, grasp, OOP, polymorphism, tutorial, UML
11 Comments.
I bet you didn’t know, that switch can be used to answer the question: “Which of the N following statements is true?” Continue reading ‘Trick with php switch()’ »
Posted by Konstantin Mirin on March 6, 2009 at 12:41 under PHP.
Tags: PHP, tip, trick
3 Comments.
As you know, PHP can return only one value from the function. However, there is a simple workaround – we return an indexed array from function and immediately split it into variables using list():
function ret()
{
//something useful here
return array($varA, $varB);
}
list($a, $b) = ret();//we'll have $varA in $a and $varB in $b after this
Posted by Konstantin Mirin on March 6, 2009 at 09:38 under PHP, Programming.
Tags: Add new tag, PHP, tip, trick
Comment on this post.
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’ »
Posted by Konstantin Mirin on March 5, 2009 at 06:02 under Databases, PHP, Yii.
Tags: DB, production, session, tip, trick, Yii
11 Comments.