As a front-end developer myself and also one that manages other developers with a focus on software engineering best practices in the client side, I find myself in need of a good teaching resource. Although there are plenty of resources online regarding client-side development, I’ve started one of my own that will reflect what are … Continue reading Client Side Development – Learning Resources
I’ve recently moved back from a Macbook to a Windows 8 laptop (yay!) and so I’ve decided to check out visual studio again after a relatively long period of using IDEA IntelliJ. IntelliJ is an awesome environment and I’ve really enjoyed using it (after getting used to it) for client side and Node JS development.
IntelliJ’s integration with node JS is a pleasure to work with and VS has a lot to catch up to. A definite move in the right direction is the recently published (open source) Node.js Tools for Visual Studio package. While its not release ready for VS 2015 (which is also just RC still) it seems to work fine already.
In the first part of this article I showed how I’ve been testing code using MEF and a generic base class that is in charge of wiring up the dependencies.
In this part I will focus on how I got WCF to wire up my web service using MEF in what I think is quite an elegant way.
My first requirement was to be able to write a web service that will use dependencies (imports) but that wouldn’t require me to write the composition code in the service class itself. Most of the examples I saw online didn’t provide me with a good way to do that unfortunately.
Until I came across this excellent post by Tim Roberts which shows how to tap into the WCF pipe-line and have your services composed automatically instead of having to do it per service or including wire-up code in your classes.
While the code Tim provided was a great start I thought it wasn’t just right for me. Specifically it was the fact that it required custom code in the Global.asax file which for me was not as elegant as it should be.
So I’ve done a bit more digging into the WCF pipe-line and discovered that I could achieve an elegant, completely configuration-based solution by implementing my own endpoint behavior.
In the end I needed to only create 3 classes to achieve this: EndpointComposedElement, ComposedEndpointBehavior and ComposedInstanceProvider.
This article will focus on how I’ve adopted unit testing in .NET using MEF and how to also apply this to WCF web services.
I haven’t been dedicated to unit testing for a long time but once I started I couldn’t stop. There are many great benefits to doing unit tests, I wont list them here but a good article to read is at: Agitar.com
What made me build something on my own? I wanted something light that I could also integrate into existing code without making too many changes. So I focused on a couple of things: Testing and Dependency Injection. I wanted an elegant solution that didn’t rely on external libraries or that will require a steep learning-curve.
In this article I will focus on these topics and how I solved it for myself. I’m not going to dive into other topics such as The SOLID principals, TDD, Dependency Injection, Mocking, etc. If these terms are not familiar to you, I suggest you read up on them first.
I’m actually going to divide this article into two parts, to keep them shorter and to the point:
- This first part will discuss how to do testing with MEF.
- The second will discuss how to use MEF and test for a WCF service.
Today I’ve released the second version of ImportanTweet.com.
The site was first released about a couple of weeks ago in a very limited, invite only mode and a few lucky participants have gotten to use it and I have received some excellent feedback that to the greater part I’ve managed to incorporate in this release. Others will be added later as well as more features and improvements I already have in mind.
Let me start by saying that your feedback is crucial for the site to succeed so please keep it coming in any form you can. I can be contacted here through comments, on Twitter at @important_t_com and by email.
This new release is packed with new features, improvements and some bug fixes. Below is a list of the major ones to notice:
I am very happy to announce that today I’m officially making my project named ImportanTweet available on the web!
The idea behind ImportantTweet is to show the tweets that are important to you so if you follow a considerable number of accounts on Twitter and it becomes difficult to keep track and you feel like you miss on tweets you find interesting, IT is the tool for you.
In many occurrences i find myself wanting to fade in an element on the page and then immediately fade it out as a way to convey that something happened in a non-obtrusive way.
To do that I need to call the fadeIn and fadeOut jQuery methods in sequence. This can be done easily because fadeIn accepts a callback as a second parameter which will be called when the animation completes.
Easy as it is to do I still find it annoying that i have to call two separate methods for an action i wish to be done as one so naturally since it is so easy to extend jQuery I wrote a little extension that does just that.
Again I’ve put some focus on the List Quick Helper which I think is a valuable extension on its on but also is a good platform for further extensibility. Extensibility not necessarily created by myself.
With this update to the helper I’ve included two major additions to functionality.
Ah! its Friday! And what better way to celebrate this day than with a nice GUI extension?
So here is my latest extension available for you to enjoy…
With 2011, the GUI received a new breadcrumb control which is a very useful way to quickly orient yourself of where you are in the system and making it easy to climb up the specific hierarchy you’re currently drilling through.
Of course, those of us who use Tridion know that we usually jump from one location to another, spanning over different publications and sections within publications. For those cases, if we want to go back to a location we were working on before we need to locate it again in the tree, which can be quite a hassle. Especially in large environments.
So my extension will hopefully make it even simpler to work within the GUI in the manner I just specified.
This extension adds 2 new buttons to the GUI right next to the breadcrumb. The buttons mimic the behavior of the browser keeping track of the places(folders, structure-groups, etc.) a user visits.
The new 2011 Tridion GUI framework is a major overhaul to the way extensions have been previously developed. The framework now is far more robust and well designed. Building new and exciting extensions has never been easier. However, configuring your extension may not be the easiest thing in the world to do…
The following tutorial steps show how to configure an extension for the Tridion 2011 GUI from start to finish.
The example configuration and code is based on my extension: The Item XML Display.