A while back, I had started playing with the Managed Extensibility Framework (MEF) from Big Mike – an extensibility framework that lets you discover components that implements your interface, thus allowing you to do Software Composition. For close to a year now, I have also been playing with ServiceStack – a clean and elegant Open Source solution for Web Services.
I’ve wondered for quite a while now if the two could be combined, i.e. if it was possible to do Service Composition by using MEF and ServiceStack. I figured it could be done, but could never find the time to verify my assumptions…until now.
Continue reading “ServiceStack extensibility using MEF”
I was playing with Amazon Web Services (AWS) over the weekend, trying out a few things including Amazon S3 for file storage. Unfortunately I could not find a quick and easy way to upload an image and retrieve its URL in single call in the AWS SDK…so I got creative
Continue reading “Uploading a file and getting back its URL with AWS”
Here’s a quick example on how to set and handle timeout on a spawned thread. I hope this helps!
Continue reading “Handling timeout with ThreadPool and ManualResentEvent”
In theses past weeks, I’ve been playing around with NancyFx – a simple web framework a la Ruby Sinatra. So far it has been a joy to use. While I still love ASP.NET MVC, I find myself a bit more appreciative each day of the simplicity of Nancy.
One of the thing that I had set out to do was to build a simple registration module using Forms Authentication for a sample app, and to verify that the authentication worked by trying to access a secured module.
Continue reading “Forms authentication with NancyFx”
At my current job, I had to implement a Scheduling system for our banking clients. The requirement was for it to be pluggable, i.e. it should be able to pickup schedulable items/tasks that their developers or our support team would give it. It had to be secure, and it had to be able to handle long running tasks.
My solution for this was to use Quartz.NET as my Scheduling engine, which I encapsulated inside a windows Service. To access it, my web application would make calls to WCF service hosted inside the Windows Service, which used a UserNamePasswordValidator to prevent unauthorized access to the service. The remaining requirement to meet was that of the schedulable tasks. The solution: MEF.
Continue reading “Sub-directory look up with MEF”
Back when I was learning Ruby on Rails, I really liked the ease with which you could migrate your database, or even auto-generate migration scripts based the script name.
Continue reading “Introducing MigrateDB.NET 0.0.1”
For a better understanding of what Data Transfer Objects (DTOs) are, I suggest these nice articles from Big Mike and Oracle. My simplistic definition of a DTO:
A stripped down version of your data layer entity that lacks some of the fields and validation mechanisms the true entity would have, and which is exposed for encapsulation needs (in this case, hiding the internal representation of your entities).
Out of the box, NHibernate has support for DTOs, using what they call a ResulTransformer.
Continue reading “Using DTOs with NHibernate”