Anyone who develops Javascript long enough undoubtedly runs into difficulties involving the various security features all browser vendors implement. These security features are a good thing — they protect us from malicious users hijacking our browsing experience. But they can certainly cause some headaches. The security feature that presents the most difficulty for us as developers is the same origin policy.
In a nutshell, this policy prevents pages from two different domains from modifying each others properties, using XMLHttpRequest, setting cookies etc. For instance, Example.com and OtherExample.com can’t get references to each others document properties and can’t set cookies on each other. Additionally, Example.com can’t use XMLHttpRequest (aka AJAX) to load a resource from OtherExample.com. This last bit is probably the biggest issue for developers today — in todays world of open web services and mashups. How do you consume a web service with Javascript if you can’t load the data properly? Read the rest of this entry »
I’ve compiled a list of 8 features that are inherent to all badly designed software. This list is in regards to code design — it’s about architecture. Read the rest of this entry »
I’ve been using the Zend Framework a lot lately and have come to really appreciate it. Today I want to write about ZF and how to use the MVC components. This post will be all about ZF itself, how the MVC components work, and getting a simple example up and going. I will write another post later on some more advanced usage. Read the rest of this entry »
There’s a lot of talk these days about design patterns. The most talked about pattern in the realm of web development seems to be the MVC pattern, or the Model-View-Controller. It is this pattern that many of the most popular frameworks are built around. Frameworks like symfony, CakePHP and CodeIgniter enforce this pattern and offer tools to help make using it a breeze. Ruby’s famous Rails framework and Perl’s Catalyst also make use of the MVC pattern. So what is the big deal? Should you care? In this post I’m going to briefly try and explain the MVC pattern, why you should use it, and how. Read the rest of this entry »