Party with Palermo @ DevTeach is tomorrow!!

DevTeach kicks off tomorrow with a smashing Party with Palermo.  Currently there are around 100 lively characters RSVPed to attend.  Remember, cover charge is 1 business card.  Cheap price, I know.  It’s the perfect way to kick off a conference week.

Party with Palermo is open to all, not just conference attendees, so bring your friends, your wives, husbands, (not kids) etc.

Starting this spring, you can keep tabs on all Parties with Palermo from the main website at www.partywithpalermo.com.  I’ll link to each events RSVP site from the main site.  The main site will include annual sponsors and keep a link history to past parties.  Party with Palermo will happen 5 (FIVE) times in 2008 at various conferences, and it is THE BEST way to kick off a conference week with your friends.  Plan to arrive in town the day before the conference, and meet up with your friends that evening at Party with Palermo.  Everyone else will be there.  So should you!

If you are going to Tech Ed Developers, make sure to RSVP to the PwP for that conference as well.  Make sure your plan arrives early on June 2nd, and you’ll have plenty of time to get there.

For DevTeachers, make sure to come see me in my breakout sessions:

Blackbelt configuration for new projects
Jeffrey Palermo – ARC439
Any architect knows the challenges of setting up configuration management for a new project. Architecture isn’t just for the application. The manner in which source control, dependencies, and the Visual Studio solution is set up can have profound impacts on the productivity of the team. In this session, we’ll set up a source control repository, a VS.Net solution and a build script to enable a team to move quickly on the project. We’ll used advanced techniques to reduce friction while working with the code base on a day-to-day basis.

ASP.NET MVC Framework Submersion
Jeffrey Palermo – NET328
The move from ASP 3.0 to ASP.Net was a very dramatic move, and it forced developers to learn a completely new way for building web applications on Windows servers. From Web projects with v1.1 to websites in v2.0 and then web application projects in v2.0+ , working with ASP.Net can be a more difficult than necessary due to viewstate, postbacks and the control lifecycle for post-back eventing. Microsoft is providing an extension to ASP.NET to provide an easy way to implement the Model-View-Controller pattern using ASPX as a view engine (templating). With all presentation logic residing in the Controller, the View (ASPX) is left to concentrate on what it does best: rendering html. This new MVC framework is pluggable and testable and even allows for Controller classes to be created with your IoC container of choice. This presentation will include a primer on programming with the MVC pattern and will also cover unit testing controllers and creating controllers that use dependency injection.

Heard Mike Cohn speak at AgileAustin user group

Today I had the pleasure of hearing Mike Cohn speak at an AgileAustin meeting. Below are some of my raw notes. I have not edited them. Just a brain dump of some of the presentation.

– agile is all about continuous improvement
– we cannot predict how an organization will respond to change.
– We cannot plot an agile transition on a ghant chart.
– When we break things apart to a small level, we sometimes lose sight of the whole
– The steps necessary to become good at X cannot be enumerated and have them be correct for more than a single organization
–

Different mental model: CAS, Complex Adaptive System
– many agents acting in parallel
– Control is highly dispersed and decentralized
– Overall system behavior is the result of a huge number of decisions made constantly by many agents

Our organizations need to be networks, not a hierarchy

Success:
Newtonian: Success = closing the gab with the desired state and actual state

CAS view: Success = achieving a good fit with the environment

Agility is different for every company. We need to find how it fits with the environment.

Vision should come from someone influential in the organization.
– Local actions will be taken based on interpretation of the vision. Overall we can’t predict local actions based on the communicated vision.

CAS (agile) model of change:
– Behavior is unpredictable and uncontrollable
– Direction is determined through emergence and by many people
– Every effect is also a cause
– Relationships are empowering
– Responsiveness to the environment is the measure of value
– Decisions are based on patterns and tensions
– Leaders are facilitators and supporters

Traditional model of change
– Behavior is predictable and controllable
– Direction is determined by a few leaders
– Every effect has a cause
– Relationships are directive
– Efficiency and reliability are measure of value
– Decisions are based on facts and data
– Leaders are experts and authorities

ADAPT acronym
– Awareness: Before an organization can change, the organization needs to be aware of the need to change. We have to be aware that what we are doing is not working as good as we would like it to work.
– Desire to change
– Ability to work in an agile manner
– Promote early successes to build momentum and get others to follow
– Transfer the impact of agile throughout the organization so that it sticks.

Registration now open for Party with Palermo: Tech Ed 2008 Developers edition

If you are going to Tech Ed Developers, and you have a blog, add the badge below.  The Tech Ed party website is up.  Go RSVP now. 

Party with Palermo is the place to be when you get in to town.  Meet up with your friends at Party with Palermo.  If you would like to sponsor, the information is there as well.  http://teched2008.partywithpalermo.com/ 

Please add this badge to your website or blog to promote the event:

Party with Palermo

Registration now open for Party with Palermo: DevTeach 2008 Toronto edition

If you are going to DevTeach, and you have a blog, add the badge below.  The DevTeach party website is up.  Go RSVP now. 

Party with Palermo is the official kick-off social event of DevTeach Toronto.  After the pre-con, the conference will move to Party with Palermo Monday night.

If you would like to sponsor, the information is there as well.  http://devteach2008toronto.partywithpalermo.com/ 

Please add this badge to your website or blog to promote the event:

Party with Palermo

ASP.NET MVC Framework – new build available – source includes unit tests

Just today, the MVC Framework team dropped the soure code refresh on its CodePlex workspace.  This includes a big controller base class refactoring along with other enhancements.

A big deal, also, is that the source code drop now includes the unit tests!  That’s awesome.  Great job Levi, Eilon, Phil and Rob!!

Now we have some work to do to upgrade MvcContrib and CodeCampServer to the new drop. 🙂

The biggest deal is that controllers and actions are now more DRY and more SRP and much more testable because of the ActionResult that action methods now return.

Keep in mind that the MVC Framework is still a work in progress so there are still many things that will change.

I’ll be reporting my findings with the new release, and from what I have found out this week at the MVP Summit, there are some big improvements.  I was also able to corner Phil Haack for a conversation, and when I started sharing my ideas, he was way ahead of me on almost all of them, so color me impressed.  Keep tabs at http://feeds.feedburner.com/jeffreypalermo

Finally trying out Twitter – we’ll see how it goes.

So after having a dormant Twitter account for a long time, I have finally found myself without a laptop, with a mobile phone, and with some 10 second increments in between things.

So, here at the MVP Summit in Seattle, Washington, I’ve started to tweet, twoot, whatever it’s called.  I’m twittering.

You can waste you time reading them at http://twitter.com/jeffreypalermo

Action behavior using ASP.NET MVC and MvcContrib

This post is a quick rundown of action method behaviors.  This will be halfway obsolete with the next MVC drop on codeplex, but here goes:

You can download MvcContrib from http://mvccontrib.org.  The convention controller is there.  The ConventionController takes away nothing from System.Web.Mvc.Controller, but it adds some useful things on top.  My example controllers inherit from ConventionController.

First, To get an action method to fire and run, just make it public.  Now it’s web callable:

public class TwitterController : ConventionController
{
    public void SaveTweet(string tweet)
    {
        //integrate with twitter to do cool stuff.
        Response.Write("Wrote: " + tweet);
    }
}

If you run the above action with the default routes, you’ll get the error:

A public action method named ‘Index’ could not be found on the controller.

To fix that, we can add MvcContrib.Attributes.DefaultActionAttribute and to to the url:  http://localhost:1308/twitter?tweet=howdy

[DefaultAction]
public void SaveTweet(string tweet)
{
    //integrate with twitter to do cool stuff.
    Response.Write("Wrote: " + tweet);
}

And the output is:

Wrote: howdy

Now, what if I didn’t want the SaveTweet method to be web-callable.  Perhaps it’s a public method on a controller that isn’t an action.  I can added System.Web.Mvc.NonActionAttribute, and I’ll navigate to http://localhost:1308/twitter/savetweet?tweet=howdy.

[NonAction]

/twitter/savetweet?tweet=howdy.

{
    //integrate with twitter to do cool stuff.
    Response.Write("Wrote: " + tweet);
}

Then I get the following error because now SaveTweet is not an action method:

A public action method named ‘savetweet’ could not be found on the controller.

Now, finally, if we look at the method name, we can see that SaveTweet(string tweet) is a non-repeatable action.  It has side effects.  It’s pushing a tweet to twitter.  We probably don’t want that to happen with a GET.  In other words, we don’t want the mere act of navigating to /twitter/savetweet?tweet=howdy to cause a backend change in the system.  Because of this, it’s reasonable to restrict this action to POSTs only.  We can do that by using the MvcContrib.Attributes.PostOnlyAttribute:

[PostOnly]
public void SaveTweet(string tweet)
{
    //integrate with twitter to do cool stuff.
    Response.Write("Wrote: " + tweet);
}

If we attempt to run this with a GET, we’ll see the following error:

Action ‘SaveTweet’ can only be accessed using an HTTP Post.

I’ve given a quick rundown of different ways to use action methods.  Note that the ASP.NET MVC Framework is still in flux, and things will still change dramatically.  I, and others, are expressing our constantly evolving understanding of how to use the ASP.NET MVC Framework as time goes on.  This understanding is expressed in the MvcContrib and CodeCampServer.  You can follow my understanding process on my feed at http://feeds.feedburner.com/jeffreypalermo.

Also follow Phil Haack, who is a PM steering the evolution of the framework.