I'm sure BXF is a good framework (I've been playing around with it); however, I'm new to Silverlight and I don't want BXF taking care of a great deal of things in the background because I need to know what is happening longhand before I start using shorthad notation for these things. That is the downfall of a framework, education wise, in that the moment a framework is inadequate one will have to understand the real nitty-gritty any ways.
So I'd like to see an example that uses CSLA in Silverlight with WCF without BXF. In particular, the way that objects are handled on the service end of things. Once I understand that plumbing I'd be happy to move onto a MVVM frankework, but not until I've got a better idea of what life is like without one.
Does such a thing exist?
I may be misunderstanding your question, but BXF does very little, and it does nothing when talking about "the service end of things". BXF is strictly a basic presentation framework - it doesn't even have any references to CSLA. All it's concerned about is showing views in a shell, with status information somewhere.
Perhaps what you may be talking about are the ViewModel classes that are implemented in CSLA; those provide some hooks into a MVVM-style programming model for CSLA objects. But even those don't do a whole lot - they just provide some bindable properties to CSLA actions/properties.
Perhaps if you could narrow the question, we might be able to provide something. A lot of the "service end of things" is hidden in the DP, even for Silverlight...
Well, I'm able to set up a basic WCF service and publish it. I can then consume the service from Silverlight and retrieve simple values from the service. I can even do this with simple objects; however, when I set up a service reference in Silverlight the environment automatically creates a client side version of my object. (Let's use an Employee object for example. I end up with a ServiceReference1.Employee file).
Obviously, that isn't going to work since I need to have a Server version of an object and a Client version of an object (CSLA Business Object) so that I can use the slick rule system.
So I'd like to see how to set up a simple service that works with CSLA objects without BXF and without the CSLA.XAML viewmodel. So that I've an example of a CSLA object working as a CSLA object (Silverlight version) on the client and using the dataportal to serialize the object back to the server where the CSLA object (Windows version) may persist to a database. It would need to return the persisted object as well, I'd imagine.
That is probably one of my main barriers to learning this stuff. So much gets automatically created in the background (and the examples assume all of that) that actually finding out how stuff works can be difficult. There is NO WAY in hell I'm going to mess around with the Entity Framework - I'm sure it's slick but if one more magic button gets added to my code I'll just switch to Access and call it a day.
You may want to read the Using CSLA 4 ebook series. I walk through data access and the data portal in some detail - including Silverlight.
Books 1-4 provide all that basic background. Book 5 (in progress) does use Bxf, because you need something to provide structure to the Presentation Layer of a XAML application (or fall back to code-behind like Windows Forms, but I'm not going there...).
Although this is a little dated now, it is mostly correct:
And it does use code-behind - no UI framework at all - so it is purely focused on the CSLA aspects.
I wouldn't build an app following the UI concepts in that blog post series - but it may be helpful in getting you started with the data portal anyway.
Thank you guys.
I fully intend to use either BXF, MVVM Light, or a UI MVVM framework of my own creation. However, before I jump into using a framework it really, really helps me to understand some of the issues that the framework fixes. For example, creating a Command object the manual way really helped me appreciate what Josh Smith's relay command class brings to the table.
I've now successfully built a Silverlight project that has Library.Client and Library.Server projects where the Silverlight client uses the client library and the web service uses the server library - serializing the object from one version of it to the other and saving the object and returning it back to the client. (Way cool stuff, BTW).
So your posts do a nice job of getting to the root of my question - how to do all that with CSLA business objects the DataPortal way. Once I can handle the Dataportal approach successfully using code behind I'll then make the transition to BXF. I think that people who've mastered these things forget just how much learning is involved in all of this - Silverlight, XAML, WCF, BXF, CSLA, etc.
Fortunately, I've a really, really simple project that I get to do all of this with some I'm using it as my first Silverlight project/learning project.
I actually ended up reading all 4 blog posts. I managed to get all of this working today (on my test machine and published to a live server) so I get to go home this week after having some success. I look forward to putting it all together with an MVVM framework - that will be next week's challenge. It's going to be nice to have a nice modern interface that is responsive and slick.
Copyright (c) Marimer LLC