Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / WPF

MultiuseModel-View (MMV) object modeling pattern with WPF and WCF: Is MVVM the antichrist?

Rate me:
Please Sign up or sign in to vote.
3.31/5 (13 votes)
27 Dec 2009CPOL7 min read 40.1K   544   13  
In this series of articles, I will discuss why I think MVVM is an abomination to Object Oriented Programming, and I will demonstrate a different way in which developers can write applications.
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{270173C4-5655-4C54-B8A1-A93CB5DB7A00}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>MVVMSample.PublicServer</RootNamespace>
    <AssemblyName>MVVMSample.PublicServer</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.EnterpriseServices" />
    <Reference Include="System.Runtime.Serialization">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.ServiceModel">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Web" />
    <Reference Include="System.Web.Extensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Web.Mobile" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Content Include="AddressBookService.svc" />
    <None Include="Service References\AddressBookPrivateService\AddressBookDataService.disco" />
    <None Include="Service References\AddressBookPrivateService\configuration91.svcinfo" />
    <None Include="Service References\AddressBookPrivateService\configuration.svcinfo" />
    <None Include="Service References\AddressBookPrivateService\Reference.svcmap">
      <Generator>WCF Proxy Generator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <Content Include="Web.config" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Requests\GetAllContactsRequest.cs" />
    <Compile Include="Responses\GetAllContactsResponse.cs" />
    <Compile Include="AddressBookService.svc.cs">
      <DependentUpon>AddressBookService.svc</DependentUpon>
    </Compile>
    <Compile Include="IAddressBookService.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Service References\AddressBookPrivateService\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.svcmap</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <WCFMetadata Include="Service References\" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Properties\DataSources\MVVMSample.Model.Contact.datasource" />
    <None Include="Service References\AddressBookPrivateService\AddressBookDataService.wsdl" />
    <None Include="Service References\AddressBookPrivateService\AddressBookDataService.xsd" />
    <None Include="Service References\AddressBookPrivateService\AddressBookDataService1.xsd" />
    <None Include="Service References\AddressBookPrivateService\AddressBookDataService2.xsd" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\MVVMSample.Model\MVVMSample.Model.csproj">
      <Project>{D297B7DF-4146-4939-A775-42803947E705}</Project>
      <Name>MVVMSample.Model</Name>
    </ProjectReference>
    <ProjectReference Include="..\MVVMSample.TransportModel\MVVMSample.TransportModel.csproj">
      <Project>{7D82BF80-909F-4A5B-A656-6F4ACA697F8E}</Project>
      <Name>MVVMSample.TransportModel</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <WCFMetadataStorage Include="Service References\AddressBookPrivateService\" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>53294</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

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
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions