Is there any best practice/guidelines available for using Code Contracts, Pex and 'Fake' framework? - code-contracts

Is there any best practice/guidelines available for using Code Contracts, Pex and Fake framework? Not able to find something concrete available with all 3 combined.

PEX site provides a bunch of documentation for using PEX and Code Contracts.
Your entry point probably will be Getting Started With Microsoft Code Contracts and Pex .
They also have good Moles documentation Microsoft Moles Reference Manual
Martin Angler has a great introductory article on Code Contracts & Pex: Assertions and Assumptions
There are also good workshops on this topic:
Code Contracts and Pex: Power Charge Your Assertions and Unit Tests
Microsoft PEX/MOLES & advanced Unit-Testing aspects (3 parts)
Manuel Fahndrich and Peli de Halleux - The Synergy of Code Contracts and Pex 10-minute note from PEX designers

The Visual Studio ALM Rangers are working on guidance for Microsoft Fakes. I'd be very interested in hearing from users who have adopted it, been scared off, success stories, tips, failures.... etc. drop me a mail at fakes#freetodev.com
I'll post a link here to our guidance as soon as we start shipping.
Mike

Related

How to do TDD using Pex for SharePoint based application

I am working on creating an application which is based on SharePoint Foundation 2010. I'm looking for a way to take advantage of the TDD methodology. While reseacrhing for TDD I read about Pex and Moles. Can anyone advice on what is the best approach to implement TDD for a SharePoint based custom solution. Please provide links to relevant articles or videos which can help.
It is not possible to use PEX for TDD. TDD requires you to write a failing test first, then write code to make the test pass. PEX requires you to write code first, then it generates tests for you. Something like NUnit is more suitable for TDD on .NET. Sorry, I don't know enough about SharePoint to comment on anything specific that it requires.

How do you make a Hapi.JS plugin/module?

I'm new to both Node and Hapi.js, but not to programming.
I've made a few simple Hapi.js servers, just for testing out Joi and other plugins.
I'm now trying to understand how best to package up chunks of functionality in a Hapi way, so we can re-use them in future projects and potentially share them with the world!
Are there any good resources for learning this available?
EDIT:
I've found a few good resources, but non which go into deep details about the plugin system.
https://github.com/hapijs/hapi/issues/1489 - Getting Started Tutorial Contest
https://github.com/otodockal/hapi-tutorial - Entry in above contest, with a section on plugins
I've made a sample project which groups functionality into plugins which might be what you're looking for:
https://github.com/johnbrett/hapi-level-sample
If you're looking at sharing functionality between plugins, look at the usage of plugin.expose, plugin.depend.
If you have any questions on it, you can raise an issue on the github project.
The latest hapijs.com website has a good intro as well: http://hapijs.com/tutorials/plugins
For some additional detail about hapi plugins (and hapi in general), see the following:
Developing a hapi Edge: A Rich Node.JS Framework for Apps and Services - This book is available now (also from Amazon), and has a chapter on how to create a plugin in hapi.
Matt Harrison's upcoming hapi.js in Action - This book is available currently in "MEAP" (Manning Early Access Program), and will soon (?) have a chapter available on plugins ("Building modular applications with Plugins").
hapi plugin search engine
Getting Started with hapi.js by John Brett also has a chapter on creating and using plugins.
Edit 2015-10-04: The chapter "Building modular applications with Plugins" in Matt Harrison's above mentioned book is now available in the MEAP edition.

Automated testing for an MFC based user interface

I am looking to run a load of automated functionality tests on a user interface application of mine and was wondering what is the best software out there to carry out these tests. Preferably the software will be able to intergrate with Visuall C++ 2005. I have googled various software however there is so much out there I'm not sure what is best for what I need. Any help would be awesome, thanks.
for automated software unit tests I would recommend google test. There is a very good q&a on this platform, which you can find here.
Additionally, there is CPPUnitLite, which is developed by the author of "Working Effectively with Legacy Code", Michael Feathers.
I used AutoIt Scripts for testing a MFC application just a little bit, but it was not that easy to maintain them properly and build an effective logging system for failed tests.
However, the unit tests depend heavily on the architecture of your program and the structure of your class - especially the dependencies to other components / classes. So if you already have an existing MFC application, which was not built with unit tests in mind, you probably have to refactor a lot of things. Therefore, I would recommend the mentioned book. You can also use the classic "Refactoring" by Martin Fowler.
Did you take a look at AutoIt? It's a generic GUI scripting language which can also be used from C++/C#. I'm using it to automate parts of testing a Visual Studio addin.

compare sharepoint with java world

I am a good java web developer having knowledge of numbers of technical issues in java industry.
I heard lot about SharePoint. I don't able to understand it because I don't have idea of workings in Microsoft world.
Can someone tell about SharePoint by taking a scenario from java world.
Central repository for what? Not really. No offence but you really need to do a bit more reading first. Try
What is Sharepoint
Microsoft SharePoint - Wikipedia
SharePoint product information page
Can someone tell about SharePoint by taking a scenario from java world.
There isn't a direct correlation to Java. SharePoint is an application, Java is a programming language. It's like asking someone to describe Microsoft Excel in terms of the PHP world - doesn't really make sense as a question.
However, Alfresco is an OSS project is similar to SharePoint and written in Java.
How does it differ from Mircosoft Visual Studio Software
VisualStudio is an Integrated Development Environment (IDE), like Eclipse.

Help with getting to grips with node.js

I work full time in a PHP and JavaScript team but we are looking at a new technology to adopt. We want to dive into node.js however we all want to get the same book but we have no idea which would be the best.
Any recommendations ?
Also links would be good.
Regards
Oliver
There are no real - like in actual wood - books out yet, Yahoo! Press has one in the works though, title will be "Up and Running With Node.js".
Right now there's a community driven e-Book from the makers of the express.js framework, its source code is also available on GitHub.
If you like videos, then should check out a couple of talks by Node's creator Ryan Dahl:
Introducion to Node.js - YUI Theater (May 2010)
GoogleTeckTalk - JavaScript on the Server (July 2010)
Techniques for a single stack world - JSConf.eu (Sep 2010)
You can find even more links on our tag wiki.
PS: Best thing IMO is to start a little side project and use that to explore Node.js.

Resources