Click here to Skip to main content
15,892,480 members
Articles / Desktop Programming / Win32

Model View Presenter Using Dependency Injection and Threading Support

Rate me:
Please Sign up or sign in to vote.
4.73/5 (30 votes)
8 Jan 2008CPOL16 min read 113.8K   977   143  
How to code the MVP pattern using Spring.Net.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <sectionGroup name="spring">
         <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
         <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
      </sectionGroup>
   </configSections>

   <spring>

      <context>
         <resource uri="config://spring/objects"/>
      </context>

      <objects xmlns="http://www.springframework.net">

         <object id ="LogonService" type="MvpExample.LogonService, MvpExample"/>
         
         <object id="LogonController" type="MvpExample.LogonController, MvpExample">
            <property name="LogonService" ref="LogonService"/>
         </object>
         
         <object id="LogonView" type="MvpExample.LogonForm, MvpExample">
            <property name="LogonController" ref="LogonController"/>
         </object>                                                
      </objects>
   </spring>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Canada Canada
I am currently working as a team leader with a group of amazing .NET programmers. I love coding with .NET, and I love to apply design patterns into my work. Lately I had some free time, so I decided to write some articles, hoping I will spare someone frustration and anxiety.

Comments and Discussions