Welcome to Microsoft .NET Framework 3.0 Community (NetFx3)

The .NET Framework is Microsoft's managed code programming model for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes.

Learn More...

WCF Community Bloggers

Browse by Tags

All Tags » Silverlight   (RSS)

  • Silverlight data portal, async calls and 404 errors

    The next release of CSLA .NET for Silverlight will return to using the async WcfProxy in the data portal instead of the SynchronizedWcfProxy that restricts the data portal to allow only one concurrent call at a time. The WcfProxy allows parallel calls from the client to the server through the data portal. The change is already in svn for those that are using live code. The reason we created SynchronizedWcfProxy originally was due to a bug in Silverlight 2.0 Beta 2, where in some cases you'd get a 404 error with overlapping WCF calls to the same server. This was wreaking havoc with our unit tests, which have a lot of parallel WCF calls. It appears that the issue is resolved in Silverlight RC0, which is great news. However, we didn't know right away, because we were still getting sporadic 404 errors. With some research, and help from Eugene Osovetsky and his colleagues at Microsoft, we figured out the remaining issue. Part of the problem is described by Eugene's post on dealing with faults and exceptions in Silverlight . This was masking the underlying issue we faced. The underlying issue is that we were testing using the ASP.NET Development Web server (often called Cassini). Cassini has some well-known limitations, among them that it doesn't work well when a custom .NET principal is used in your web server code. This particular issue appears as a SerializationException as Cassini attempts to transfer the principal from one thread to another. This issue doesn't occur with IIS, because Read More...
  • Overview of CSLA .NET 3.6 for Windows and Silverlight

    CSLA .NET version 3.6 is a framework for creating business applications using object-oriented design concepts, in a distributed computing environment. CSLA .NET for Windows and CSLA .NET for Silverlight share many common features and capabilities, though they support different platforms. The commonality between the two framework implementations allows sharing of business object code between .NET and Silverlight, while the differences allow you to exploit the power of the two different platforms. CSLA .NET version 3.6 is the latest evolution in the CSLA .NET framework, which has been around since 2001. Over the past eight years the framework has grown and changed in many ways, and is now one of the most widely used open source development frameworks for the .NET platform.It is covered under a very liberal license and has a vibrant, helpful and friendly community . The primary goal of CSLA .NET is to enable you to build a rich, powerful and flexible business layer for your application. This business layer is composed of business domain objects that encapsulate your business logic (calculations, algorithmic processing, validation and authorization). These objects should be designed based on the business use cases for your application domain. With some reasonable care, it is possible to create a single set of business objects that work within both the .NET and Silverlight environments. In some cases your Silverlight business objects may contain the exact same object code used for Read More...
  • CSLA .NET 3.6 for Windows and for Silverlight Beta 1 released

    Version 3.6 Beta 1 of CSLA .NET for Windows and CSLA .NET for Silverlight is now available. The new Silverlight version requires Silverlight 2.0 RC0. Our focus in the last couple pre-releases has been stability, and this is true for Beta 1 as well. There are no new features in this release, just some fixes for reported issues, and of course making sure the code works with Silverlight RC0. Please report any issues you find on the forums at http://forums.lhotka.net , thank you! Read More...
  • CSLA .NET 3.6 (Silverlight and Windows) pre-release (080919)

    I have put a new pre-release of CSLA .NET for Windows and CSLA .NET for Silverlight (both version 3.6) online for download: CSLA .NET for Windows CSLA .NET for Silverlight This is a pretty major update to the last pre-release, and I believe we're very near feature complete and are pretty stable at this point. I think the next release will be Beta 1 if we hold to the current plan. Read the change logs to see what's new, and check out the list later in the post for highlights. Check out the samples download for Silverlight, and also many of the subfolders in the Silveright test download. Combined, they provide a wealth of examples on how to use the many data portal configurations, the really cool UI components and the flexible authentication options. Also, the ProjectTracker code for .NET is nearly final. I have about 1.5 chapters left on the 2008 book (first draft), which means only the WCF service interface is likely to change much at this point. The WPF and Web Forms interfaces got a lot of focus due to chapters covering them. Sadly Windows Forms has no chapter, and so it is lagging a bit (and it could use some help, because there are cool new WinForms controls too!!). For CSLA .NET for Windows users, here's a quick overview of what 3.6 adds to 3.5.1: ObjectContextManager to manage Entity Framework contexts TransactionManager to manage ADO.NET transaction objects PropertyStatus control for WPF to provide visual cues for validation and authorization on bound properties ObjectStatus Read More...
  • UnitDriven visual enhancement

    As part of the CSLA Light project we created a unit testing engine for Silverlight and donated it to the community as UnitDriven . We now have our first community contribution to this open-source project, in the form of a really nice visual change. Here's the author's blog post on the topic: http://staxmanade.blogspot.com/2008/08/unitdrivens-ui-gets-minor-makeover.html Thank you Staxmanade! This is a really nice visual upgrade, and more importantly a major usability upgrade. I love it! The next release of the CSLA Light unit tests will be linked to the new version of UnitDriven, and having used it for just a day or so, I can say it is a big help. Read More...
  • CSLA Light and CSLA .NET 3.6 Labor Day pre-release

    I have put an updated pre-release online for download of both CSLA .NET 3.6 and CSLA Light 3.6. CSLA .NET CSLA Light We're now at the point of focusing primarily on stabilization and limiting new features. Changes at this point will be due to our testing and usage, and feedback we recieve from the community. This pre-release should be reasonably stable, on both the .NET and Silverlight platforms. Please give them a try and post in the forum with any issues you encounter. Thank you! Read More...
  • CSLA Light data provider

    WPF has this cool concept called a data provider control. CSLA .NET includes a custom data provider control that enables nearly codeless forms (if you don't count XAML as code), by supporting the following functions purely through XAML: Create/Fetch an object Save an object Cancel changes to an object Add a new item to a list (if the object is a collection) Remove an item from a list (if the object is a collection) Silverlight doesn't have a data provider concept, nor does it have commanding . Which means that you need to write code behind the form for all of those actions. So in CSLA Light we're investigating the possibility of some sort of data provider control to fill in this gap. The idea is that you'd be able to declare a CslaDataProvider as a resource on your form and use it as a data source, and as a handler for the save/cancel/add/remove operations. This also means we need a way, through XAML, to route things like a button's Click event to methods on CslaDataProvider (because there's no commanding in Silverlight). At a prototype level what we've got is something like this. The CslaDataProvider goes in the Resources section just like it would in WPF: <UserControl.Resources> <csla:CslaDataProvider x:Key="MyData" ManageObjectLifetime="True" /> </UserControl.Resources> Some WPF concepts don't make sense. For example, IsAsynchronous is useless because in Silverlight it will be asynchronous . Others, like IsInitialLoadEnabled might make sense, we're not entirely Read More...
  • Using CSLA Light Part 3

    In Part 1 of this series I discussed the overall architecture and structure of a CSLA Light application. In Part 2 I walked through the creation of a simple editable root business object that supports both the 3-tier and 4-tier mobile object models. In this post I want to cover the Silverlight UI. Following the theme of this walkthrough, the UI will be very simple so I can illustrate the basic requirements and concepts. At this point in time we're working on UI support for authorization, and I'll discuss it when we have something to show. UI XAML The XAML for the UI is not complex, but does have some interesting differences from typical WPF XAML: <UserControl x:Class="SimpleApp.Page" xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x= http://schemas.microsoft.com/winfx/2006/xaml xmlns:csla="clr-namespace:Csla.Wpf;assembly=Csla" Width="800" Height="600" Loaded="UserControl_Loaded"> <Grid x:Name="LayoutRoot" Background="Beige"> <StackPanel Margin="5,5,5,5"> <StackPanel Orientation="Horizontal" Margin="5,5,5,5"> <TextBlock Width="100" Text="Id" /> <TextBox Width="150" Text="{Binding Id, Mode=TwoWay}" /> <csla:PropertyStatus Property="Name" Source="{Binding}" /> </StackPanel> <StackPanel Orientation="Horizontal" Margin="5,5,5,5"> <TextBlock Width="100" Text="Name" /> <TextBox Width="150" Text="{Binding Name, Mode=TwoWay}" /> </StackPanel> <StackPanel Orientation="Horizontal" Margin="5,5,5,5"> Read More...
  • CSLA Light Prerelease 2 available

    I've put another prerelease of CSLA Light (CSLA for Silverlight) and CSLA .NET 3.6 online at www.lhotka.net/cslalight/download.aspx . Check out the new identity base classes in Csla.Security and Csla.Silverlight.Security - they are pretty darn cool! Check out the new Validator UI control - I think that is really cool!! It won't keep that name, because we're merging the Authorizer functionality directly into that control, so the result will be a consolidated control that does both things - we don't have a name for it yet... I'm pretty sure the ClientContext and GlobalContext work right, but the unit tests don't show that - so I'd recommend viewing that functionality with suspicion. I know some of the security tests don't work. Authentication is still evolving and some of the test apps are lagging a bit behind. Please remember, these are very early preview builds. They are not stable. They are not complete. They may or may not work for you. They are not supported. We have found, in testing, that Silverlight Beta 2 is not entirely stable. And that WCF in Silverlight is particularly unstable . If you run the unit tests in Silverlight you'll probably find what we find - that they randomly fail sometimes. They'll run. They'll fail. Then they'll run again. With no discernable pattern. Quite frustrating, but I guess this is the nature of working on a beta platform. I have also put the sample app I've been blogging about at http://www.lhotka.net/files/cslalight/SimpleCslaLightAppvb-080803.zip Read More...
  • New and Notable 260

    I have been real busy, among other things, doing a full review and change cycle on my Asynchronous Messaging and Event-Driven Architecture talk that I am doing tonight . The entire deck has changed. There has been even more strides towards full asynchronous messaging. To that end, I have worked with the CSD folks to truly understand the behavior of the One Way messaging and its implications on blocking/asynchronous behavior. I will present those findings tonight. Silverlight My friend Ambrose , and crew is working on Silverlight 2 Programmer's Reference   and it seems Wrox has started a similar program to Manning called  Wrox First The excellent Concepts To Become a Silverlight Master series that I referenced before now has added a Part 3 - Blend and a Part 4 - Security . Great stuff. Silverlight Cream for July 30, 2008 -- #338 and Silverlight Cream for July 30, 2008 - 2 -- #339   WCF/BizTalk WCF - Issue with Secure Conversation in Web Farms Chris Romp has compiled an excellent Self Study list for BizTalk For those expert BizTalk developers, QuickLearn has unveiled a BizTalk expert series training For those not yet expert, like myself, a reminder on the Pluralsight course next week in NYC with Jon Flanders that I am taking Technorati Tags: Silverlight , BizTalk , WCF , New and Notable Read More...
  • Using CSLA Light Part 2

    In Part 1 I discussed the high level architectural options offered by CSLA Light. In Part 2 I'll start walking through the implementation of the 3-tier mobile object model (which pretty much also covers the 4-tier mobile object model as well). I'll start with the center of the application: the business layer. As I discussed in Part 1 , the business layer spans Silverlight and .NET and defines mobile objects that are capable of moving between the Silverlight client and the .NET web/app server. (CSLA Light supports both C# and VB - and probably most other languages too - so the fact that this particular demo is in VB shouldn't be taken as an indication that anything only works with VB. Rather, I consciously switch between VB and C# for each demo I write, and it is VB's turn.) This is intended to be as simple a demo as I can create, and still show something useful. To that end, the demo has exactly one object, with three properties. Library.Client Setup The Library.Client project is a Silverlight Class Library. This means it compiles for the Silverlight runtime and can only contain code that will run on the Silverlight client. It is important to realize that when objects serialize and deserialize, they must have the exact same type name . This includes the assembly name, namespace and type name. The standard .NET way to represent an assembly qualified type name is something like: "MyNamespace.MyType, MyAssembly" Since the business objects in Library.Client must be compatible with Read More...
  • Using CSLA Light, Part 1

    In preparation for the next public release of CSLA Light (CSLA .NET for Silverlight), I'm going to do a series of posts describing the basic process of creating a CSLA Light application. This first post will provide a high-level overview of the project structure and some concepts. First, it is important to realize that CSLA Light will support three primary physical architectures: a 3-tier (or SOA) model, a 3-tier mobile objects model and a 4-tier mobile objects model. At all times CSLA Light follows the same n-layer logical architecture of CSLA .NET, where the application has the following layers: Presentation/UI Business Data Access Data Storage The primary goal of CSLA Light and CSLA .NET is to support the creation of the Business layer in such a way that the interface points to the Presentation/UI layer and to the Data Access layer are clearly defined. To a small degree, CSLA Light will assist in the creation of the Presentation/UI layer by providing some custom Silverlight controls that solve common issues and reduce UI code. Like CSLA .NET, CSLA Light is not an ORM and does not really care how you talk to your database. It simply defines a set of CRUD operators - locations where you should invoke your Data Access layer to retrieve and update data. 3-Tier or SOA Model If you use CSLA Light in a 3-tier (or SOA) model, your physical tiers are: Silverlight Service Database You can treat these as tiers, or as separate applications where you use SOA concepts for communication between Read More...
  • New and Notable 259

    WF/CSD WF can be a tricky thing. As Cliff blogs , the CSD folks have added two great prescriptive guidance articles for WF to the MSDN Online Library : an article by Jon Flanders to help choose between sequential workflows and state machines, and a major article by Michele Leroux Bustamante explaining the five most common WF deployment scenarios. Read Cliff's blog for more details and the links. Silverlight New Silverlight 2.0 series on Concepts to Become a Silverlight Master - Part 1 .NET/C# and Part 2 WCF Jesse covers In-State Animation In A Nutshell Silverlight Cream for July 26, 2008 -- #335 Technorati Tags: WF , Windows Workflow , CSD , Silverlight , WCF Read More...
  • Serious challenge for unit testing in Silverlight

    If you've tried to do any unit testing in Silverlight, you may have run into an interesting issue. Many times, unit tests expect exceptions. Tests are written to ensure that an exception occurs as expected. That's a standard concept in most unit testing frameworks for .NET. In Silverlight, there's an "expected CLR behavior" where the debugger will break on exceptions that are actually handled by user code - treating them like they aren't handled . See this thread for some more detail: http://silverlight.net/forums/p/20678/72377.aspx#72377 The result of this, is that you have to employ some ugly workarounds, or you need to press F5 for each of your tests where you expect an exception. We're running into this issue in a big way with CSLA Light (CSLA .NET for Silverlight), because we're creating lots and lots of unit tests, and a fair number of them are testing to make sure exceptions occur when we expect them. Of course our unit testing framework ( UnitDriven ) uses reflection to run each test method - just like MSTest or nunit - and so even though we are handling the exception in user code the debugger insists on breaking in the test methods themselves where the exceptions occur. Again, there are workarounds. They prevent you from using the debugger to walk through your tests - but at least they exist. The whole thing is really sad though - given that this is apparently intended behavior . Read More...
  • CSLA Light preview release

    I have put a very early preview release of CSLA Light and CSLA .NET 3.6 online at www.lhotka.net/cslalight/download.aspx . There is no sample app at this point, so you'll have to look at the unit tests in cslalighttest and cslatest to figure out how to use the various features. Obviously this is very early code, but it is healthy to release early and often, so here we go :) One side-effect of our work with CSLA Light is that we discovered that testing asynchronous methods is really hard with nunit and MSTest, and impossible with the Silverlight unit test framework provided by Microsoft. And yet in Silverlight, async methods are commonly required, and for parity a number of async features are now also in CSLA .NET. And we need to have unit tests for them. To address this issue, we ended up creating our own Silverlight unit testing framework, and an add-on framework for nunit or MSTest. This allows us to write a common set of test code that runs in both Silverlight and .NET so we can test both, and establish that we have parity between them. Earier today, Justin split this testing framework out of CSLA and we put it up on CodePlex, calling it UnitDriven . The CSLA Light project and Magenic are donating the code to the community as an open-source project, because it can be used to build async unit tests for any app, not just for CSLA Light. Read More...
More Posts Next page »

Copyright © 2007 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us