Tuesday, 30 March 2010

OpenSource on .net at Microsoft TechDays

Register now at http://techdays-oss.eventbrite.com/

The .net ecosystem is rich in open-source solutions that many have already adopted as part of their business-sensitive toolkit. Come and listen about open-source web frameworks, object-relational mapping tools and other must-have frameworks the .net community has produced over the years, by the most prominent figures of the UK developer community.

Come and enjoy free food and drinks and listen to experts present you the best of breed of open-source software for Microsoft platforms.

Current program:

  • OpenRasta - A web application framework for .net

  • An introduction to IoC with Castle Windsor

  • FluentValidation, doing your validation in code

  • CouchDB, NoSQL: designing document databases

  • Testing your asp.net applications with IronRuby

  • Building a data-driven app in 15 minutes with FluentNHibernate

Thursday, 4 February 2010

Announcing the “20 days to OpenRasta” project

As some of you already know, I’m very excited that OpenRasta is being presented at Mix10 in Vegas by none other than the talented Kyle Baley. As I’ve not realised the 2.0 RTM bits yet, I thought it’d be great if we could release a fresh 2.0 RTM build for the occasion.

This is a call to action to the users, adorers and believers: OpenRasta needs you!

In the next 20 days, starting from this Friday, let’s try and all commit some of our time to OpenRasta in one way or another. There’s a lot to be done and focused on, from the new web site, to updates to the code base, to enhancing the documentation.

To participate, just join the mailing list, find something interesting you’d like to be doing, and commit to work on it on a certain day.

On top of that, from this weekend, I’ll be organizing a code-a-thon on either day, with anyone that cares to join me for a day of pure pair programming coding on some of the OpenRasta code-base. Want to see extensible authentication done? Donate your day, we’ll have coffee and lunch and lots of code! Not in London? We’ll use Skype. No excuse!

As for me, I hereby promise to start posting a videocast a day for 20 days. Provided we have somewhere to host the videos and someone can help out with the encoding!

I’ll update this post with all the commitments that were made to help get a new release out of the door in time for Mix.

Thursday, 19 November 2009

OpenRasta 2.0 release party!

The time is upon us, for a release and for a party to celebrate it.

Come and join all the UK OpenRasta users, it’s on the 12th of December and in Central London.

Go register on the eventbrite site now, quick!

Friday, 30 October 2009

Derivative work for speakers, or a guide on how to use my content

I realize I’ve never clarified what you can or cannot do with my slides and my talks. So here’s a clarification for anyone that wishes to inspire themselves from my work (aka derivative works) or reuse them.

I do not release my presentations, the videos or the content / slides under any kind of open-source license. Not even creative commons. Presentations take a while to build, structure and mature, and this cost me money. If you’re going to use them, you’re effectively using my work.

Now, I’m not anal about how you use the content, it’s written to benefit the community. However, ff you want to create a derivative work, or even re-present my presentations, I’m happy for you to do so provided the following conditions are met:

  • The original work author is to be named (that’s me), together with my company name (that’s Caffeine IT).
  • It would be terribly appreciated to link to the original content, or my blog, or both.
  • You notify me that you’re going to use the content, or created a derivative work.

If you have any issue with any of that, don’t hesitate to send me an email we can chat about it.

Thursday, 22 October 2009

Announcing the first Cambridge AltNetBeers – StackOverflow edition

We are expanding, how brilliant is that! If you want to have an open-space after the Cambridge StackOverflow dev-day, you now can!

Monday, 12 October 2009

#AltNetWorkshop on CQS with Greg Young

I’m very pleased to announced that this weekend, for a day only, Greg Young will be delivering a workshop for the AltNetGroup, for free, in London, on Command-Query Separation.

3 tickets will be available daily at 2PM on the AltNetGroup site.

Thursday, 8 October 2009

AltNetBeers StackOverflow DevDays edition

The registration for the post-StackOverflow conference in London is now open at http://altnetbeers-stackoverflow.eventbrite.com/

I’m sure it’s going to be an absolutely brilliant event, so register early as space will be limited.

Monday, 5 October 2009

London GayGeekDinner – Friday 9th of October

Just a quick reminder for those not monitoring the www.gaygeekdinner.com site, our next event is this Friday, and you can register at http://london-gaygeekdinner.eventbrite.com/

It’d be great if you could do it by Wednesday so I can have an idea of numbers. :)

Monday, 21 September 2009

Announcing a new kind of events: AltNetCrossTalks, this Friday at MRM!

And there you go. When you can’t scale up, scale out! We’re creating a new kind of talks, one where communities will meet and cross the technological Styx.

The first one is on Ruby, RubyOnRails and IronRuby, the presenter is Shay Friedman, the place is MRM, the time is this friday, and the this is the link.

Wednesday, 16 September 2009

Last day to enter the raffle for a ticket to Roy Osherove’s TDD workshop

As you know, Roy is delivering the first of our AltNetWorkshops on Saturday the 26th of September. Most of the tickets are now gone, but you have the chance to enter a raffle for the last remaining ticket by sending me an email at seb@serialseb.com

Sunday, 13 September 2009

The first AltNetWorkshop with Roy Osherove on Intro to TDD

I'm very glad to announce that we launched the AltNetGroup website last week, and opened the first couple of tickets to the first AltNetWorkshop, something that I've been very keen on organizing. Roy has been generous enough, together with bbits and Onalytica, to give the first of our workshops for free. The bad news is that the event date has changed, and is now handled on the 26th of September. The good news is that there will be another 5 tickets, of which two will be released on monday, and two additional ones on tuesday. This leaves us with one last final ticket that will be picked randomly to all those sending me an email to seb@serialseb.com.

Tuesday, 8 September 2009

Alternative Network Group News – AltNetBeers #12

As the ever excellent Udi Dahan is in town, it’s only natural that I organize an AltNetBeers. So get ready for another session on the 16th of September! You can register now on the ukdotnet site.

Thursday, 3 September 2009

Seb does Ireland – 30th of September to 3rd of October

And because I’m equally excited about going back to Ireland as I am going back to Scotland, I’ll be doing a bunch of things there.

Wednesday 30th September

Dublin alt.net at 8pm in Seagrass http://www.seagrassdublin.com

An intro to OpenRasta 

Thursday 1st October

Dublin

Not confirmed yet but should be a talk on agility in Dublin

Friday 2nd of October

Galway

Speaking at a conference on agility, will post about it when I get more details.

Seb does Scotland – 23rd to 25th of September

Well, it’s been a while since I’ve been a up north, and with such a great community up there, it was only a matter of time before I got back. Frankly, I was just looking for an excuse, and the guys have given me a beautiful one!

So here’s the schedule.

Wednesday 23rd September

Dundee – http://www.eventbrite.com/event/390722662/seb

When agile goes bad, how to stay calm and move forward

With applying agile methodologies comes changes in many aspects of delivering software. And with any change will come a time when something fails. How to keep everyone calm? How to provide practical solutions to prevent people from reverting back to non-agile practices at the first roadblock? Through examples gathered from personal experience and the community, we’ll explore ways to prevent the boat from sinking at the first spilled glass of water.

Thursday 24th September

Edinburgh - http://www.eventbrite.com/event/390708620/seb

An intro to OpenRasta

Everybody seems to rediscover the MVC model, and new frameworks seem to appear all the time. Most of those hide the richness of the web. Come discover OpenRasta, a very opinionated framework that help you write MVC-style web applications and data services, using a unified API.

Friday 25th September

AltNetBeers Scotland edition

The scot alt.net guys have asked me to facilitate a session of AltNetBeers, which I’m really excited about. Will update with the details when I know where it’ll be organized.

See you there!

Friday, 28 August 2009

NHibernate repository that Oren won’t like

public interface IRepository<T> : INHibernateQueryable<T>
{
ITransaction BeginTransaction();
void Delete(T item);
T Get(object id);
void Save(T target);
void Update(T item);
}
public class NHibernateRepository<T> : IRepository<T>, IDisposable
{
readonly ISessionManager _sessionManager;

INHibernateQueryable<T> _queryable;
ISession _session;

public NHibernateRepository(ISessionManager sessionManager)
{
_sessionManager = sessionManager;
}

INHibernateQueryable<T> AsQueryable
{
get
{
if (_queryable == null)
_queryable = Session.Linq<T>();
return _queryable;
}
}

public Type ElementType
{
get { return AsQueryable.ElementType; }
}

public Expression Expression
{
get { return AsQueryable.Expression; }
}

public IQueryProvider Provider
{
get { return AsQueryable.Provider; }
}

public QueryOptions QueryOptions
{
get { return AsQueryable.QueryOptions; }
}

public ISession Session
{
get
{
if (_session == null)
_session = _sessionManager.OpenSession();
return _session;
}
}

public void Dispose()
{
if (_session != null)
_session.Dispose();
}

IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}

public IEnumerator<T> GetEnumerator()
{
return AsQueryable.GetEnumerator();
}

public IQueryable<T> Expand(string path)
{
return AsQueryable.Expand(path);
}

public ITransaction BeginTransaction()
{
return Session.BeginTransaction();
}


public void Delete(T item)
{
Session.Delete(item);
}

public T Get(object id)
{
return Session.Get<T>(id);
}

public void Save(T target)
{
Session.SaveOrUpdate(target);
}

public void Update(T item)
{
Session.Update(item);
}
}

public static class CustomerQueries
{
public static IQueryable<Customer> ByName(
this IQueryable<Customer> repo,
string name)
{
return repo.Where(x => x.Name == name);
}
public static IQueryable<Customer> ByCity(
this IQueryable<Customer> repo,
string city)
{
return repo.Where(x => x.City == city);
}

}
public class MyPage
{
IRepository<Customer> _repository;

public MyPage(IRepository<Customer> repository)
{
_repository = repository;
}

public Customer UpdateCustomer()
{
return _repository
.ByCity("Aarhus")
.ByName("Sebastien")
.FirstOrDefault();
}
}
public class when_filtering_by_city
{
public void the_wong_city_is_not_selected()
{
var myTestData = new List<Customer>
{
new Customer { City = "Aarhus" },
new Customer { City = "London" }
};
var funPlaceToBe = myTestData
.AsQueryable()
.ByCity("Aarhus")
.FirstOrDefault();

Debug.Assert(funPlaceToBe.City == "London");
}
}

public class Customer
{
public string Name { get; set; }

public string City { get; set; }
}

Friday, 21 August 2009

OpenRasta 2.0 beta 2 is out

Grab the binaries at http://www.ohloh.net/p/openrasta/download?package=OpenRasta+2.0&release=Beta+2 or the code at http://svn.caffeine-it.com/openrasta/branches/2.0.2000

Tuesday, 18 August 2009

Presenting OpenRasta in Aarhus, Denmark, 27th of August

The good chaps in Denmark have asked me to do a session on OpenRasta. You can imagine how excited I was, and I immediately said yes! You can go and register now for it.

Saturday, 15 August 2009

What a difference a framework can make…

Rick Strahl, C# MVP extraordinaire, has released a very cool app at codepaste.net. Go and check it out, it’s quite cool.

One of the things Rick is doing is publishing a POD API that uses xml and json. And he posted on an unrelated entry an implementation of POD using MVC. For reference, here’s his snippet.

AcceptVerbs(HttpVerbs.Post | HttpVerbs.Put)]
public ActionResult PostNewCodeSnippetObject()
{
StreamReader sr = new StreamReader(Request.InputStream);
string data = sr.ReadToEnd();
sr.Close();

Snippet inputSnippet = null;

if (Request.ContentType == "text/javascript" || Request.ContentType == "application/json")
{
JSONSerializer ser = new JSONSerializer(SupportedJsonParserTypes.WestWindJsonSerializer);
inputSnippet = ser.Deserialize(data, typeof(Snippet)) as Snippet;
}
else if (Request.ContentType == "text/xml")
{
inputSnippet = SerializationUtils.DeSerializeObject(data, typeof(Snippet)) as Snippet;
}
else
return ExceptionResult("Unsuppported data input format. Please provide input content-type as text/javascript, application/json or text/xml.");


busCodeSnippet codeSnippet = new busCodeSnippet();
codeSnippet.NewEntity();

DataUtils.CopyObjectData(inputSnippet, codeSnippet.Entity, "Id", BindingFlags.Public | BindingFlags.Instance);

if (!codeSnippet.Validate())
return this.ExceptionResult("Code snippet validation failed: " + codeSnippet.ValidationErrors.ToString());

if (!codeSnippet.Save())
return this.ExceptionResult("Couldn't save new code snippet: " + codeSnippet.ValidationErrors.ToString());

return ApiResult(codeSnippet.Entity);
}

Ouch. Lot of fluff if I may say so. Let’s see what the equivalent implementation would be using OpenRasta.

The configuration:

using (OpenRastaConfiguration.Manual)
{
ResourceSpace.Has.ResourcesOfType<Snippet>().AtUri("/snippets")
.HandledBy<SnippetHandler>()
.AsJsonDataContract().And.AsXmlDataContract();
}

The handler:

public OperationResult Post(Snippet newSnippet)
{
var codeSnippet = new busCodeSnippet();
codeSnippet.NewEntity();

DataUtils.CopyObjectData(inputSnippet, codeSnippet.Entity, "Id", BindingFlags.Public | BindingFlags.Instance);

if (!codeSnippet.Validate())
return new OperationResult.BadRequest("Code snippet validation failed", codeSnippet.ValidationErrors.ToString());

if (!codeSnippet.Save())
return new OperationResult.InternalServerError("Couldn't save new code snippet", codeSnippet.ValidationErrors.ToString());

return new OperationResult.OK(codeSnippet.Entity);
}

I much prefer the latter. Don’t you?

Tuesday, 11 August 2009

NHibernate and OpenRasta frenzy in Aarhus, Denmark

On a very positive note, I’ll be delivering Skillsmatter’s NHibernate course in Aarhus, Denmark, from the 26th to the 28th of August.

I’m also discussing with some guys to get an OpenRasta presentation there so you can hear what the fuss is all about.

And I’ll take the Saturday to visit Copenhagen, as it would be a shame not to. If some people are available Saturday we can meet for a beer and a chat.

First time in Denmark, I’m quite excited!

Open Source, NIH and the meaning of conversation

[Update: Nate was kind enough to link so we could enter a conversation]

Yesterday, I made a certain comment on a person’s decision to release something in open-source, and they made a certain comment, and I’m very disappointed…

I could’ve started this entry like this, without providing you quite enough information to enter the conversation yourself. This is the way Nate decided to go about it in his entry last night entitled Open Source is not a Zero-Sum Game.

Let’s see what happened.

Nate - [Announcing the release of Siesta]
Victor - @nkohari seen snooze http://tr.im/wamQ ? why the need for siesta?
Nate - @vkornov Hadn't seen it.
Victor - @nkohari you need to ask on twitter before coding your own ;)
Nate - @vkornov Eh, nothing wrong with different approaches to the same problem.
Me -@nkohari if it was a different approach or a different problem, maybe. If it does the same as other REST frameworks, it's a waste of time and resources.
Nate - @serialseb Then don't use it. Sorry to bother you.
Me - @nkohari that's not the question that was raised by Victor, but fair enough, i won't use it. Meh.
Nate - I'm really disappointed to see people complaining that I open-sourced part of my commercial product. Sorry, next time I won't try to help.

So now you have the background. I won’t go and bore everyone with the countless support messages Nate received telling him to ignore the whiners and naysayers, I’ll let you decide for yourself if this was worthy of such a long rant.

From the system builder: don’t build it

Leaving aside the non-conversational aspect of Nate’s entry and twitter messages, there’s a couple of points I think are worth discussing. As I intend on having a conversation about this stuff, comments are open, you can name me in your blog and leave links to your blogs in there, I’ll add them to this entry.

When you require infrastructure code, you should always ask yourself this question: Is it worth me building? This is the Not Invented Here syndrome, and unless your business model is to reinvent the wheel for IP protection reasons, it’s an expensive process, as not only do you spend your time building it, you’ll have to maintain it.

There are two reasons why you’d want to build something. First, there is no equivalent on the market that can solve your problem in the amount of time it’ll take you to build it yourself (or slightly more as, as seen before, you’ll have to add the maintenance cost). Secondly, if the existing solution is poor and there’s no easy or cheap way to make it better.

If you’re building stuff for any other reason than the two above, you’re generating waste, spending time building code that is not going to give you a competitive advantage or serve your product / user.

That’s the point I tried to make in my twitter conversation. If it’s a different problem or if the solution is innovative, then maybe there’s nothing wrong with a different approach. If it’s the same, with a new brand, then it is a lean:waste. And there, I agree with one of Nate’s sentences: rolling your own is not always waste (emphasis mine).

From the open-source maintainer: do as you wish

The second part of the conversation is about open-sourcing code. I think those are two different conversations to have, as one doesn’t usually have the same waste-eliminating concerns when dealing with open-source.

Open sourcing code is great. I love doing it, so do others. And a myriad of frameworks pop-up, thanks to open source. Just in the ReST space, you have Snooze, BistroMVC, Restful MVC, now Nate’s Siesta, and of course OpenRasta. I’m pretty sure you could achieve some of the same results with FubuMVC too.

The question is not if multiple projects are good, they foster innovation by providing new ways to think about a problem, and new best practices start to appear. I know I am taking in a lot of ideas from all of those frameworks for future versions of OpenRasta. Competition is good.

I do still believe in eliminating waste in open source though. Call me idealist, but I don’t see why everybody would reinvent the infrastructure stuff. Pipeline models, asp.net integration, all those frameworks share some core infrastructure aspects. Why do we all reinvent the same problem over and over? Because we’ve not been collaborating to ensure we have communication in place.

That’s why I told Chad Myers many times: It’s great to see another frameworks with really good ideas, it’s a shame we’re duplicating effort endlessly on parts that are not bringing much innovation or value.

But I suppose that’s the state of things. The bazaar model requires that we’ll all come up and only the solution with the most market leverage will survive. Yes, we’ll have 250 ReST frameworks in a year time. And in two years, only two or three will probably see any usage at all. In the meantime, we’ll have wasted hundreds of hours of developers time.

Maybe the innovation will be worth it, but I’m still unsure if we’ll ever reach even.

Final words

So there you go, here’s the core of the question. Fragmentation doesn’t always lead to innovation, collaboration and discussion can prevent people going in a direction where they don’t innovate but just recreate it their way because it’s only 5 or 6 hours. Allegedly, Nate’s solution is simple and small enough that he’s probably not affected by this.

I don’t however believe that ignorance is a good reason to discard frameworks like snooze (which, by the way, is the one that was mentioned in the conversation, and the work of the ever excellent Andrew Davey).

As a final word, I’d like to remind everyone that one of the constraints of ReST is hypermedia. If you design APIs without any links, and advertise how to build URIs, you’re not doing ReST, your doing something else. It doesn’t mean you’re doing something badly, just that you’re not actually doing ReST.