kenegozi.com

<form id='kenegozi' action='post'></form>

   
2010 Mar 11

Support Castle Project – one click away !

We’re going for a Castle ad on stackoverflow.

 

How can you help? hop on meta.stackoverflow.com at http://bit.ly/9eNHig, and upvote Castle.

 

thx

 

 

huge kudos to Stackoverflow for doing this, and to Mauricio Scheffer for setting us up

2010 Mar 6

Fix Windows 7 Start menu Search

tagged as: miscellanea

Suffer.End()

 

http://www.troublefixers.com/fix-windows-7-start-menu-search-problem/

 

I wonder why the hotfix mentioned is not pushed to auto-updates. This was a real pain in the neck without the search thing. I like to fire up things as fast as possible, which mean “no mouse” and also “no searching with up/down arrow keys”

2010 Mar 4

Recipe for disaster

tagged as: debugging

take:

  • 1 Late night
  • 2 Cryptic, long and super complex batch files
  • 480 LoC of the above
  • 1 data-entry-for-tests utility that grew way to big and wacky
  • 1 project on CI that either do not build, or fail all tests
  • ~12 minutes is the time taking the above project to fail
  • 0 lines of error output (until I figured out where to tweak the batch file)
  • 2 development environments
  • 1 crying baby
  • 1 sleeping wife
  • 5 hours
  • and then finding out that some QA guys do not believe in code reuse.

The end result is:

 

image
2010 Feb 25

Castle project has finally moved to git

tagged as: castle | monorail | Source Control

http://github.com/castleproject/

 

thanx a bunch to the work done by Mauricio Scheffer, Henry Conceição and the rest of the people helping out in the process.

 

fork away :)

2010 Feb 24

Monorail view engines usage poll

tagged as: castle | monorail | aspview

If you use monorail, then go ahead and vote:

http://twtpoll.com/bbsrdu

2010 Feb 23

TDD in IKEA

tagged as: Testing

http://altinoren.com/PermaLink,guid,a530ffb1-34d1-49f8-a093-888d6354e91a.aspx

 

Usually I do not just link to another post, but this one is simply hilarious, and I’d really want a permalink I could easily find again in the future. A post on my own blog is a great way to achieve that…

2010 Feb 1

dotTrace 3.1 64bit would not integrate with Visual Studio and Resharper

tagged as: visual studio | tools

Installed dotTrace 3.1

Since I run windows 7 64bit on my laptop, I chose to install the 64bit version of dotTrace. After the the installation, the standalone profiler worked great. It was also showing up in the Visual Studio AddIns menu. However, the purple button (next to the Debug “Play” button”) was greyed out, and the one within the Resharper Unit Testing sessions window was also disabled.

 

After re-installing, re-booting, and re-filling my cuppa’ coffee, I suddenly remembered that Visual Studio is actually a 32bit application, and that I’d probably want to install the 32bit version of dotTrace if I want them both to play nicely.

 

Did it.

 

Problem solved.

 

image

 

FYI

2010 Jan 27

Can you spot the bug?

tagged as: tools | Testing

Can you spot what will cause the following NUnit test not to run on TeamCity 4.5?

[TestFixture("Testing some cool things")]
public class CoolThingsFixture
{
	[Test]
	public void When_Do_Expect()
	{
		Assert.That(2, Is.EqualTo(1+1));
	}
}

 

hint: TeamCity list it with the ignored tests, yelling “No suitable constructor was found”

2010 Jan 20

What’s new in Monorail 2.0

During the long, long time it took to get from 1.0RC3 to 2.0, many things have changed, and many things were added. I probably won’t cover it all in this post, and I’ll probably forget a few things that I got so accustomed to use (I have always used trunk versions, even way before I became a committer).

 

 

Programmatic config

If (like me) you do not like putting stuff in config files that the operations team do not care about, you can now run a Monorail application without the Monorail section in the web.config file.

How?  you’d need your Global class to implement IMonoRailConfigurationEvents.

e.g. from many of my websites: (I’m configuring AspView as view-engine)

public void Configure(IMonoRailConfiguration configuration)
{
	configuration.ControllersConfig.AddAssembly(Assembly.GetExecutingAssembly());
	configuration.ViewEngineConfig.ViewPathRoot = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Views");
	configuration.ViewEngineConfig.ViewEngines.Add(new ViewEngineInfo(typeof(AspViewEngine), false));
}

you can setup many optional things that way. e.g.:

// configue jquery as the validation engine
configuration.JSGeneratorConfiguration.AddLibrary("jquery-1.2.1", typeof (JQueryGenerator))
	.AddExtension(typeof (CommonJSExtension))
	.ElementGenerator
	.AddExtension(typeof (JQueryElementGenerator))
	.Done
	.BrowserValidatorIs(typeof (JQueryValidator))
	.SetAsDefault();
// configure url extensions
configuration.UrlConfig.UseExtensions = false;

delve into the intellisense on the IMonoRailConfiguration interface to find more

 

Return binders

The example speaks for itself:

public class State
{
    public string Code { get; set; }
}

[return: JSONReturnBinder]
public State[] GetStates()
{
    // fake code for the sake of the demonstration
    return new[] { new State { Code=“CA” }, new State { Code=“WA” } };
}

will render the JSON representation of the given State array

 

New routing engine

see http://www.castleproject.org/monorail/documentation/trunk/advanced/routing.html

and http://www.kenegozi.com/blog/2009/02/10/monorail-routing-and-the-homepage-routing-rule.aspx for setting a homepage route

 

RescueController

A rescue controller will take care of exceptions that have happened during an Action.

You’d create your rescue controller, implement IRescueController, inherit from SmartDispatcherController, and setup the rescue controller in the RescueAttribute on the regular controller.

see more here: http://www.castleproject.org/monorail/documentation/trunk/usersguide/rescues.html

 

AspView

The C# based view engine became a first class citizen in Monorail. There has been many improvements there during the time, which deserve a separate post perhaps. meanwhile you can look at the aspview tag on this blog: http://www.kenegozi.com/blog/Tag/aspview.aspx

 

I can’t think of more stuff right now, so ping me if I forgot anything.

2010 Jan 19

Monorail 2.0 – why the hell did it take so long

Being an Open Source project, with very good test coverage and a very active development, most users that actually run Castle bits in production were running off of trunk anyway.

 

The trunk is very stable, and the act of “release” should have simply been tagging any single commit to trunk as the 2.0 RTM.

 

However, we felt that we wanted some more stuff to justify a release – like updating the documentation, re-doing samples and Visual Studio integration packages, etc.

That lead us to a halt, as active committers did not use neither integrations nor samples, and same for the documentation. My personal stand was (and still is) that if someone wanted an official release so badly, then that one should contribute toward this, either with time and work, or with sponsorship money to buy this time and work.

 

No one did.

 

A few attempts at these parts was taken, but none concluded.

 

Meanwhile the project grew more and more, and parts of it became mandatory dependencies to various mainstream projects (such as NHibernate), while Windsor became more and more adopted as an IoC container of choice for many people.

Getting to a single point of approval across the board for the whole castle stack, without breaking third-party projects that depends on parts of Castle, became very difficult.

 

Breaking apart

In order to allow a manageable release process, the project was broken down to its parts. Now we have the four main projects, released on their on, with depending projects using compiled releases of the others.

The main projects are:

  • Core (de-facto including Dynamic Proxy) which is used on many other OSS projects
  • ActiveRecord
  • IoC stack (MicroKernel + Windsor)
  • Monorail

More details can be found on the projects page of castle’s website

 

An all-trunk builds can be retrieved with the aid of the horn-get project.

 

So why is Monorail last?

The reason is rather simple. Monorail depends on almost any other part of the stack. It even has subprojects such as ActiveRecord’s DataBinder (ARDataBind) which depends on ActiveRecord, and a WindsorIntegration project which depends on the IoC stack.

As a result we had to wait to get releases for all other projects.

 

What’s next?

I still have no idea. There are a few discussions going on about that (such as this one on the new roadmap), and you are all welcome to join the debates.

Subscribe

Statistics

387
834

The Lounge

Related Jobs

Related Books

search page | Blog's home | About me