CODE Magazine / Articles

Design Patterns

Articles filed under Design Patterns

Articles

Showing 1–45 of 45

  1. CODE Focus Magazine: 2020 - Vol. 17 - Issue 1 - .NET 5.0 cover

    Project Tye: Creating Microservices in a .NET Way

    Learn to use Project Tye, an experimental developer's tool that makes the experience of creating, testing and deploying microservices easier in .NET. Note that Tye's deployment target is only to Kubernetes.

  2. CODE Magazine: 2020 - September/October cover

    Use the MVVM Design Pattern in MVC Core: Part 3

    Paul shows you how to use the MVVM design pattern in MVC Core to build a product detail page for adding and editing data, and validating product data and display validation.

  3. CODE Magazine: 2020 - May/June cover

    Use the MVVM Design Pattern in MVC Core: Part 1

    Learn to use the Model-View-View-Model (MVVM) design pattern, long used in WPF applications, in MVC Core applications. Using MVVM in MVC makes your applications even more reusable, testable, and maintainable.

  4. CODE Magazine: 2020 - March/April cover

    Introduction to GraphQL for .NET Developers: Mutation

    Peter uses the Hot Chocolate Library to teach you about GraphQL. Learn how to use the Entity Framework to access and store data and explore mutations using GraphQL.

  5. CODE Magazine: 2019 - September/October cover

    A Design Pattern for Building WPF Business Applications: Part 3

    In the third installment of his WPF series, Paul shows you how to get feedback using an Entity Framework entity class. He also shows you how to start expanding user activities, like adding, editing, or deleting screens.

  6. CODE Magazine: 2019 - September/October cover

    Design Patterns for Distributed Systems

    In "Design Patterns for Distributed Systems," Stefano Tempesta explores the transformative impact of containers and container orchestrators on the development of distributed systems, emphasizing the shift from bespoke architectures to reusable patterns for scalable and reliable microservices. Highlighting the advantages of microservice architecture, Tempesta demonstrates how formal APIs enable decoupling, agility, and independent scalability of components. The article delves into Kubernetes and Azure Kubernetes Service (AKS) as foundational tools for managing containerized applications, presenting design patterns such as replicated load-balanced services, sharded services, and scatter-gather processing to address modern demands for high availability, efficient scalability, and rapid response times in distributed systems.

  7. CODE Magazine: 2018 - January/February cover

    Understanding Microservices and Microservice Architecture

    Miguel Castro argues that microservices are not merely tiny services but a holistic architectural approach that shapes how services, their callers, and clients interact to deliver robust, scalable applications. He emphasizes thinking in terms of architecture and boundaries, not just technology, advocating a holistic decomposition that foregrounds characteristics such as redundancy, isolation, dependency checking, service discovery, easy client access via an API gateway, and design-for-failure practices. Using a practical e-commerce example, Castro shows how client composition and fault tolerance must influence service boundaries and infrastructure, while acknowledging real-world trade-offs and the value of balancing theory with implementation realities.

  8. CODE Magazine: 2017 - September/October cover

    Angular and AOT

    If Just-in-Time compilation is getting you down because of slow runtime launches, you’ll be excited to learn about how Ahead-of-Time compilation can make your apps smaller and more efficient. Sahil shows you how.

  9. CODE Magazine: 2017 - July/August cover

    Writing Concurrent Programs Using F# Mailbox Processors

    Rachel takes a close look at F# mailbox processors to help you efficiently process messages. She covers replying, scanning (for a particular message or subject), and coordinating multiple agents, and makes it easy once you know which connections to make.

  10. CODE Magazine: 2017 - March/April cover

    Accessing Your Data with F# Type Providers

    You can access just about any data with type providers, whether in XML, JSON, or APIs. Rachel shows us how, plus a nifty new Swagger type provider.

  11. CODE Magazine: 2016 - November/December cover

    Case Study: Writing Microservices with F#

    If you’re lucky enough to be involved in building a new enterprise system, you’ll want to check this out. Rachel takes a look at how the company where she works made some interesting—and forward-looking—decisions, and she shows us the benefits of microservices while she’s at it.

  12. CODE Magazine: 2016 - November/December cover

    The Resurgence of XAML

    Microsoft seemed to have put XAML out to pasture for a while, but Billy shows us how it’s back, and why even Microsoft is touting its praises.

  13. CODE Magazine: 2016 - July/August cover

    How to Write Your Own Programming Language in C#

    Have you ever thought that the language you were coding in lacked some important tools? Vassili shows you how to write your own language without building a compiler.

  14. CODE Magazine: 2016 - March/April cover

    DevOps and Continuous Delivery: Made for a Cloud World

    Jeffrey gives us an overview and demonstration of a continuous delivery environment and shows us some great tools along the way. Using integrated development and operations, he gets the most out of cloud technologies.

  15. CODE Magazine: 2016 - January/February cover

    How Functional Reactive Programming (FRP) is Changing the Face of Web Development

    Joe helps you understand the emerging front-end framework technology that’s showing up everywhere these days.

  16. CODE Magazine: 2015 - May/June cover

    Easier AngularJS Routing with Angular UI Router

    Craig builds a simple application that reveals the states, dependencies, and methods of navigation that you’ll need in order to fully understand the Angular UI Router framework.

  17. CODE Magazine: 2015 - January/February cover

    XAML Anti-Patterns: Resource Overuse

    In the second article of the series, Markus talks about keeping your code readable and maintainable by controlling how often and where you reuse objects.

  18. CODE Magazine: 2014 - May/June cover

    10 Good Practices for ASP.NET MVC Apps

    Dino talks about the best possible layout for your project in MVC 5, and gives some great tips for helping you keep it all organized and effi cient.

  19. CODE Magazine: 2014 - March/April cover

    Angular JavaScript Jumpstart

    Have you ever wondered how to use your browser (and those of your customers) as rich clients without plug-ins or ActiveX objects? Shawn Wildermuth tells you how.

  20. CODE Magazine: 2014 - March/April cover

    Rich Messaging Endpoints with BizTalk Services

    Rick Garibay takes you on a tour of cloud-based messaging services including Windows Azure BizTalk Services (WABS), Enterprise Application Integration (EAI), and Windows Azure.

  21. CODE Magazine: 2014 - January/February cover

    Bootstrap 3: What’s It All About?

    Bootstrap 2.x was a great product, but you’ll build more attractive, more inviting, and more accessible websites with the next Bootstrap. Jim and Scott tell us what’s new.

  22. CODE Magazine: 2013 - November/December cover

    Structuring jQuery with Backbone.js

    Derick shows us how to achieve a high level of interactivity in our Web applications with small-scale functionality.

  23. CODE Magazine: 2013 - July/August cover

    Mobile Development with Single-Page Applications Using KendoUI

    When considering mobile development, you have a variety of techniques to choose from. In many cases, reactive rendering (using CSS media queries) provides a good solution. Additional mobile customization can be achieved by using ASP.NET MVC4 device detection/customization to provide adaptive rendering. Both of these techniques follow the traditional Web development pattern where each page is focused on a specific task. In an application managing a list, there is a page devoted to the list of items, a second page to view details, and perhaps a third to edit a specific item.

  24. CODE Magazine: 2013 - January/February cover

    CODE Framework: Accelerating Development with Standard Views and Standard View-Models

    In prior articles, I have shown how to create WPF-based applications using the CODE Framework and the MVVM and MVC patterns. This enabled developers to create quality applications quickly and in a fashion that can easily be understood by developers of all skill levels. In those articles I showed how to use view-models and views to create UIs. In this article, I am going to take this concept further by showing you how you do not even have to create new views and view-models, but instead can use the ones CODE Framework defines for you out of the box.

  25. CODE Magazine: 2012 - July/August cover

    Behavior-Driven Development Using SpecFlow

    As software development becomes complicated, writing unit tests provides a protection against constant changes and modifications. Traditionally, unit tests were written by testing each piece of the application layer in isolation. With the advent of behavior-driven development, now our unit tests can be composed into user defined stories. Each story represents a single feature of the application which can be tested from end to end. This method makes sure that the unit test only passes when the story is completely done. In this article I’ll show you how to use SpecFlow and WatiN to write BDD-style tests to implement user stories.

  26. CODE Magazine: 2012 - July/August cover

    Getting Rid of Your Code Behind

    You know you should be moving code out from behind your forms, windows and web pages and into stand-alone classes. Everyone preaches that this is what to do, everyone shows you examples of ViewModel classes, but no one really shows you a real-world example of how to get rid of the code behind.

  27. CODE Magazine: 2011 - November/December cover

    Introducing Queues and Topics in Azure Service Bus

    In 2007, Microsoft unveiled a new vision called “Software + Services” that would fundamentally change the way that both Microsoft and their customers build software and have a gradual, yet marked ripple effect throughout the software giant’s entire strategy.

  28. CODE Magazine: 2011 - July/August cover

    Entity Framework 4.1: Code First

    The Entity Framework team at Microsoft has been making several improvements since the launch of v4 with Visual Studio. The biggest of these is the capability to use a Code First or Code Only development model. Previously, if you wanted to work with the Entity Framework, you had to use either a Database First or Model First development model.

  29. CODE Magazine: 2011 - May/June cover

    An Introduction to node.js

    Brian explores node.js and shows you the basic concepts needed to develop with it.

  30. CODE Magazine: 2010 - September/October cover

    Composite Application Library (Prism) and Silverlight

    With the advancement in the Silverlight technology starting with the 1.0 release to 2.0, 3.0, and lately 4.0, Silverlight is loudly saying WOW “Watch Out World.” Can you guess which world I am talking about here? It is the RIAs world! Really WOW!

  31. CODE Magazine: 2010 - March/April cover

    Developing Database Agnostic Applications with Entity Framework

    Microsoft released Entity Framework, an ORM (Object Relational Mapping) tool, in 2008.Entity Framework gives developers the ability to be abstracted from the underlying relational database management system and allows them to talk to a database using familiar LINQ-based syntax.

  32. CODE Magazine: 2010 - January/February cover

    Introducing Advanced Code Contracts with the Entity Framework and Pex

    Martin introduces Design by Contract and Code Contracts, and gives you a sneak preview of Pex—Microsoft’s new test-suite generator. Along the way, he will show you how to add contracts to ADO.NET entities and some interesting coding strategies, good practices, and pitfalls you may encounter while making a deal with your code.With Code Contracts, Microsoft delivers its own flavor of Design by Contract for the .NET Framework. But wait, what is this thing sometimes called Contract-First Development? How will it change the way you develop software and write your unit tests? And first and foremost, how do you use Code Contracts efficiently?In this article, I will introduce Design by Contract and Code Contracts, as well as give you a sneak preview of Pex-Microsoft’s new test-suite generator. Along the way, I will show you how to add contracts to ADO.NET entities and some interesting coding strategies, good practices, and pitfalls you may encounter while making a deal with your code.

  33. CODE Magazine: 2010 - January/February cover

    S.O.L.I.D. Software Development, One Step at a Time

    Derick outlines how to achieve the benefits of low coupling, high cohesion, and strong encapsulation. He also shows how the five S.O.L.I.D. design principles can get you there.Most professional software developers understand the academic definitions of coupling, cohesion, and encapsulation.However, many developers do not understand how to achieve the benefits of low coupling, high cohesion and strong encapsulation, as outlined in this article. Fortunately, others have created stepping stones that lead to these goals, resulting in software that is easier to read, easier to understand and easier to change. In this article series, I will define three of the primary object-oriented principles and show how to reach them through the five S.O.L.I.D. design principles.

  34. CODE Magazine: 2009 - March/April cover

    The Zen of Inversion of Control

    On the surface, this article is about the techniques of dependency injection and inversion of control.Underneath, the intent of the words and code samples is to get you to think about the questions of “why” and “when” you might want to use these two closely related techniques, as well a series of similar evolutionary techniques that lead up to the full-blown dependency injection. The initial code samples are admittedly (and deliberately) simple; I do not want the content of the code to obscure the intent of the code.

  35. CODE Magazine: 2008 - November/December cover

    Build Composite WPF Applications

    When you build complex UI applications, it is all too easy to end up with a messy, tightly coupled, interwoven mess that is difficult to develop and maintain; and impossible to test.Too avoid that, you need to employ good design patterns in your UI layer that help you keep things loosely-coupled and testable. Composite Application Guidance for WPF is a set of libraries, documentation, and sample code from Microsoft patterns & practices that helps you to build clean, maintainable applications. In this article, I’ll show you what this set of guidance provides and how to use it to build your WPF applications.

  36. CODE Magazine: 2008 - November/December cover

    Heard on .NET Rocks! James Kovacs Inverts Our Control

    Nov/Dec 08 .NET Rocks by Carl Franklin

  37. CODE Magazine: 2008 - January/February cover

    Design for Extensibility

    Today’s clients seem to be getting more and more demanding regarding the flexibility of their applications and the speed in which modifications can be made. In this article, I will show you how to design applications with extensibility points so that they will grow with the clients’ needs as well as provide a way to “swap” functionality in and out as needed.

  38. CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability cover

    TESLA: Democratizing the Cloud

    In our service-oriented world, users need the same experience on any device, whether mobile phone, office PC, or Internet café. Moreover, they want the same experience any time they access applications, offline or online. For developers, this means tackling multi-tier, distributed, and concurrent programming. LINQ 1.0 radically simplified multi-tier programming with unified query and deep XML support. TESLA is a broad engineering program by the authors to extend the success of LINQ with external relationships, reshaping combinators, assisted tier-splitting, and join patterns.

  39. CODE Magazine: 2007 - November/December cover

    The Provider Model

    In this article you will learn how to isolate yourself from change by taking advantage of the Provider Model.Designing your applications using the Provider Model will allow you to swap components out at runtime, thus allowing you to upgrade them easily.

  40. CODE Magazine: 2007 - May/June cover

    Layered Architecture, Dependency Injection, and Dependency Inversion

    Building loosely coupled application architectures requires more than just separating your application into different layers.In this article, I’ll take a project that was built using techniques that result in fragile, hard-to-test code and introduce some principles, techniques, and refactorings that will help you realize flexibility and testability in your applications.

  41. CODE Magazine: 2007 - March/April cover

    The Baker’s Dozen: 13 Steps for Building a Lookup Page Using ASP.NET 2.0, SQL 2005, and C# 2.0

    Lookup and navigation screens initially seem like no-brainers, when compared to other parts of an application-yet by the time a developer has met all the user requirements and requests, he/she has expended much more time than expected. This issue of The Baker’s Dozen will build a lookup Web page using ASP.NET 2.0, SQL Server 2005, and C# 2.0. The lookup and results page will contain optional lookup criteria and custom paging of the result set. The solution will utilize new language features in SQL 2005 for providing ranking numbers to correlate with custom paging, and new capabilities in .NET generics to pump the results of a stored procedure into a custom collection. Just like Mr. Mayagi taught Daniel the martial arts by doing exercises, the example in this article will demonstrate some common design patterns, such as factory creation patterns, using .NET generics. The article also subtly presents a general methodology for building database Web pages.

  42. Chapter 4 Design Patterns

    OOP is a powerful concept that solves many problems found in software development. OOP is not the holy grail of programming, but, as we will see throughout this book, it can help in writing code that is easy to read, easy to maintain, easy to update, and easy to expand.

  43. CODE Magazine: 2006 - July/August cover

    Database Concurrency Conflicts in the Real World

    In "Database Concurrency Conflicts in the Real World," Maurice De Beijer critiques conventional concurrency control approaches for focusing too narrowly on database implementation rather than on how users interact with data in real scenarios. He highlights the limitations of pessimistic and optimistic concurrency controls when applied to complex, multi-row, and multi-user data contexts, proposing a more nuanced method that groups related fields for updates. This approach aims to reduce false conflicts by reflecting real-world data ownership and usage patterns, offering a practical step toward concurrency handling that better aligns with user perspectives and application needs.

  44. CODE Magazine: 2006 - July/August cover

    Dissecting and Putting the Visual Studio 2005 Generated Data Access Layer Into Perspective

    Do more with less code is the slogan of Visual Studio 2005.When it comes to reducing the amount of written code, wizards are definitely a viable option. Visual Studio 2005 has a lot of wizardry in it, especially to generate data access code. Any code that gets silently injected in your project follows a strict logic and a well-known design pattern. A full understanding how Visual Studio 2005 does it puts you on the right track to modify and extend the code to build your made-to-measure data access layer. This article dissects the code behind table adapters and binding source components to unveil patterns and best practices.

  45. CODE Magazine: 2000 - Spring cover

    Windows DNA Development: A Pattern Language

    In this article, Yair Alan Griver presents a pattern language for Windows DNA application development aimed at standardizing the design of COM-based, multi-tier systems. He emphasizes the logical separation of UI, business, and data tiers and introduces five stereotypical components to simplify the middle tier’s complexity. By defining clear roles for resource managers, data sources, validation, and process objects—particularly through a Resource Manager Controller managing transactions—Griver provides a structured approach that enhances scalability, maintainability, and transaction management in Windows DNA applications.