| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
12 Articles match "Class","Sample"
| Related DevelopMentor Courses | MORE | | Understanding Map - Reduce The Orders data structure looks like this: 1: public class Order. 11: 12: public class OrderLine. We store that in the following structure: 1: public class ReducedTo. Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? There is one catch with the Reduce though. simple example. The Problem Solver - Monday, December 3, 2012 Building Scalable and Secure WCF Services public class NonSslAuthHttpTransportBindingElement : HttpTransportBindingElement { public override BindingElement Clone() { return new NonSslAuthHttpTransportBindingElement { AuthenticationScheme = AuthenticationScheme, ManualAddressing = ManualAddressing }; } public override T GetProperty<T>( BindingContext context) { if ( typeof (T) == typeof ( ISecurityCapabilities )) { return (T)( object ) new NonSslAuthSecurityCapabilities (); } return base.GetProperty<T>(context); } }. This means the load can be more efficiently distributed across multiple servers. Enjoy. DevelopMentor Courses - Monday, June 18, 2012 Use Common Instance Factory to Abstract Away the Dependency Injection Container There are various ways to implement dependency injection, but the most common is a technique called “constructor injection,” in which a class provides a constructor that accepts one or more interfaces as parameters. public class GreetingService : IGreetingService { private readonly IGreetingRepository _greetingRepository; public GreetingService( IGreetingRepository greetingRepository) { _greetingRepository = greetingRepository; } public string Greet( string name) { string greeting = _greetingRepository.GetGreeting(); return string.Format( " {0} {1} " , greeting, name); } }. DevelopMentor Courses - Wednesday, May 23, 2012 |
102 Articles match "Class","Sample"
| The Latest from DevelopMentor | MORE | | Optimistic concurrency in MongoDB using.NET and C# At the end of this article is a simple C# class (data context) which has save and delete methods which internally are safe via optimistic concurrency control. The only thing you need to do to use this library in your apps is to implement this interface on all top-level MongoDB entities and use a class derived from ConcurrentDataContext (in library below) for your data access. Here’s the download for the source, library with the concurrent data context, and the sample app: MongoDB.Kennedy.zip. Quickly, what is optimistic concurrency control? Edit in memory. Nice huh? Michael C. Kennedy's Weblog - Monday, April 8, 2013 Understanding Map - Reduce The Orders data structure looks like this: 1: public class Order. 11: 12: public class OrderLine. We store that in the following structure: 1: public class ReducedTo. Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? There is one catch with the Reduce though. simple example. The Problem Solver - Monday, December 3, 2012 Understanding Map - Reduce The Orders data structure looks like this: 1: public class Order. 11: 12: public class OrderLine. We store that in the following structure: 1: public class ReducedTo. Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? There is one catch with the Reduce though. simple example. The Problem Solver - Monday, December 3, 2012 | -
| The Best from DevelopMentor | MORE | - Simple MVVM Toolkit Improvements: Documentation, Features, Sample Apps
I’ve released a new version of my Simple MVVM Toolkit for Silverlight that has improved documentation, a bunch of new features and additional sample applications. And many of those other toolkits are woefully lacking in the way of documentation and code samples. The initial version of my toolkit includes the following features: Helper classes , Visual Studio templates , code snippets. Sample applications with step-by-step instructions. Model and ViewModel base classes. Strongly typed data binding with lambda expressions. View-model locator service. Tony and Zuzana's World - Sunday, January 23, 2011 - Using Model – View – ViewModel with Silverlight
Even thought the UI technology used doesn't change the basic MVVM pattern there are some subtle differences, like not easily being able to use ICommand in Silverlight, so I decided to create a small Silverlight sample. The ViewModel is just another class. know it is a bit of a lame business rule but it is just a sample. 5: public class Customer : INotifyPropertyChanged. 6: public partial class CustomerView : UserControl. The ViewModel class is the one that glues the View and the Model together, hence its name. The View is data bound to a ViewModel. The Problem Solver - Tuesday, April 7, 2009 - Understanding Map - Reduce
The Orders data structure looks like this: 1: public class Order. 11: 12: public class OrderLine. We store that in the following structure: 1: public class ReducedTo. Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? There is one catch with the Reduce though. simple example. The Problem Solver - Monday, December 3, 2012 - WF4&WCF and message correlation
The input for both Receive activities will still be the same person class from the previous example and we will use the persons ID to route the messages. Namespaces = new XmlNamespaceManager( new NameTable()), Expression = "//sample:Person/sample:Id" }; xpath.Namespaces.AddNamespace( "sample" , "urn:WF4Sample:person" ); var messageQuerySet = new MessageQuerySet(). {. In the previous blog posts, here , here and here , I demonstrated how to use WCF from WF4. Fortunately the WF4 story is much better. Much better! interface MyService. {. Enjoy! The Problem Solver - Wednesday, September 2, 2009 - Peeling Back the Onion Architecture
The data access layer is represented in the outer layer as a set of repository classes which implement the repository interfaces. project has a ProductService class that implements IProductService in Services.Interfaces. For example, the ProductController class in the ASP.NET MVC application has a constructor that accepts an IProductService, which has methods to get categories and products. Installing the Ninject.MVC3 package places a bootstrapper class in the App_Start folder. To use it you’ll need to download our good old friend, the Northwind sample database. Tony and Zuzana's World - Saturday, October 8, 2011 - WPF MVVM Helper Library (WPF + MVVM = testability)
When teaching WPF, I always introduce students to MVVM as part of the Essential WPF class, it's an incredibly useful pattern that really separates the UI from the code behind behavior. bit of history -- the library is really just a place where I dump all kinds of useful utility classes, helpers, wrappers, etc. It's evolution owes a lot to various blog posts, WPF Disciples, and other WPF leaders; I certainly didn't invent anything radically new but borrowed heavily from all kinds of places as I built various classes I needed for my own work. that I tend to use a lot. file -. - ASP.NET WebAPI Security 4: Examples for various Authentication Scenarios
The Thinktecture.IdentityModel.Http repository includes a number of samples for the various authentication scenarios. My library contains a class that can create the Basic Authentication header value. The OAuth2Client class is part of my library. Stay tuned for more client samples! All the clients follow a basic pattern: Acquire client credential (a single token, multiple tokens, username/password). Call Service. The service simply enumerates the claims it finds on the request and returns them to the client. Basic Authentication. Result; }. AccessToken; }. Result; }. www.leastprivilege.com - Wednesday, March 14, 2012 %>
| | |