CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • CSLA WCF Callbacks and Notifications

    rated by 0 users
    Not Answered This post has 0 verified answers | 6 Replies | 2 Followers

    Not Ranked
    11 Posts
    Hurty posted on Thu, Jan 12 2012 10:02 AM

    I've ran into some problems...

    So far I have created about 20 BOs that must call Save() method in a transaction.

    This must be implemented through the build-in CSLA's WCF support.

    So I brought up WCF service, created CommandBase object and wrapped all the BOs in a transaction.

    The DataPortal_Execute() works just fine, but I was wondering if there is any mechanism that I can notify the Client-Side application of the CommandBase object's save progress???

    The scenario is as follows:

    1. From the Client-Side I call CommandBase.Execute();

    2. I wait untill all 20 BOs call and return from their Save(); method (executed on Server-Side)

    3. Move on...

     

    The goal is:

    1. After each successful Save() method of BO (on Server-Side) the Server to report (through a Callback or any other Server-to-Client-Notification methid) to the Client its progress through the transaction within the CommandBase object.

     

    Does anyone have any idea... ??? Any help would be very appreciated..

     

    Thanks in advance... George.

    All Replies

    Top 10 Contributor
    2,279 Posts
    JonnyBee replied on Sat, Jan 14 2012 12:27 PM

    Hi,

    CSLA does not provide support for callback from the server so you are on your own in implementing a wsDualHttpBinding.

    Jonny Bekkum, Norway CslaContrib Coordinator

    Not Ranked
    11 Posts
    Hurty replied on Sat, Jan 14 2012 1:31 PM

    Ok. But if I implement (say IWcfPortal interface) will I lose CSLA build-in functionality ???

    Any Idea how this implementation would be made ?

    I am totally lost.. :(

    Top 10 Contributor
    9,475 Posts

    The data portal serializes the data to send it to/from the server.

    The .NET data portal does this by allowing WCF to do the serialization.

    The Silverlight data portal does its own serialization.

    It might be the case that the .NET data portal (so a .NET client like WPF) could pass a reference to a callback object to the server through the ClientContext dictionary. So if you were using something like wsDualHttpBinding maybe you could do callbacks to that object.

    I really don't know how that all works (the dual bindings), having not spent any time with them. But you could certainly try it and see if it works.

    Rocky

    Not Ranked
    11 Posts
    Hurty replied on Mon, Jan 16 2012 1:45 AM

    Thank you all for your fast response...

    Will try the proposed idea and will write back if it succeeded.

    Stay tuned... :)

    Geroge

    Top 50 Contributor
    193 Posts
    JonM replied on Mon, Jan 16 2012 8:10 AM

    I just did a project where I needed callbacks.  It was not a CSLA.net project.  I ran across a great article that describes how to get dual binding done along with common issues.  I strongly suggest reading through it.  It saved me a lot of time and trouble.

    http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,b891610a-6b78-4b54-b9a6-4ec81c82b7c0.aspx

     

    Not Ranked
    11 Posts
    Hurty replied on Tue, Jan 17 2012 7:31 AM

    Thank you JonM... will read this article and will give it a try...

    Cheers, George

    Page 1 of 1 (7 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems