background preloader

Design-patterns

Facebook Twitter

Linq

Mvp. Rethinking Rails 3 Controllers and Routes. John W Powell : Consume SharePoint Web Services with WCF using the Repository, Gateway, Mapper, Domain Model and Factory Design Patterns. The SharePoint developer community has produced a wealth of knowledge and code samples that demonstrate how to consume SharePoint web services and leverage them in domain-specific applications.

John W Powell : Consume SharePoint Web Services with WCF using the Repository, Gateway, Mapper, Domain Model and Factory Design Patterns

This information is often task-centric, such as "How to add an Item to a List using SharePoint Web Services. " Code Insanity: The Repository Pattern… JavaScriptMVC. Unhandled Exceptions » Blog Archive » On Choosi... In this comment to one of my posts, Ryan asks… Can you give any insight as to what life would be like, if I decided to migrate away from Guids as my IDs to Ints?

Unhandled Exceptions » Blog Archive » On Choosi...

Sure: it would look exactly the same except your entities would derive from IntIdentityPersistenceBase instead of GuidIdentityPersistenceBase Seriously though, this a great question and it goes to the heart of something that I may not have been completely clear on in the screencasts: why do I choose Guids for identity values over the probably more common Int32 data-type in the first place?

Followers of my Autumn of Agile screencast series will probably have taken note of the fact that I have chosen to use Guids as the data type for the value in my persistent objects that I am using to model my domain. Understanding Choices With NHibernate, you have great freedom to choose whatever data type you want to use to represent your identity value in your objects. Pete W's idea book: Model-View-ViewModel Patter...

Jason Dolinger on Model-View-ViewModel » Lab49 ... A while back, Jason Dolinger, a consultant here at Lab49, gave us a presentation on design in WPF with the Model-View-ViewModel pattern and the Unity dependency injection framework.

Jason Dolinger on Model-View-ViewModel » Lab49 ...

Jason started with an application that one would write in a “traditional” way, with button clicks handled by event-handlers in the code-behind that then updated other parts of the UI. Using WPF data-binding, Commands, and Unity, he transformed it, piece by piece, in a much more manageable, encapsulated, readable, and testable M-V-VM design. It was awesome. It was so awesome, in fact, that after the presentation Jason recorded the demo for all to see here. Check it out. UPDATE: I thought I should mention that while Jason’s presentation is geared towards WPF, the patterns he describes are very applicable for Silverlight as well. 1) Jason creates ViewModels that are DependencyObjects. 3) Silverlight does not support bindings for Commands out of the box.

P of EAA: Model View Controller. UI-patterns.com. Wizard - Designing Interfaces. What Lead the user through the interface step by step to do tasks in a prescribed order.

Wizard - Designing Interfaces

Use when You are designing a UI for a task that is long or complicated, and that will usually be novel for users—not something that they do often or want much fine-grained control over (such as the installation of a software package). You’re reasonably certain that the designer of the UI will know more than the user does about how best to get the task done. Tasks that seem well suited for this approach tend to be either branched or very long and tedious—they consist of a series of user-made decisions that affect downstream choices. The catch is that the user must be willing to surrender control over what happens when. But in other contexts, it backfires.

Why Divide and conquer. Chain-of-responsibility pattern. In a variation of the standard chain-of-responsibility model, some handlers may act as dispatchers, capable of sending commands out in a variety of directions, forming a tree of responsibility. In some cases, this can occur recursively, with processing objects calling higher-up processing objects with commands that attempt to solve some smaller part of the problem; in this case recursion continues until the command is processed, or the entire tree has been explored.

An XML interpreter might work in this manner. This pattern promotes the idea of loose coupling, which is considered a programming best practice. Example[edit] The following code illustrates the pattern with the example of a logging class. Quince: UX Patterns Explorer / Home. TDD + DI + ASP.NET MVC Made Better with Structu... Pablo's Topic of the Month - March: SOLID Princ... Over the next few days and weeks, the Los Techies crew will be writing a number of blog posts focused a particular subject in addition to their regular blogging.

Pablo's Topic of the Month - March: SOLID Princ...

Pablo’s Topic of the Month for the month of March is Bob Martin’s S.O.L.I.D. design principles. We’ll try to cover all of them by the end of the month or we might focus in on a few of them and go really deep. Please stay tuned and please give us some feedback of how you like this format because we’re considering doing it in upcoming months. If you haven’t already, please consider subscribing to the Los Techies Main Feed so that you can see the various post from the other Los Techies bloggers. The main feed is here: S.O.L.I.D. is a collection of best-practice object-oriented design principles that you can apply to your design to accomplish various desirable goals like loose-coupling, higher maintainability, intuitive location of interesting code, etc. ArticleS.UncleBob.PrinciplesOfOod. Base Cached Repository « Lucas Stark.