November 13th, 2011
rather than the extremely long-winded and sometimes unreliable
is a Godsend.
My main experience in using jQuery came from the need to develop a complex interface to simulate Excel type features. These included highlighting cells in a table and calculating totals, averages and counts of the cell’s contents, hiding/showing/adding/removing columns and rows and advanced validation.
At the time, I loathed the project, but as with most projects like it, you end up learning so much more than on the projects you love. I will never forget that project – for its bad times and for the new love it gave me for jQuery!
September 13th, 2011
Recently I’ve been seeing new projects laid out with a file structure attempting to dictate an MVC architecture, with model, view and controller folders. For many web applications though, this is much too limiting. It’s a structure that suggests that elements can be reused – could any element in the model folder use any element in the view folder? I suspect not. Implementations I’ve seen attempt the following structure (usually under model and view folders):
Shared elements are suited to this structure, for example classes that output standard pages, or standard model functions, but I prefer file structures that allow for use cases per file. Generally I create each as a separate class, but I’d argue that a file as simple as this can be considered as MVC architecture.
case “printHash”: printMenu($_POST['toHash']); break;
$toHash = stripslashes($toHash);
$hash = sha1($toHash);
Whilst at University I was taught too much about what MVC is rather than why and when it should be considered, and I think that other developers are suffering from the same tuition. The aim of an MVC architecture is to encourage independent development and testing and to present clean and logical code that is easy to maintain. If you can use MVC to achieve this then it does not matter how you structure your files.