Saturday, 3 April 2010

OpenRasta needs an msdn license

I don’t usually use this blog for requesting help, but I’m afraid on this one I have to.

I don’t have access to an MSDN license anymore, as the cost is too high, I’m not an MVP and the ActionPack works for my professional needs. Except it doesn’t work so well with OpenRasta.

With the upcoming Visual Studio release, and the new OSs out there, I’m out of licenses to continue testing OpenRasta on all those platforms.

So, my friends, the communnity, I’m turning to you. Do you have a spare MSDN license somewhere? Do you know someone at a vendor happy to provide such a license? Maybe even Microsoft? Now is the time to help OpenRasta!

Email openrasta-inneed@serialseb.com with your suggestions! Thanks!

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!