comment

Create Simple Configuraiton Beans using JSON

2007 October 25
No Comments
The more I use JSON, the more enamoured I am with the simplicity of the format. For configuration settings, JSON can easily be decoded into structures used to populate simple configuration beans. While updating a legacy application to a service oriented, framework driven implementation, I found the need to access default settings in different contexts. In the legacy app, these defaults were set in many list templates to both pre-populate a form and filter a query. My first inclination was to use Mach-II properties to store the config settings, but with many different pages all having some default params, that would become unwieldy. In order to provide access to the default values in both a view and a Mach-II listener, I decided to build a "ConfigurationService" that would serve up event-focused simple configuration beans from a JSON configuration file.

read more...

Mediator Pattern applied to Javascript

2007 October 19
No Comments
In a previous post about JSLint AIR, I introduced my concept of an "Application" object that was responsible for registering and initializing individual components. In turn, each of these components was responsible for a specific piece of the application, either a UI element, generating a report, or interfacing with the Adobe AIR API. At the time, I thought that it was a good way to initialize different Ext JS components, encapsulate and organize my code. I've since refined that object slightly as I have learned that I was actually employing the Mediator design pattern. Mediator is described in the GoF book, Design Patterns: Elements of Reusable Object-Oriented Software as a behavioural pattern with this intent, "Define an object that encapsulated how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently." If you're a patterns guru, that description might make complete sense, but I find a diagram and examples much easier to comprehend.

read more...

Join the Snip-a-Thon at cfsnippets.org

2007 October 12
No Comments
For a web developer, I can be a real luddite. Until now, I haven't used snippets. There's no real reason for not trying them, I'm just too focused on my half-baked projects to see that I can be more productive by adding simple new tool to my arsenal. So in the interest of broadening my horizons, I created an account, upgraded cfeclipse and registered the public SnipEx server. I had a little headache with eclipse errors related to having 2 versions of cfeclipse installed (this is where I get the luddism from), but after disabling and uninstalling the older version, I was error free, connected and browsing the snippet categories. That's the kind of instant gratification I like! Oh yeah, and there's a contest running with some excellent prizes. For more details, hit the banner below.

JSLint AIR Edition now on RIAForge!

2007 October 01
No Comments
Hot on the heels for Adobe AIR Beta 2 release, JSLint AIR Edition makes its Beta 2 debut on RIAForge. Version 0.5 introduces a few new features and one bug fix: NEW: Right click on a .js file to open it from the context menu using "Open with ->". NEW: HTML code is escaped in the listing view. NEW: The name of the currently open file will appear in the first tab. FIXED: code in listing view stays aligned with line numbers when lines are longer than the listing view pane. There is one known issue with this release with regard to the content not resizing when the app is maximized. This is related to porting a Beta 1 app to the new Beta 2 security model for HTML/Javascript AIR applications. I'll write something on my experiences in a (hopefully near) future post.

Avoid the Instant Gratification Trap. Trust your Instinct and Ask Questions.

2007 September 18
No Comments
Ben Nadel's recent post, Code Assertively, really struck home for me today. In it, he discusses the use of non-assertive methods, like Evaluate() and IsDefined(). I definitely prefer to use StructKeyExists() over IsDefined() as a test for variable existence, but a large portion of my code for the scaffolds in my transfer based "generic admin" made liberal use of Evaluate(). I found it ironic that I could code "assertively" in one regard and be very dogmatic about it, but could also justify stooping to hacked solutions . At the time that I was implementing my Evaluate() hack, I had that uneasy feeling that there was a better way, but my desire to make it work urged me to forget best practices in favor of the instant gratification of being able to say "voila!". Looking back at the code for that series, there were three specific places where I could improve things. One, I knew how to fix. The other two I will have to thank Mark Mandel for hipping me to some things I had forgotten or wasn't even aware of...

read more...

Making JSLint AIR: Part 1 - Working with Ext

2007 September 10
No Comments
In my introduction to JSLint AIR Edition, I listed the tools and resources used to build the application. In this post, I'll detail my experience with Ext. I chose the Ext library for this project, because it provides components that can be combined to create a complete desktop look and feel and the documentation center has a nice API and plenty of examples and demos for building individual Ext components. This was my first time using Ext for more than a simple form or menu, so combining individual elements to design a complete UI required a bit of forethought and exploration.

read more...

Introducing JSLint AIR Edition: Made with Aptana, Ext JS and Adobe Integrated Runtime

2007 September 06
No Comments
I've been dabbling with Ext JS for a while now in the hopes of integrating it into the various projects I have on the go. While exploring some ways to better construct a Javascript front end by separating out my code into 'components', I discovered JSLint, The Javascript Verifier. One thing lead to another and within a day I had a working Alpha version of JSLint as an AIR application...

read more...

LightWire XML Configuration Update: Now Supporting Init-method and Mixin

2007 June 27
No Comments
When I realized my concept for a ServiceLocator fell in the category of "interesting patterns you'll never use", I decided instead to work in a <mixin/> tag for LightWire. The tag is a child of <bean/> like <constructor-arg/> or <property/>. Children of <mixin/> <value/>, <ref/>, <map/>, or <bean/> defined therein will be "mixed in" rather than constructor or setter injected.

read more...

Application and Domain Models: Examples of Aggregate and Composite Design

2007 June 05
No Comments
tags: Ideas · Modeling · UML
I've been using UML more often to visualize object relationships, so after reading Brian Rinaldi's recent posts on ColdSpring, Objects and Composition, I researched object composition and learned the subtle difference between Composition and Aggregation.

read more...

Flash Forms Plugin Missing or Not? IIS 6.0 and NTLM Cannot Find SWF in Memory

2007 May 29
No Comments
So, if you find yourself using flash forms and you wonder why the form won't display when you know you have Flash installed, check out this Adobe TechNote. Sure, I could have avoided the headache by learning Flex. I'll reform, sooner or later. And while I'm putting a nail in the wall about that, I'll put one in for switching to Apache as well...