Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Monday, February 6, 2012

Daily Links 06 Feb 2012


Testing Windows Phone Apps

Using AdMob for Windows Phone 7

Phone Core Framework
 - Navigation engine which simplifies navigation between pages
 - Dependency injection container which helps you to create lously coupled application
 - Configuration subsystem which allows you to manage workflow without rebuilding of an application
 - Tracing engine which allows to do postmortem analysis or analyze workflow/performance
 - Bootstrapping engine with plugin architecture
 - Primitive types: Lazy, Tuple

jQuery UI vs Kendo UI

Enabling SSL for a WCF Service

Hazards of Converting Binary Data To A String

Memory Profiling for Application Performance

Event Handler Memory Leaks, Unwiring Events, and the WeakEventManager in WPF 4.5

Entity Framework vs. LightSpeed

Windows Phone Resources

Windows 8 touch interactions

Bing maps data bound pushpins fade-in animation

Wednesday, June 8, 2011

Daily Links 08/06/2011

Slide-out keyboard support on Windows Phone

WP7 Mango: Know about application lifecycle

Developers: New Screenshot Tool Now Available

Seven useful tips and tools for Windows Phone 7 developers

WP7Contrib – Bing Maps REST Service Wrappers

Elevated Trust in Silverlight 4
" Apply custom chrome;
Directly access selected directories on the file system;
Use COM Interop to open up a whole range of features, including;
Running windows applications;
Integrating with Microsoft Office products;
Access to the Windows Speech API.
Relaxed user consent on Clipboard, WebCam and Microphone access
Full Screen Keyboard support
Cross Domain network calls, without the requirement for a Client Access Policy. "

Silverlight, HTML5 & Windows 8 : Where we are heading to ?

WCF Extensibility – Custom Serialization in Silverlight

wp7essentials
making the common things you have to do in every windows phone application, like persist application settings, use tasks/choosers, log/trace, threading/asynchronous development etc. testable.

The Sterling NoSQL Database in a Mango World

Monday, November 24, 2008

Daily Links 24/11/2008

Introducing TransitionContentControl
"write a very simple contentControl, that allows you to transition your old content with your new content"
Cool :)

Dynamically Loading an assembly at Runtime and calling its methods
Check out the comment as well. Handy for getting a start to a plug-in application architecture

Producing readable log4net output

Visual SVN 1.6 released
If you're looking for a free SVN IDE plugin for VS, then head on over to Ankh - muchly improved over the last year or so.

Practicing Agility in Application Architecture
"Microsoft has published a How-To Design Using Agile Architecture guide under patterns & practices providing detailed guidelines to follow when architecting an application, the Agile way."

WCF REST Starter Kit Hands On Labs
REST Services seems to be making a bit of a revival - here's some help to get started.

Setting up Subversion on Windows Home Server
Simple as 1-2-3

Friday, November 21, 2008

Daily Links - 21/11/2007

What Gives? Microsofts Code Generation Tool
T4: Free code generation tool from Microsoft

New Silverlight Application Checklist
Things to do when you first create a Silverlight application

Specifying timeout duration for WCF services

Securing your WCF Services for your Silverlight Application

How to create a Visual WebGui Silverlight application
VWG is something I've kept my eye on for a while now, and it is very interesting what they are doing to increase development productivity, as well as offer an innovative server-side "ajaxian" architecture, which address concerns such as efficient data transfer and security.

How to start with Scrum

The Decline and Fall of Agile
Why is agile getting a bad name? Read on...

Nine Things Developers Want More Than Money

Tuesday, October 28, 2008

Mocking out WCF Services in Silverlight 2.0 for Unit Testing

Brief Background:
When consuming WCF Services in Silverlight, proxy classes are generated to make using the service a lot more simple. These service proxy classes offer a simple implementation of the asynchronous service methods (synchronous service calls are not supported in silverlight).
If you're following TDD, then you want to test your client-side silverlight C# code in some sort of testing framework, and if you're writing proper unit tests, you are going to mock out the boundaries to the logic in the code (Xaml views and service references).

Problem:
Although interfaces are also generated for the service proxy classes, for some reason Microsoft left out the simple public methods in the interface definition - which 9/10 times are the only methods the developer is going to use! - go figure?!
Here is a simple service definition on the server:

image

...and here is how the svcUtil generates the proxy on the client in order to call the service methods:

Service implementation:
image

Service interface:
image

Notice that the simple "DoFooAsynch" methods have not been exposed on the interface!

Solution:
Briefly, the solution is to include the simple asynchronous helper methods in an extension of the interfaces already defined.
Do the following:

  1. Add a new class file on the Silverlight client
  2. Change the namespace to be the same as the namespace defined in the reference.cs file (where the proxy classes have be generated) - make sure to click the "Show All Files" on top of the solution explorer to find it.
  3. Define a new interface - using the example, mine would be:image  
  4. Extend the existing interface if necessary (in the example interface derives from FooBarService interface.)
  5. Include the public "[XYZ]Asynch" methods that you would like to mock into the interface as well as the return event definitions.
  6. Apply the interface to the service implementation class - luckily the class is declared as partial in the proxy, so this is quite easy: image

Now in the code, the logic to be tested should have a reference to this newly created interface, and not the actual service itself. Use either the factory pattern or dependency injection (both of which should be familiar to you if you're doing TDD) to inject the service implementation at runtime.

But what about injecting the mock during testing? Here's a pattern which I've found helpful:

image

When testing the logic code, I inject my mock service which implements the service interface into the constructor of the logic class, and in production, I let the ServiceLocator resolve the service implementation in the default constructor.

Using this methodology, you can effectively remove the service dependency in your unit tests  :) (remember to call the service implementation in your integration tests!)

Happy Testing...

Jax

Thursday, August 7, 2008

Daily Links 07/08/2008

The Request/Response Service Layer
Maintain the granularity of your WCF services, whilst allowing multiple requests in a single call - follow-up to the previous "batching WCF services" posts.

Silverlight Streaming
Host up to 10 Gig of silverlight for free!
More details here

Effects and Transitions for Silverlight

Real-Time Multilingual WPF Demo
Multi-language support using Google's AJAX translation API

Introduction to IoC/DI - The art of Decoupling

Agile Project Planning

I've been looking at LINQ lately to implement data access on the DAL. One of my requirements to to be able to specify queries at runtime. Here are some articles which I've found quite informative

Build your own electric car

Tuesday, July 15, 2008

Daily Links 15/07/2008

PostSharp
"PostSharp is an free, open-source and extensible platform for enhancement of .NET assemblies"
"provides aspect-oriented programming (AOP) to .NET Developers without the learning curve"

Silverlight, Blend and WPF Tutorials

Using a value converter to bind to Visibility in the Silverlight data grid

Pushing Data to a Silverlight Client with a WCF Duplex Service

Getting started with WPF

Differences between SharePoint Services (WSS 3.0) and Office SharePoint Server (MOSS 2007)

Can someone tell me why i shouldn’t drop WCF?
More on the previous "batching WCF calls" post.

NDepend: code metrics at your service
Good summary article on NDepend functionality
"analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code"

July '08 TFS Power Tool Preview
Now has filtered alerts for TFS work items.

Theme Controls in Silverlight

Billy Hollis on Getting Smart with WPF
Excellent presentation on how developing with WPF / Silverlight changes the way we think about UI design.

7 Steps to completing your project on time

101 Linq Examples - C#

Scale Cheaply - Memcached
Distributed cacheing solution for .NET

Monday, July 7, 2008

Daily Links 07/07/2008

How to display a dataset in a silverlight dataGrid
really handy stuff for those who were used to exposing datasets (which are not available in silverlight) to the UI.

Batching WCF calls
...what was also cool in this article was the code snippet to generically build a list of knownTypes on the base service interface

LINQ Farm: Lambdas
"Lambdas are a simple technology with an intimidating name. They sound like they are going to be difficult to understand, but in practice prove to be relatively trivial."

Ordering Code Construction Tasks
Excellent article on general strategies to follow when embarking on a new project.

Extension Methods + Attributes = A Whole New World!
The article title is a bit over-zealous, but the content is interesting non-the-less.

Getting Things Done with TodoList
Software that will maintain your tasks: everything from a simple todo list, to complicated task dependancy projection (ala M$ Project)

New to NUnit 2.5 - Generic Test Fixtures
Use the same code to test classes of a base type, or that share a common interface

Building classes at runtime using TypeBuilder
"TypeBuilder provides a set of routines that are used to define classes, add methods and fields, and create the class inside the runtime"
There are some security concerns if you're going to attempt this on a silverlight client
see here for a sample silverlight implementation

Fun with Continuous-Integration. Introducing: BILTONS
Customize the sounds that CC.NET makes when passes / fails per author.

StudioTools for Visual Studio
Some FREE plugin tools for VS, including Code Metrics, Smart Go-TO, Open File by Name, Tear-Off Editor Window, Incremental Search, and File Explorer
The same company also has a handy MSTest NUnit adapter
Microsoft Team System NUnit Adapter

Investing in a Quality Programming Chair
One of developer "must-haves"

Friday, June 27, 2008

Daily Links 27/06/2008

TDD : Introduction to Moq
The new mock framework on the block

More recommendations for the .NET Developer's toolbox

If you like playing with design tools - check this out: Design Pattern Automation Toolkit
"A toolkit to design applications using design patterns, with facility to generate code, and reverse engineering. Drag and Drop facility to create UML Class diagrams Support to write custom plug-ins for code generators and reverse engineering."

I've got a generic method that converts datasets to objects, and ran into a problem whereby the dataSet (not under my control) neglected to set the field to the correct dataType. So I now have to convert the field to the correct type using reflection. Here's the code:
property.SetValue(target, Convert.ChangeType(row[column], property.PropertyType), null);
where property is PropertyInfo retrieved from the object using type.GetProperties(), row = DataRow, and column = DataColumn

I've got a WCF Service library in one of my projects, but I was already hosting the services in a web project, so when I run the application, the usual VS Casini Server would pop up in the taskbar, but I noticed a "new" WcfSvcHost running as well. Now this is handy for when you don't have your own host up and running yet, but a bit irritating when you do. Apparently in VS SP1 you'll be able to switch it off, or you could hack the project file if you just can't wait for the SP1 release. Or you could get the SP1 Beta release in the meantime

30 electric cars companies ready to take over the road
With the ever-increasing fuel price, it's time to start some alternative shopping

Friday, June 20, 2008

Daily Links 20/06/2008

DevExpress has released Beta 1 of it's FREE Silverlight DataGrid
* Data Grouping against multiple Silverlight Grid columns
* Data Sorting against multiple Silverlight Grid columns
* Comprehensive Summary Computation support against multiple Silverlight Grid columns
* Column Movement
* Column Resizing
* Column Auto-Width
* Row Editing
* Row Preview (with animation)
* Template Support (for cell content, cell editing, row preview and headers)
* Auto Height Support for cells, headers, and totals.
* Virtual StackPanel Row Container (simply means we are able to handle an unlimited number of rows)
* Focused Row and Focused Cell
* Multi-Row Selection
* Cell Text Wrapping
* Vertical/Horizontal Lines
* Multiple column types/editors
The Source code is also available.

CLR Fun Stuff: How is my C# code converted into machine instructions?

We Don't Need No Architects
Making a case for the software architect

To JSON or not to JSON?
A comparitive performance look at Json Serialization vs standard xml serialization using WCF 3.5

ViewModel Pattern in Silverlight using Behaviors

Silverlight wallpaper
...for all the silverlight geeks out there