-
Database Migrations for .NET
One of the more difficult things to manage in software projects is often changing a database schema over time. On the projects that I work on, we don't usually have DBAs who manage the schema so it is left up to the developers to figure out. The other thing you...
-
Start a New Branch on your Remote Git Repository
Git is a distributed version control system so it allows you to create branches locally and commit against them. It also supports a more centralized repository model. When using a centralized repository you can push changes to it so that others can pull them more easily. I have a tendency...
-
CruiseControl With a Specific Version of Grails
Continuous Integration is a good practice in software development. It helps catch problems early to prevent them from becoming bigger problems later. It helps to reinforce other practices like frequent checkins and unit testing as well. I'm using CruiseControl (CC) for Continuous Integration at the moment. One of the things...
-
Encryption, Codecs and Unit Tests in Grails
Certain data stored as plain text in a database is just asking for trouble these days. We hear too often about misplaced and stolen computers that contain databases full of Social Security numbers and other information that can lead to identity theft. We can help avoid these situations by encrypting...
-
ALT.NET in Milwaukee
I am a generalist. I like Ruby and Groovy, Rails and Grails, Objective C and Python sometimes. I use bash scripts and I use Java and .NET too. I work on a MacBook Pro running OS X and a Thinkpad running Windows XP. I run my server on Ubuntu Linux....
-
Custom Validators in Grails in a Single App
In my previous post I wrote about Building a Custom Validator in Grails using a Plugin. That's a great way to build a reusable Constraint that will allow you to share your code among multiple projects. But often you only have one application that you are building, or a validator...
-
Build a Custom Validator in Grails with a Plugin
Grails is a really nice MVC framework inspired by Ruby on Rails. The difference is that Grails is built using Groovy and Java and leverages existing, well known frameworks as it's foundation. It is essentially a fairly thin convention-over-configuration and integration layer on top of Spring and Hibernate. The documentation...
-
Coffee DSL Redone With Meta-Programming
In a previous post I wrote about DSLs as Jargon. I implemented a simple Coffee DSL that would allow code to parse an order written by a human and turn it into a domain model. I used a fairly basic method_missing structure to capture the values. There's a much better...
-
When Do DSLs Make Sense?
Domain Specific Languages (DSLs) are discussed all the time. There is a lot of writing about implementing DSLs and many dynamic languages like Ruby and Groovy make it really fairly easy to do it. But rarely do I see it discussed how you figure out when it makes sense to...
-
Implementing Mixins with C# Extension Methods
Wikipedia defines a mixin as "a class that provides a certain functionality to be inherited by a subclass, but is not meant to stand alone. Inheriting from a mixin is not a form of specialization but is rather a means to collect functionality. A subclass may even choose to inherit...
-
ALT.NET Milwaukee
Dan wrote a post about ALT.NET in Milwaukee. Basically the idea of ALT.NET is to take the best practices from software development, to find the best tools available in .NET regardless of the vendor and to use them when they make sense. Some people see the term as divisive. As...
-
Why You Should Love Foreign Keys
Be Smart Databases are smart. Relational theory is based in math. The people who invented the relational theory and the people who design and build databases are smart. There is all kinds of really hard math that goes into proving algorithmic efficiency in database development. The people that do that...
-
Test Automation Seminar
A long, long time ago in a land far away, I worked with my friend Frank Cohen to help him build the first version of a Web Service and Web Application test tool that was called TestMaker. Since then, Frank has made all kinds of improvements turning it into a...
-
Mac OS X Leopard and iPhone
Leopard With the new version of Mac OS X announced we can all wait for an early Christmas! You can order yours early on Amazon for $20 less than you can get it at Apple. How? I don't know, but they give you the discount. So check order it here:...
-
ObjectBuilder Can Inject to UserControls As Well
This is a followup to my previous post on integrating ObjectBuilder and ASP.NET. As I was playing around with the solution I hit on the fact that I was only injecting at the Page level. As ASP.NET is a component model, you can end up with custom User Controls that...
-
Integrating ObjectBuilder with ASP.NET
ObjectBuilder is a .NET framework made for building Inversion of Control or Dependency Injection containers. Unlike Spring or Pico, ObjectBuilder is not a full DI framework, instead it's a framework for building DI solutions. Yes, that's incredibly weird to me too. Why Use Object Builder? Why would you use ObjectBuilder...
-
All Database Backed Web Apps are "Just CRUD Apps"
It's time to end the debate between "Just simple CRUD Apps" and "more complex" apps. Very complex behavior can be expressed through a small set of fairly simple rules. This is often described as emergent behavior or just emergence. The general idea is that simple building blocks can construct complex...
-
Mongrel Cluster and Apache Need Memory
I use a VPS hosted by SliceHost as my personal server. SliceHost uses Xen to host multiple instances of Linux on a single machine. The performance of this setup has been very good. I have been running: Apache 2.2 with PHP MySQL 5 Postfix Mail Server Courier IMAP Server ssh...
-
Interact with REST Services from the Command Line
REST is becoming more popular as a means of implementing Service Oriented Architectures (SOA) as well as merely providing simple remote APIs for interacting with systems. The main reason for this is that it provides a very simple means of creating and consuming Services. Contrasted to SOA implementations like SOAP...
-
Active Directory Authentication for Ruby on Rails
Ruby on Rails can be used to build many kinds of web applications including public internet applications as well as private intranet ones. As an intranet application it is often very interesting to be able to do Single Sign-On using an existing Active Directory setup. Rails does not support NTLM...
-
Making Session Data Available to Models in Ruby on Rails
Ruby on Rails is implemented as the Model View Controller (MVC) pattern. This pattern separates the context of the Web Application (in the Controller and the View) from the core Model of the application. The Model contains the Domain objects which encapsulate business logic, data retrieval, etc. The View displays...
-
RESTful Rails for Ajax
Ruby on Rails 1.2 added full support for building RESTful services to the already nice web page support. REST is a conceptually simple idea, yet incredibly powerful. REST is a Web based API to an application. It builds on the basic building blocks of HTTP: URLs and HTTP Methods (think...
-
On Singletons
The Singleton Pattern is one of the most widely used patterns from the Gang of Four (GoF) Desgin Patterns Book. One the reasons that it's so widely used, I think, is because it's also very easy to understand. The basic idea is that you control the creation of an object...
-
Mocking .NET Objects with NUnit
NUnit is my Unit Testing tool of choice for .NET development. Microsoft provides a unit testing framework but it only works with some higher-end versions of Visual Studio. They're so similar that it's almost ridiculous that Microsoft created their own version. (See one of my previous posts for more information...
-
Coffee DSL in Groovy
I thought I'd follow up with my previous post with the Coffee Domain Specific Language in the Groovy Language. This is really one of my first forays into Groovy, so it's pretty rough. It's really just a direct translation of the Ruby code and not what I would expect to...
- Newer posts Older posts