9 Mar 2011 by obsidian
I have been, for some time, working on a concept that would allow the average JavaScript user to create robust, interactive applications with ease. A daunting task, I know, but having tried to implement so many bloated libraries for simplistic interaction, I wanted to create a way for the beginning or average web developer to create advanced modules quickly. One of the biggest things I have noticed in recent years is the lack of attention given by many to the client side code structure. With this project, I hope to help educate developers a bit more in the necessity of code separation, documentation and reuse of code.
I have been asked if I’m guilty of reinventing the wheel, and it is possible that you may think so, but I feel this offers a level of uniqueness not found in a library this lightweight. In fact, the purpose of this library is not to be a solution to the need in and of itself, but rather it is intended to lay the groundwork for developers to quickly extend their own widgets and have them working in no time. While I am introducing this library in its infancy, I am already in the process of overhauling the template structure to leverage Underscore.js, the most lightweight and robust JavaScript template engine I’ve found to date.
(more…)
Category: JavaScript, Web DevelopmentTags: JavaScript, jQuery, JSWidgets, OOP | Comments (0)
26 Feb 2010 by obsidian
I have finally found a few spare minutes to refactor the Google Code Project I started for my jQuery plugin last year. While I still am far from where I want to be with it, I have managed to set the plugin into a fully OOP codebase and add in events and the capability for custom handlers on those events. My hope is that people will now be able to find a bit more usability to the slideshow, since it is fully customizable. Feel free to swing by my Google Code page and let me know thoughts or ideas on ways to improve the slideshow as it evolves.
Category: JavaScript, Programming, Web DevelopmentTags: JavaScript, jQuery, OOP, plugin, slideshow | Comments (2)
21 Jan 2010 by obsidian
Over the past year or so, I have been responsible for developing and maintaining a JavaScript Slideshow component for our internal CMS. With the similarities between JavaScript and Actionscript, I have wanted to implement this slideshow in a manner consistent with the flexibility and usage of the JavaScript version. The biggest difference is that the JS one is focused on content, and the AS3 version will be focused on pictures – since AS3 does not fully support markup and CSS yet. This being said, I have had opportunity to attack my project and have the first phase completed. As with so many of my other personal projects, I’m tackling it in phases rather than having a defined spec list ready to go. In this case, I have the slideshow reading an image list from an XML document, loading the individual pictures and setting them on a timed rotation.
(more…)
Category: Actionscript, Web DevelopmentTags: Actionscript, AS3, Flash, Flex, OOP, Photography, slideshow | Comments (4)
16 Mar 2009 by obsidian
Well, one of the challenges in writing our custom JavaScript library for this next release of our CMS at work has been to come up with a modularized approach to our objects that can be followed precisely while still allowing a measure of flexibility to the end developer (Imagine that! Actually trying to support some framework style design principles in JavaScript!). Anyway, what has been one of the most challenging pieces to the puzzle has been to appropriately handle configuration objects passed to constructors that override specific, default behavior of the object.
No, the challenge was not so much handling a config object proper — that is relatively easy. Where the challenge began to really take shape was in allowing a user to provide specific pieces of optional data and only use the valid pieces of the config object to override existing default values while ignoring the rest so as not to cause any JavaScript errors to be thrown elsewhere in the script. For a quick example, let’s say we have the following data object that loads itself up using an Ajax call (NOTE: all examples in this post are using the ExtJS lib).
(more…)
Category: JavaScript, Programming, Web DevelopmentTags: ExtJS, JavaScript, OOP, Web Development | Comments (0)
9 Oct 2008 by obsidian
Due to the number of questions I receive on various forums as well as the number of times I have run into the need for an AJAX response handler in my own work, I decided I would share one of my solutions in the hopes that it will save someone else some time as well. I assume, if you are reading this, that you have a basic knowledge of AJAX and the principles guiding the technology. In addition, basic understanding of how libraries such as jQuery perform AJAX queries and callback functions in JavaScript is a plus. For further reading on these prerequisites, check out this Google search and the jQuery docs.
After manually handling my responses in multiple projects, I finally decided to write a JavaScript object that could handle the XML responses for me and return me a usable object to my callback function. Enter the AJAX Handler object. I decided to let jQuery handle the actual requests for me, but I wanted a way to easily parse out my response, checking for errors and handle them accordingly. The result was something I have been able to use numerous times in different projects. To simplify things, let’s look at the code a piece at a time. At the bottom of this post, you will find the entire code. (more…)
Category: Game Development, JavaScript, Web DevelopmentTags: AJAX, code library, JavaScript, jQuery, OOP, open source | Comments (0)