BarCamp Texas Day 1 Sessions

The sessions were quite diverse and interesting on the first day of BarCamp.  Since most sessions were only 30 minutes, it was difficult for the presenters to go in to much depth.  However, 30 minutes is good enough to give a good introduction to a topic you might not know very well and give direction as to where more information can be obtained.  Here is a brief description of the sessions I attended.

Startup Methodology

I am not sure that this was the exact title, but James Lancaster of Research Valley Innovation Center gave an excellent overview of his methodology for working with startup companies.  The methodology, INNOVATEnRV, describes the stages of company startup and James explained the types of issues that startups would and should be concerned with at each stage.  This presentation was the most polished of the day, at least of the sessions that I watched.

Drupal in 30 Minutes

Chip Rosenthal, from Unicom Systems Development, presented an overview of Drupal.  For the uninitiated, Drupal is a content management system written in php.  I felt is was a good introduction since I had never taken the time to look over Drupal.  The one interesting nugget in this presentation was that Chip recommended looking at the Zen Drupal theme, that is not one of the stock themes in the installation, because it is very configurable and can give your site a look that is less like every other site running Drupal.

Social Media Marketing

Nikhil Nilakantan, from Social Span Media, gave a session on marketing on social networking sites.  I have to admit that this is not a segment of the internet that I have paid much attention to.  I am fascinated that these sites are as popular as they are with people over 22 years old.  I understand LinkedIn, but I do not understand why I would want to really participate in the others.  Nonetheless, Nikhil presented statistics on social networking site traffic that did make me take notice.  He stated that the top 10 sites attracted 131.5 million unique visitors during December 2007 alone.  The more interesting statistic was that the average visit on MySpace lasted 30 minutes (20 minutes for Facebook).  Nikhil estimates that $1.8 billion were spent on social network related advertising last year.  I have no doubt that someone will find out how to make advertising work properly with this type of market and usage pattern.  The market is simply too juicy to pass up.

GWT and Gears

Tom Peck, from AppEngines, presented a session on both GWT and Google Gears.  This was one of the sessions that really could have been an hour long or maybe even longer.  GWT is a framework that allows developers to code web application GUI layers in java while using an api that is quite similar to swing.  I have seen demos of this technology before and it is quite impressive.  Google Gears is in beta and allows the development of applications that run in a browser and allow offline data storage on the local machine.  Gears accomplishes this via a browser plug-in that utilizes the embedded SQLite database engine for the storage.  There is an api available from both GWT and javascript.  Whoever figures out offline storage in browsers can potentially make a gazillion dollars so it is weird to me why Google is giving this away.  Since there are many people working at Google that are much smarter than me, I am sure they have a strategy.  Here is my prediction for a competitor to Gears:  When Silverlight 2.0 is released, someone will provide this capability via the .Net Isolated Storage api (and no I haven’t spoken with anyone already working on this).

Introducing AlphaBetaFinder.com

Anita DuBose presented the freshly launched AlphaBetaFinder.com from AppEngines.  The site is a matching service for software and hardware vendors looking for alpha and beta testers for their products.  The idea is that potential testers can register and provide information about what they are willing to test and what equipment they have available.  Vendors can then search the database for matches and send invitations for testers.  The site will inform the vendor when testers are interested and they can purchase the contact information for the testers.  For now, everything on the site is free because AlphaBetaFinder is currently undergoing its own beta testing.

Tips on Podcasting

Jonny Dover presented some tips on Podcasting and Brad Dressler joined him to demo Audacity, an open source audio editing tool.  I was quite interested in this session because podcasting is something I would like to try.  Good tips were given such as eliminating pauses, working from a prompter or script (CuePrompter.com was recommended), and finding a way to include more than one voice on the podcast were given.  I spoke with a few guys in the audience (sorry guys, I forgot to get your names) that mentioned GarageBand was great to replace using Audacity if you are using a Mac.  They also pointed me to PumpAudio if you need low cost music to mix in to a podcast or the Creative Commons Audio section if you need low cost podcasting solutions.

GeoDjango

Justin Bronn and Travis Pinney presented GeoDjango, which is the GIS branch of the Django project.  Django is a rapid web application development framework for python, similar to what Ruby on Rails does for the Ruby developers.  I felt is was a good presentation but really was limited in depth due to the 30 minute length.

LINQ

I missed some of this presentation and I did not get the names of the guys presenting.  The session introduced LINQ and the new C# 3.0 language features that make LINQ possible.  They also gave a brief introduction to LINQ to SQL.  This was one of the more interactive sessions that I attended.  The audience was clearly interested.

Dinner

Several of us adjourned to a local pizza place, which claimed to have the world’s greatest pizza.  It was good but a claim like world’s greatest is difficult to verify.  I sat across the table from Eric Fortenberry, Cayce Stone, and Jeff Jurica from OrgSync.  These guys have a website product that is targeted mostly at universities to give their organizations (fraternities, student congress, etc.) a way to manage their membership and calendars and such.  I did catch a portion of their demo earlier in the day and site was quite nice.

After dinner, I retired to my hotel room but activities continued late in to the night.  A party went until 2am and folks continued to talk until around 4am.  Scott Riggins, a good friend of mine from Social Mobility, filled me in.  I wished I had kept going but a late night working for a client the night before kept me from pressing on.

Tags:

BarCamp Texas

Today I am at the BarCamp Texas conference in Bryan, Texas.  In contrast to the standard tech conference that you have attended before, BarCamps are attendee driven.  The attendees decide what sessions they want to present the day of the conference and nothing is decided in advance, other than the starting time and location.  I did not know what to expect, but I have been pleasantly surprised.  The day has gone like this so far:

The sessions I have attended so far have been very good.  They are not nearly as formal as a typical conference and there is much more audience participation.  The one negative aspect of the sessions so far is that the room is divided by a temporary barrier and both speakers are standing on either side of that barrier so they occasionally will drown each other out.

I will post a summary of the sessions that I attended later in the day.

Tags:

Going Ballistic on the Rails Community

Zed Shaw was a contributor to Rails and Mongrel.

I say "was" because Zed has decided that he wishes to distance himself from that development community.

Here is his post about it.  It is quite long but entertaining.

Somehow "Burning a bridge" just doesn’t seem to capture the essence of Zed’s post.

Tags: , ,

TortoiseSVN and Creating a Patch Containing New Files in New Directories

This morning I was attempting to create a patch, using TortoiseSVN, that contained new files within newly added directories.  When I selected the files to include in the patch, I was met with the following message:

You’ve selected added folders.  The patch won’t contain added files within such added folders.  Do you want to proceed anyway?

Sure enough, some of the files were not included in the patch.  Thinking this must be my fault, I blew away the new directories and reverted everything to the previous version.  I then created the new directories and added back the new files making sure that the Add to Subversion was all done properly.

The second time I received the same error.  The TortoiseSVN docs did not seem to offer any suggestions so I download the Subversion binaries from here at Tigris.org.  Afterwards, I was able to create the patch by running:

svn diff > pathfilename.patch

The patch file produced was just as I hoped it would be, including all directories and files.  I’m not sure if I was doing something wrong in TortoiseSVN or if this is just a bug, but if you encounter this error just download the Subversion binaries and run the diff from the commandline.

Tags: , , , ,

Dependency Injection - Good for more than just unit testing.

I read the article on InfoQ about the various blog posts that have been going back forth concerning the pros and cons of Dependency Injection (DI). 

A very interesting read for certain.  I think there are excellent points made on both sides.  Ultimately, there are pluses and minuses to all software architecture decisions.  I believe that if someone doesn’t think that tradeoffs exist in their architecture, they likely do not understand software architecture very well.

Jacob Profit argues that DI has grown in popularity largely because it helps with Test Driven Development (TDD).  Certainly, DI helps dramatically in this area and it likely is a good reason for the popularity surge.  However, I don’t really agree with his assessment of how the caller becomes responsible for configuration of dependencies when implementing DI.  Well, let me restate that to:  It can be that way but it certainly doesn’t have to be and I highly recommend against it.

First, using a framework makes things much easier.  The choice of framework makes a difference.  DI frameworks come in 2 basic flavors:  file based configuration and code based configuration.  A few support both configuration methods but most fall into one category or the other. In the file based configuration camp, Spring.net is my favorite but there are other excellent choices like Windsor and StructureMap.  ObjectBuilder from the MS Patterns and Practices group is an example of a code based configuration DI framework.

In my opinion, a code based configuration DI framework can lead you down the path the Jacob Profit mentioned - making configuration of dependencies the responsibility of the caller.

Just like Oren, I like DI because it makes it easier to create a loosely coupled software architecture.  When I use Spring.net, I get the added bonus of the ability to abstract away the location of my components when I use the proxy factories.  With Spring.net proxy factories, a dependency could be a local, in process, object instance or a proxy to a remoting object, web service, or enterprise service.  The product will soon support WCF as well.  This helps me develop and test in an all local configuration and move to a more distributed model after I am sure the core logic works locally in process.

Eli Lopian entered the discussion on the negative side of DI but made some statements that I think are a little misleading:

When you use DI as a ’Silver Bullet’ you are losing more then half the abilities of your programming language. You can not use static methods or the ‘new‘ keyword or sealed types. Oh, you have to make all your methods virtual too. This is going to be even harder once Extension Methods (and Linq) become main stream.

I will concede the static keyword argument.  It is difficult to handle static methods in DI frameworks.

The new keyword seems to me to be by design rather than a negative side effect.  DI frameworks create and configure dependencies for an object.  Therefore, the need to call new is removed.

It is possible Eli was referring to the need for later dependency creation rather than creating all dependencies at startup.  I can see this being a requirement.  In fact, I have had the requirement myself and I solved it by having the object request the dependency from the Spring.net context rather than having the dependency injected.  I realize this is not ideal, but no worse than coupling to a concrete implementation or factory in my opinion.

Eli also says that you cannot use sealed types and all methods must be made virtual.  This is where Eli and I start to part ways.

I have used both sealed types in my Spring.net configuration and have used objects without virtual methods.  In fact, most of my objects do not have virtual methods.  Whether or not to make a class sealed and make methods virtual is a design decision that has nothing to do with the use of a DI container.  I make sure to retain the flexibility of the caller by enforcing the use of the interface/implementation paradigm in my designs.  This way I can divorce my decisions about inheritability from the flexibility I want in the caller’s code.  I agree that you probably want to avoid sealed classes and make methods virtual, if the caller is declaring concrete class variables instead of interfaces.  However, interfaces are the way to go in my opinion.  In fact, using interfaces for variable declaration types is a good idea in many cases even if a DI container is not used at all.

I might be missing the point but the last sentence in the quote from Eli Lopian does not make since to me at all.  Using extension methods is perfectly ok with DI containers.  I have even attached a very simple sample project to this post demonstrating both calling extension methods from an object returned from the Spring.net context, and calling extension methods on a property injected within the container.  I fail to see why LINQ would be a big issue either.  The types of objects I would be performing LINQ queries on would likely be value objects that I use for my problem domain. These would not be something I would normally configure in a DI container anyway.

By the way, I am already working on a post describing Extension Methods in general and I should be posting that either tomorrow or Monday.

Tags: , , , , ,

More Testing on that Bot’s Vocabulary, Please

Apparently, Microsoft did not perform enough edge case testing on their Santa bot for Windows Live Messenger.  This link points to the story.  It seems Santa is capable of discussing rather naughty topics and using language that is not what you want your kids exposed to.

This just points out how software ends up getting used in ways that the programmers never envision.  By the way, Microsoft has removed the Santa bot and I am certain he will be put through the testing ringer before (if) he makes a future appearance.

Tags: ,

What is Dependency Injection (and why you should care)?

There is much discussion around the new ASP.net MVC framework. Scott Guthrie has been writing a series of articles describing the functionality of the upcoming framework. I highly recommend looking at this soon to be released framework offering from Microsoft. One feature that I am happy to see is the ability to integrate the MVC framework with dependency injection containers such as Spring.net and Windsor. I plan to go over this integration capability in a future post but I like to start with a post discussing dependency injection in general.

The central idea behind dependency injection containers, also called Inversion of Control (IoC) containers, is to create flexibility in program architecture by removing the knowledge of dependency creation and configuration from the individual software components. For instance, I have a program that has a customer component whose responsibility is saving and retrieving customer objects. The customer component is a user of the validation component as well as the persistence component. Traditionally, I would have simply created new instances of these services from within my customer component:

public class CustomerComponent {

    private ValidationComponent validationComponent;

    private PersistenceComponent persistenceComponent;

    public CustomerComponent() {

        validationComponent = new ValidationComponent();

        persistenceComponent = new PersistenceComponent();

    }

    //use these two components

}

The problem with this implementation is that it ties my customer component to these two concrete implementations of its dependent services. Of course, a better way to this is to use some sort of factory pattern implementation. That code might look like this:

public class CustomerComponent {

    private ValidationComponent validationComponent;

    private PersistenceComponent persistenceComponent;

    public CustomerComponent() {

        validationComponent = MyFactory.Get("Validation");

        persistenceComponent = MyFactory.Get("Persistence");

    }

    //use these two components

}

This is much better than the first block of code because I am no longer tied to the concrete implementations, provided that ValidationComponent and PersistenceComponent are abstract implementations. However, I am tied to the MyFactory class implementation. This is where a dependency injection framework comes to the rescue. A dependency injection container allows me to define properties in my customer component class for each of the dependent components I need. When the container creates an instance of my customer component, those dependency properties I have created are automatically set with fully configured implementations.  In the code below, the CustomerComponent implementation has properties for the validation and persistence components, but no code to set these properties:

public class CustomerComponent {

    private ValidationComponent validationComponent;

    private PersistenceComponent persistenceComponent;

    public ValidationComponent Validation {

        get {return validationComponent;}

        set(ValidationComponent value) {validationComponent = value;}

    }

    public PersistenceComponent Persistence {

        get {return persistenceComponet;}

        set(PersistenceComponent value) {persistenceComponent = value;}

    }

    //use these two components

}

If I am using C# 3.0, I can take advantage of the new property syntax and my class will trim down some:

public class CustomerComponent {

    private ValidationComponent validationComponent {get;set;}

    private PersistenceComponent persistenceComponent {get;set;}

    //use these two components

}

The dependency injections frameworks will all vary slightly on what happens from here but they all have a lot in common.  Spring.net, Windsor, and StructureMap all have xml configuration files that allow you to specify the .Net System.Type and give a name to each  of your components.  They also have the ability to set properties on your components, or even set private field values in certain cases.  The values of these properties can be standard  .Net data types or they can also be other objects that have configured in the container.

This was a very brief introduction to the concept of dependency injection and I am planning to write up more detailed descriptions on the details of using Spring.net, Windsor, and StructureMap soon.

Tags: , , ,

← Previous Page