| |
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.
|
8 Articles match "Methods","Sample"
| Related DevelopMentor Courses | MORE | | Building Scalable and Secure WCF Services Essentially the custom binding element has a GetProperty method which returns an implementation of ISecurityCapabilities asserting that a protection level of EncryptAndSign is supported. The sample project contains the necessary binding configurations for both SOAP and REST style endpoints. The key to building scalable WCF services is to eliminate binding configurations that could result in server affinity. For this reason you should avoid bindings that establish a session with the service, such as NetTcpBinding or WsHttpBinding with secure conversation enabled. Enjoy. DevelopMentor Courses - Monday, June 18, 2012 Use Common Instance Factory to Abstract Away the Dependency Injection Container While it is possible to use the Common Service Locator without falling into this trap, the base interface, IServiceLocator, is a non-generic interface with a generic method that allows you to create an infinite number of types, making it easier for classes to use it directly. However, a cleaner alternative is the abstract factory pattern , which can be expressed as a generic interface with a method that only return instances of a single type. Another weakness of Common Service Locator is that it does not provide a ReleaseInstance method. Ah, but there’s a problem. DevelopMentor Courses - Wednesday, May 23, 2012 What’s new in ApprovalTests.Net v.20? mic said in his NDC talk … Using ApprovalTests makes what was implicit , explicit so that the item can now be tested Inspired by his talk, Jim Counts and I created a new method in AspApprovals to make the formerly implicit ASP routing explicit and now easily able to be tested. Here’s an example var urls = new [] { "/Home/Index/Hello" , "/" }; AspApprovals.VerifyRouting(MvcApplication.RegisterRoutes, urls); In the sample above, the delegate (MvcApplication.RegisterRoutes) will be invokes against a mock route collection, and then fed the URLs provided. Happy testing. DevelopMentor Courses - Thursday, August 9, 2012 |
86 Articles match "Methods","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. Here’s the download for the source, library with the concurrent data context, and the sample app: MongoDB.Kennedy.zip. 'This article demonstrates a technique and supporting library for adding optimistic concurrency control to NoSQL databases and MongoDB in particular. Quickly, what is optimistic concurrency control? This usually comes in two flavors: Pessimistic concurrency control. Optimistic concurrency control. Michael C. Kennedy's Weblog - Monday, April 8, 2013 Improve perceived performance of ASP.NET MVC websites with asynchronous partial views In the sample case, it’s kind of an iGoogle landing page with different items: TODO, news, etc. Here is the underlying controller action method. This is a perfectly reasonable action method. Check out the live demo I’ve posted here: Sample: Improve Perceived Performance with Async Partial Views. Took the original action method and change it to only load the fast content in the controller. Added an action method returning a PartialViewResult for each async section. Imagine you’re building an ASP.NET MVC website which has some performance problems. Michael C. Kennedy's Weblog - Tuesday, November 13, 2012 Understanding Text Encoding in ASP.NET MVC (ASP.NET MVC Foundations Series) On the other hand, if you’re building a CMS or utility helper method, you do not want to filter out the HTML a user might type. By default, if you have an action method taking this input, it will just error out with the following message: Error on submit: A potentially dangerous Request.Form value was detected from the client… Of course, we could disable this with a ValidateInput attribute: In this case, you must be VERY careful when you write out the commentText values later. In order to demonstrate these concepts, I created a working sample app here: [link]. Michael C. Kennedy's Weblog - Monday, October 15, 2012 | -
| The Best from DevelopMentor | MORE | - Access Control Service: Passive/Active Transition Sample
Here you can find my updated ACS2 sample. packages the token as a GenericXmlSecurityToken (to be used directly with the WIF ChannelFactory extensions methods). In addition to the existing front ends (web [WS-Federation], console [SOAP & REST], Silverlight [REST]) and error handling , it now also includes a WPF client that shows the passive/active transition with a SOAP service as illustrated here. All the ACS interaction is encapsulated in a WPF user control that: retrieves the JSON feed. displays a list of supported identity providers. retrieves the token response. Have fun! www.leastprivilege.com - Thursday, June 23, 2011 - 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. Sample applications with step-by-step instructions. AssociateProperties method to link view-model and model properties. have spent quite a bit of time fleshing out documentation for the toolkit, and the download includes several sample applications. Model and ViewModel base classes. Tony and Zuzana's World - Sunday, January 23, 2011 - Jason’s AJAX Component Library
don’t have any examples of the components it contains online so you’re going to have to download the solution and take a look at the samples on your own machine. Provides methods do bind JavaScript objects to a table element. Tracks modified check boxes in a table element and provides methods for checking, unchecking, toggling, and resetting the check boxes. [Update: This release won't build if you extracted it to a folder with spaces in the path. You might want to get Release 2 instead.]. So here is the first release of Jason’s AJAX Component Library. Jason Diamond - Monday, June 4, 2007 - Improve perceived performance of ASP.NET MVC websites with asynchronous partial views
In the sample case, it’s kind of an iGoogle landing page with different items: TODO, news, etc. Here is the underlying controller action method. This is a perfectly reasonable action method. Check out the live demo I’ve posted here: Sample: Improve Perceived Performance with Async Partial Views. Took the original action method and change it to only load the fast content in the controller. Added an action method returning a PartialViewResult for each async section. Imagine you’re building an ASP.NET MVC website which has some performance problems. Michael C. Kennedy's Weblog - Tuesday, November 13, 2012 - Easier Async for Silverlight Apps using MVVM
SynchronizationContext has a Post method that offers a higher level of abstraction, checking access and marshaling invocation at the same time. The NotifyPropertyChanged method in ViewModelBase takes care of this for you by calling an InternalNotifyPropertyChanged method that guarantees the event will always be fired on the UI thread. To shield you from those details, ViewModelBase has a set of Notify methods which support two-way communication between the view-model and view, but they call an InternalNotify method that marshals the call to the UI thread if needed. Tony and Zuzana's World - Saturday, January 29, 2011 - Understanding Text Encoding in ASP.NET MVC (ASP.NET MVC Foundations Series)
On the other hand, if you’re building a CMS or utility helper method, you do not want to filter out the HTML a user might type. By default, if you have an action method taking this input, it will just error out with the following message: Error on submit: A potentially dangerous Request.Form value was detected from the client… Of course, we could disable this with a ValidateInput attribute: In this case, you must be VERY careful when you write out the commentText values later. In order to demonstrate these concepts, I created a working sample app here: [link]. Michael C. Kennedy's Weblog - Monday, October 15, 2012 - What’s new in ApprovalTests.Net v.20?
mic said in his NDC talk … Using ApprovalTests makes what was implicit , explicit so that the item can now be tested Inspired by his talk, Jim Counts and I created a new method in AspApprovals to make the formerly implicit ASP routing explicit and now easily able to be tested. Here’s an example var urls = new [] { "/Home/Index/Hello" , "/" }; AspApprovals.VerifyRouting(MvcApplication.RegisterRoutes, urls); In the sample above, the delegate (MvcApplication.RegisterRoutes) will be invokes against a mock route collection, and then fed the URLs provided. Happy testing. DevelopMentor Courses - Thursday, August 9, 2012 %>
| | |