CSLA .NET

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

Keep object on Server side only

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 2 Replies | 1 Follower

Top 150 Contributor
50 Posts
Pavel posted on Wed, Feb 22 2012 9:32 AM

Hi,

The question is how to keep object on Server side without returning it to a client.

I can see that all factory method and DataPortal_XYZ intended to return result to client.

Is there any way to create object to use it during application life without even attempt to return it to client.

I have 3-tier application and both libraries on client and server the same(WinForms).

Thanks,

All Replies

Top 10 Contributor
1,770 Posts
Answered (Not Verified) JonnyBee replied on Wed, Feb 22 2012 11:46 AM
Suggested by JonnyBee

You can have an object that live in a

  • static class (in your own assembly)
  • memory cache (System.Runtime.Caching.MemoryCache)
  • distributed cache (AppFabric)

CSLA does not  provide utilities or helper classes for "server side only" objects but not a tricky part to implement or use.

 

 

Jonny Bekkum, Norway CslaContrib Coordinator

Top 10 Contributor
9,270 Posts

Keep in mind that you can make data portal calls on the server and they will work fine. The real question is hiding behind Jonny's answer- what server code do you have that will call the data portal, and how will you keep the resulting object in memory on the server?

 

In general, today's server technologies are designed to be stateless and you wil have to devise a way to maintain state in a world not designed to help you.

Rocky

Page 1 of 1 (3 items) | RSS

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