CSLA .NET

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

ProjectTracker: What purpose fulfills the ProjectResourceEditCreator class?

rated by 0 users
Answered (Verified) This post has 1 verified answer | 3 Replies | 2 Followers

Top 500 Contributor
23 Posts
Alexander Becker posted on Fri, Apr 20 2012 8:23 AM

Hello,

I am investigating a little bit within the project tracker sample application.
Can someone explain to me for what the separate class ProjectResourceEditCreator is for?

Sure, I see it creates ProjectResourceEdit instances and fetches them from the database.
But why is this separate implemented and not by factory methods within ProjectResourceEdit?

Thanks for clarification,
Alexander

btw: is there any overview documentation about the PT sample?

Answered (Verified) Verified Answer

Top 10 Contributor
1,770 Posts
Answered (Verified) JonnyBee replied on Fri, Apr 20 2012 10:14 AM
Verified by Alexander Becker

It is described in the Using CSLA 4 ASP.NET MVC book (and with figures too):

"The ProjectResourceEditCreator exists to support asynchronous smart client applications
and stateless web server applications. This type isn’t used by synchronous smart client
applications
"

Jonny Bekkum, Norway CslaContrib Coordinator

All Replies

Top 10 Contributor
1,770 Posts
Answered (Verified) JonnyBee replied on Fri, Apr 20 2012 10:14 AM
Verified by Alexander Becker

It is described in the Using CSLA 4 ASP.NET MVC book (and with figures too):

"The ProjectResourceEditCreator exists to support asynchronous smart client applications
and stateless web server applications. This type isn’t used by synchronous smart client
applications
"

Jonny Bekkum, Norway CslaContrib Coordinator

Top 500 Contributor
23 Posts

Good to know, thank you!
I never looked inside the UI books so far.... Embarrassed

Not Ranked
1 Posts

I'd actually like to raise this issue again.

I'm looking at the current (4.3.12) version of the ProjectTracker project from a WPF-over-3-tiers perspective.  I also have the eBooks for CSLA 4.

The UsingCsla4-05-WPF-SL.pdf book (Rev 0.4 (draft)) states the following:

The ProjectResourceEditCreator type is not used by the smart client applications covered in this ebook. For a full discussion of this type, please refer to the Using CSLA 4: ASP.NET MVC ebook.

However, when I run the WPF client in debug and add a resource to a project the following method is being called:

class ProjectResourceEditCreator

public static void GetProjectResourceEditCreator(int resourceId, EventHandler<DataPortalResult<ProjectResourceEditCreator>> callback)

    {

      DataPortal.BeginFetch<ProjectResourceEditCreator>(resourceId, callback);

    }

I'm about to develop a WPF application making asynchronous calls over WCF to a middle tier, and I'm puzzled as to what is the advised pattern.

Thanks

Mark

Page 1 of 1 (4 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