Posts tagged ‘OOP’
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.’ »
Posted by Konstantin Mirin on March 18, 2010 at 08:00 under OOP, PHP, Programming.
Tags: DB, experiece, modelling, OOP, PHP, sms-notify, UML
3 Comments.
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?’ »
Posted by Konstantin Mirin on March 14, 2010 at 14:53 under Frameworks, Programming.
Tags: framework, OOP, PHP, Yii
3 Comments.
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, OOP, PHP, polymorphism, tutorial, UML
1 Comment.
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
23 Comments.
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
23 Comments.
When I was studying patterns, I went through main patterns in the alphabetical order. Adapter pattern was in the beginning and Template Method – in the end. And when I came to the latter and read about it, I was confused. Thee solve the same task, implement the same GRASP principle (Protected Variations) – they are the same, but why are they called differently?
Continue reading ‘Difference between Adapter and Template Method pattern’ »
Posted by Konstantin Mirin on March 3, 2009 at 09:19 under Design patterns.
Tags: adapter, design pattern, OOP, template method, UML
608 Comments.
OOP stands for Object-Oriented Programming. What does it mean? And what’s the difference between OOP and procedural programming? We’ll go through all these terms, We’ll demonstrate the difference of these approaches and advantages of the OOP over procedural concept. Examples are for PHP, but concept is the same in all object-oriented languages.
So, let’s start with defining, what OOP is and how it differs from procedural programming. Just take a look around. For example, you see a table. Consider you have to program it. When using procedural approach, you focus on it’s behaviour (for example, you write function, that calculates height or that assembles it from the given dimensions). However, table has properties besides behaviour. When following procedural paradigm, we create variables for each property – height, width, length, square, weight. All that data – properties (variables) and behaviour (functions) describe the object from the real world – table. What’s wrong with this approach? Nothing wrong, everything is fine, when we’re dealing with one table.
Continue reading ‘What is OOP (Object-oriented programming)?’ »
Posted by Konstantin Mirin on February 28, 2009 at 16:27 under OOP, PHP, Programming.
Tags: basics, concept, encapsulation, inheritance, OOP, polymorphism, tutorial, UML
40 Comments.