Swing is pretty old. We've developed new technologies since its heyday and those new technologies have brought new best practices. One of those is the ability to bind the UI to a Model or ViewModel object. In my current project, we are using Swing as a UI framework and are attempting to move it from the old to the latest and greatest. One of those includes binding. This is short and sweet, but you can do simple data binding in Swing pretty easily. What we have done is to create a ViewModel object that the view will render from; this...
more
This is just a quick template that I am using with my teams. Hammer's Technical Post-Mortem for Failures What was the problem? Please be as concrete and simple as possible (e.g. the build failed due to data not being cleaned up the database) What was the root cause of the problem? Consider using the 5 Whys in order to really track down root causes. Was the issue resolved quickly? If so, what processes or techniques made that happen. If not, what gaps in our processes or techniques exist? Identify actionable items that would resolve the root cause of the issue...
more
There is a better way to write Backbone applications and here I hope to write a quick primer. The topics I will cover in this series will follow these basics: Everything-from-one-container Pass-through views Declarative rendering Abstract away element access (TBD) ViewModels over Models (TBD) BONUS ROUND Coffeescript (TBD) Declarative rendering Rendering is one of the more complicated aspects of creating single page javascript applications. It has implications in performance, responsiveness, debug-ability, testability and can have a steep learning curve. For the most part, rendering falls into one of two categories: implicit and declarative. Implicit rendering can be put another way:...
more
There is a better way to write Backbone applications and here I hope to write a quick primer. The topics I will cover in this series will follow these basics: Everything-from-one-container Pass-through views Declarative rendering Abstract away element access (TBD) ViewModels over Models (TBD) BONUS ROUND Coffeescript (TBD) Everything-from-one-container Often when evaluating other backbone applications I will see somewhere deep in the program a line of code like this: render: function() { for(var i = 0; i < this.items.length; i++) { $('#table').append(_.template('item_template', { item: this.items[i] })); } } This code is appending to the element with id table N number...
more
There is a better way to write Backbone applications and here I hope to write a quick primer. The topics I will cover in this series will follow these basics: Everything-from-one-container Pass-through views Declarative rendering Abstract away element access (TBD) ViewModels over Models (TBD) BONUS ROUND Coffeescript (TBD) Pass-through views In the old days (and still current for the unlucky few) of .NET web application development, there was a framework called WebForms that developers would use to create web applications. WebForms used a system called "CodeBehind" that allowed developers to interact with objects in the views. The .NET community has...
more
On my previous project, my team developed a pattern for Rails presenters that I think is worth sharing. We used this pattern to a great deal of success and I will be advocating for its use in future Rails projects. The Presenter pattern is what I call a projection of a model. That is: given a model A which contains data Z, a presenter is a derivation of model A and data Z. We can represent this as A' (Presenter class) and Z' (Presenter data). For any given model A, there are an unlimited number of projections and, thus, presenters....
more
On my current project, we have been growing our system to a rather large size. As with any codebase that grows, this means that we have started to think about code organization that relies on creating our own libraries and gems. At this time, we have around 5 or 6 "internal" gems that are just consumed by our project. These gems are things like third party integration classes, testing tools and generalized code that could be used outside of just this project. One of the things that we've started doing is versioning and tagging the external gems instead of pulling...
more
You're a Rails programmer. You've developed your site and have a good set of features that you're delivering to your users. You use RSpec to test your application and have Cucumbers pushing WebDriver tests. You may even be doing some cool process things like continuous deployment. But, do you write Ruby or do you write Rails? Writing Rails Rails is a great web framework that has helped many teams deliver business value in a very short amount of time. It helped to create the mantra of Opinionated Software that exists in the Ruby community and has even started to trickle...
more
We have recently started to use a pattern on my project that I am currently in love with. While it is probably too early to call this a "Do This or Question Why You Do Not", I can see it rapidly becoming that way. The typical Rails controller The Rails controller that we typically see is something along the lines of the code below. In this code we are using some straight forward patterns of accessing objects from a database, showing them (through a template), checking to see if our new Post object is valid and handle the good and...
more
In case you are unaware or are in need of a reminder, this is a technical blog about software. I write my thoughts and opinions on how to write software. Today, I am going to continue that by talking about Women in Technology. "Not that dead horse." "It's been done a thousand times." "Why aren't you talking about something REAL like how to introduce a service layer peice by peice in a Rails application?" (I'll do it one day, I promise!) This, folks, is as real as it gets. If you thought this or anything along these lines then you're...
more