I've been writing code for quite a few years now. VBA, VB.Net, C#, PHP & JavaScript. Hundreds if not thousands of lines of my code are run every day in my range of apps - but I almost never use classes. I know forms in MS Access are a type of class - but I mean classes I've written myself.
I've read plenty about OO & work with a guy who writes OO code, but despite this, I just can't get my head around it. I worry I'm missing some huge opportunity to write better code, with lots of reuse - but I don't think I write inefficient duplicated code at the moment...
I get the theory behind it - the person class with properties of height and age and methods of walk and sit or the car class with the property colour and the method steer - but I just can't seem to apply it to my code.
I have one class I wrote and use regularly. Written in Excel VBA it's an interface to another app. It's good as the other app changes occasionally and I only have to adjust for these changes in my class - in one place - but I could do the same thing if I used functions and routines in a module...
Only in the past few months have I started learning PHP & JavaScript. I'm worried I'm setting off down the wrong path by writing these in my familiar procedural style.
I think my code is clean, clever, efficient, well commented, uses good naming conventions and isn't confusing to follow - but of course I would say that. Perhaps what I need is to describe something I've built to an OO developer and get them to explain how it could have been written with classes - perhaps than I'll see the benefits. I'm not writing code about people or cars, so I find the analogy hard to apply. Perhaps a future blog will be "My object orientated epiphany" or "Object orientated - no point".
Responsive and mobile websites
2013Searching sent emails in Outlook 2010
2012Changing PHP extensions from MySQL to MySQLi
Recent project - my own cash flow reporting
First tax return and my invoicing system
Google.co.uk home page now https
Content Management Systems CMS
Adding an eCommerce online shop to my own site.
2011Recent project - eCommerce website, online shop
Slow broadband in the evenings
Website updates - dynamic menu and executing PHP in a .html page
The transition from Microsoft Access to PHP/MySQL
Working with a range of coding languages
Software development environments - IDEs
Object orientated coding V's procedural
2010