Monday, 26. November 2007, 07:44:56
design patterns, programming
A lot of people seem to be slightly confused about what the M and C, Model and Controller, of MVC are, in regards to web applications.
- What does the Model do?
- What does the Controller do?
View is what everyone seems to know, though… I wonder why is that so? What is so confusing about Models and Controllers?
Read the rest of the post at codeutopia.net
Tuesday, 20. November 2007, 20:45:07
programming, web
The HTTP protocol is what powers todays web. While not useful for most people, knowing how HTTP works is important for those who work with dynamic web sites.
Still, it seems that the protocol is mostly a mystery to a lot of developers and some features of the protocol, such as the accept-language header, aren't really used.
Read the rest of the post at codeutopia.net
Monday, 12. November 2007, 08:56:01
javascript, programming
There's a lot of resources on the internet related to coding JavaScript, but many of them are poor and out of date, which I believe is one of the reasons why a lot of people still can't manage to write JavaScript code which works in all major browsers (IE, Firefox, Opera and Safari - where possible to test it)
Let's check out some useful JavaScript resources to improve our skills, ranging from books to blogs and frameworks/libraries.
Read the rest of the post at codeutopia.net
Thursday, 27. September 2007, 09:18:52
general, programming
The other day I thought about using
MacGyver as an example when talking about programming.
Why MacGyver?
In the TV series, he builds clever tools from common everyday things. I think this is why MacGyver is a very good programming analogy - in both good and bad.
Read more...
Monday, 17. September 2007, 09:13:19
design patterns, programming
Why use
Singleton over Static classes?
If you want a simple class that's accessible from everywhere in your code, you could easily use a static class to achieve this.
In PHP, you can use :: to access classes statically: MyClass::doSomething(), in C# you can declare a class static and so on. It's much simpler to create and access static classes than singleton classes, too.
The singleton does have some advantages though...
Read more...
Wednesday, 12. September 2007, 12:15:57
PHP, programming, web applications
I've been working on a Content Management System (CMS) for my personal use and for experimenting. Since I like the Zend Framework so much, using it as a base for the CMS was a natural choice.
While at first it might seem that using ZF adds many restrictions, it actually isn't like that. Thanks to the modularity of the framework, you can easily replace certain functinality with classes of your own to change the way it works.
There are also many other things to consider when making a CMS.
Read more...
Friday, 7. September 2007, 13:36:12
programming, general
What's your dream programming language like?
I'm sure all of us who program, and maybe even some who don't, have wanted to change some thing in a language.
What kind of a programming language would you design, if you could just decide the awesome features for the language and have a team of top programmers implement it for you? Well, you could of course do it yourself too if you wanted...

Feel free to pitch in even if you're not a programmer
Read more...
Wednesday, 5. September 2007, 11:07:03
programming, general
You usually have two choices when you want to return errors from your functions:
Exceptions and error codes.
Exceptions are the OOP way of doing things: You throw a new exception, where the exception is a new instance of some exception class.
Error codes are "oldschool": They are just values returned from the function, but with special meanings.
But which one is a better choice and why?
Read more...
Thursday, 30. August 2007, 05:16:17
PHP, design patterns, programming
Globals are evil - do not use them. Quoting
Martin Fowler,
remember that any global data is always guilty until proven innocent.
What is a global? A global is a variable that is accessible from anywhere in an application. For example, in PHP declaring any variable outside a function/class method will make it global.
But what about when I want to have some data globally available in my application?
One useful solution is to use the singleton pattern to create a storage class or something like that. We'll look at that later in this post.
Read more...
Saturday, 18. August 2007, 07:43:57
programming
Do you use variable names like $a, $b or maybe $foo or $bar in your code?
Stop using them, it's bad practice.
I've used similar variable names such as those for a long time myself, but I've been moving away from them for a while now.
But why is it bad?
Read more...
Showing posts 1 -
10 of 33.