Coder Social home page Coder Social logo

kathleenwest / myserializationdemowcfappsharedlib Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.37 MB

This project presents a simple, but fun “Adopt a Dog” Service Application. The service provides a factory creational design pattern to create and return a single Dog object (complete with a cute photo). It is hosted using IIS Express to quickly demo and test the service with a client. The service interface is defined not in the service application but in a Shared Library. The Shared Library also defines the Dog class object with custom serialization using the ISerializable interface implemented on the Dog class. This project is intended to demo custom serialization and a shared library concept between both the service and the client. With the Shared Library concept of both the service interface definition and the Dog class, there is no need to use SVCUTIL or the Service Wizard to create a tightly coupled service reference. Instead, the client uses a simple ChannelFactory concept to build a channel to the service knowing the interface details in the Shared Library. Also, it can understand and work with the Dog objects as specified in the Shared Library. A client “tester” windows form application tests the service and provides output to the user in a simple GUI. In addition, a short discussion and code demo of debugging service errors and activity using diagnostics and a trace listener pattern is included in this article. Some of my lessons learned in debugging service errors and custom serialization may help you on your next project.

Home Page: https://portfolio.katiegirl.net/2019/09/28/wcf-adopt-a-dog-service-application-shared-library-with-custom-serialization-client-tester-windows-form-application/

C# 100.00%
adopt-a-pet dogs wcf wcf-service wcf-service-client-demo wcf-client wcf-proxy wcf-bindings wcf-proxies channelfactory

myserializationdemowcfappsharedlib's Introduction

MySerializationDemoWCFAppSharedLib

WCF “Adopt a Dog” Service Application & Shared Library with Custom Serialization & Client "Tester" Windows Form Application

Project Article here: https://portfolio.katiegirl.net/2019/09/28/wcf-adopt-a-dog-service-application-shared-library-with-custom-serialization-client-tester-windows-form-application/

About

This project presents a simple, but fun “Adopt a Dog” Service Application. The service provides a factory creational design pattern to create and return a single Dog object (complete with a cute photo). It is hosted using IIS Express to quickly demo and test the service with a client. The service interface is defined not in the service application but in a Shared Library. The Shared Library also defines the Dog class object with custom serialization using the ISerializable interface implemented on the Dog class. This project is intended to demo custom serialization and a shared library concept between both the service and the client. With the Shared Library concept of both the service interface definition and the Dog class, there is no need to use SVCUTIL or the Service Wizard to create a tightly coupled service reference. Instead, the client uses a simple ChannelFactory concept to build a channel to the service knowing the interface details in the Shared Library. Also, it can understand and work with the Dog objects as specified in the Shared Library.

A client “tester” windows form application tests the service and provides output to the user in a simple GUI.
In addition, a short discussion and code demo of debugging service errors and activity using diagnostics and a trace listener pattern is included in this article. Some of my lessons learned in debugging service errors and custom serialization may help you on your next project.

Architecture

The demo project consists of these component topics:

• Adopt A Dog WCF Service Application Project “WcfServiceApplication” o AdoptADogService (Code that Implements the Service Interface) o Web.config (Configuration for Trace Diagnostics on Service) o Reference to the Shared Class Library

• Shared Class Library Project “SharedLibrary” o IAdoptADogService (Interface for Service) o Dog class (defines a Dog object and Custom Serialization) o Photos of the Dogs o Logs for Trace Diagnostics

• Client “Tester to Service” Windows Form Application Project “AdoptADogClient” o Reference to the Shared Class Library o Main Form GUI User Interface o Form Code – Processes GUI User Interface

myserializationdemowcfappsharedlib's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.