Jason さんのプロフィールHunt Blogブログリスト ツール ヘルプ

Hunt Blog

using System.Hunt.Jason.Blog;
11月4日

MVVM Pattern - A Consolidation of Resources

I am just getting started with the MVVM Pattern.  I have been accumulating information that is starting to spill over. I figured it was time to consolidate the information into a post.

 

Model-View-ViewModel Pattern

 

Introduced in 2005 by John Gossman, the Model-View-ViewModel pattern enables loose coupling between the view, its related code, and the model, resulting in increased testability, flexibility, and maintainability of the application.

Jason Dolinger, Senior Engineer at Lab49 has an excellent presentation (1hr 30min) on the evolution of building MVVM applications from a classic WinForms perspective to using MVVM as well as a blog post that contains links to the original source code for the presentation.

In his presentation, Jason ignores the 'Model' component of the MVVM pattern. Josh Smith and Craig Shoemaker's MVVM video for WPF addresses the relationship between the Model and ViewModel (as well as other things).

 

Additional Resources

 

10月22日

Publishing ClickOnce Applications to Run Side-by-side for Different Environments from the Command Line using Nant

Note:
The following information relates to .NET 3.5 and NAnt 0.85.
 
Preamble
I struggled with this for quite some time. I was trying to run a command-line, clickonce deployment of my application to enable it to run side-by-side for the different environments (development, quality assurance, user acceptance testing, and production). Kavinda Munasinghe's blog post, Deploying ClickOnce on Multiple Environments was a fantastic start. It also referenced a former coworker, Neil Bourgeois, and his post, Click Once deployment using NAnt. Neil's article looked like too much manual lifting as MSBuild should have the ability to take in some command-line parameters to do this properly as it is possible to accomplish the goal os side-by-side applications if performed within visual studio. The problem was figuring out which command-line switches to pass to MSBuild to get it to work.
 
The Keys are 3
  1. ProductName - This will identify each instance uniquely. I would recommend indicating each instance by its target environment to help users know which one they are running as well as knowing which one they are uninstalling if using Add/Remove Programs. e.g. <Product Name> - Development
  2. SignManifests - This was the one parameter missing from Kavinda's post that was forcing the value for publicKeyToken (a part of the application identity that must be unique to allow the applications to run side-by-side) to always remain at a value of "0000000000000000".
  3. ManifestKeyFile and ManifestCertificateThumbprint - These values are what are used to actually sign the manifest. These were what Kavinda was correctly noting in the article.

The Result

I have one exec task in my nant script that takes in parameters that are set by running a target specific to the intended environment:

<!-- deployment properties -->
<
property name="publisher.name" value="My Company Name" />
<
property name="publish.output.base.dir" value="\\UNCLocation\Deployment\ProductName" />
<
property name="product.name.base" value="ProductName" />
<
property name="product.name" value="SET_BY_TARGET__DO_NOT_CHANGE_HERE" />
<
property name="build.label" value="SET_BY_TARGET__DO_NOT_CHANGE_HERE" />
<
property name="publish.output.dir" value="SET_BY_TARGET__DO_NOT_CHANGE_HERE" />
<
property name="manifest.certificate.thumbprint" value="SET_BY_TARGET__DO_NOT_CHANGE_HERE" />
<
property name="manifest.key.file" value="SET_BY_TARGET__DO_NOT_CHANGE_HERE" />

<target name="deploy.to.dev">
    <
property name="publish.output.dir" value="${publish.output.base.dir}\Development\"
/>
    <
property name="manifest.certificate.thumbprint" value="003dd8c1fca443b398d240a54a7e47f2"
/>
    <
property name="manifest.key.file" value="certificates\development.pfx"
/>
    <
property name="product.name" value="${product.name.base} - Development"
/>
    <
call target ="deploy.common"
/>
</
target

 <target name="deploy.common">
    <
exec program="MSBuild.exe"  
              commandline='MyProject.csproj /target:rebuild;publish /property:ProductName="${product.name}";
                                     PublisherName="${publisher.name}";
                                     SignManifests=True;
                                     ManifestKeyFile=${manifest.key.file};
                                     ManifestCertificateThumbprint=${manifest.certificate.thumbprint};
                                     BootstrapperEnabled=True;
                                     CreateDesktopShortcut=True;
                                     UpdateRequired=True;
                                     UpdateMode=Foreground;
                                     MinimumRequiredVersion=${build.label};
                                     AssemblyVersion=${build.label};
                                     ApplicationVersion=${build.label};
                                     Install=True;
                                     Configuration=Release;
                                     Platform="Any CPU";
                                     OutDir=..\..\..\${build.dir\;
                                     OutputPath=${publish.output.dir};
                                     PublishDir=${publish.output.dir};
                                     PublishUrl=${publish.output.dir};
                                     InstallUrl=${publish.output.dir};
                                     UpdateUrl=${publish.output.dir}
                                      /nologo /verbosity:quiet' basedir="${framework.dir}"/>
</target>

There are a few extra items in there that force this application to be installed locally as well as always remain at the latest version that are not applicable to this post, but I am leaving them in there for completeness.

 

10月19日

Adventures in Installing Adventureworks Database on SQL Server 2008 Express

I was wasting plenty of time trying to get the AdventureWorks Database Samples installed on SQL Server 2008 Express this afternoon. The problem was, 1) that the Full-Text Search service does not install via the Microsoft Web Platform Installer, 2) FILESTREAM was not installed, 3) MSI installer for AdventureWorks Database Samples failed fast and wouldn't install the databases.
 
  1. Uninstall SQL Server 2008 Express installed by the Microsoft Web Platform Installer and, instead, download Microsoft SQL Server 2008 Express with Advanced Services and install it as per this SQL Server Development Center Forum thread (this installer gives you a LOT more options than the web install!!!). Though, in hindsight, I figure I could have likley simply installed Cumulative update package 2 for SQL Server 2008 as per the FIX: Full-text search functionality does not work in SQL Server 2008 Express Edition article. I did not test just installing the cumulative update. YMMV
  2. Folow the instructions from the How to: Enable FILESTREAM MSDN article (this option can be enabled during the installation of Microsoft SQL Server 2008 Express with Advanced Services).
  3. Because the installer failed, (see fail messag below) I downloaded the zip file and edited the install<X>db.sql script located in the folder of each of the different databases you can install. The things I had to edit:
    • :setvar SqlSamplesDatabasePath (line 39) (to "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\")
    • :setvar SqlSamplesSourceDataPath (line 40)  (to "C:\<unzip folder>\Tools\Samples\" e.g. "C:\temp\adventureworks\Tools\Samples\")

           Then I ran the script from the command line by executing sqlcmd -S <machine name>\SQLEXPRESS -i instawdb.sql

Adventureworks successfully installed... finally!

 

AdventureWorks Installer Fails:

  1. After selecting database instance, the next button is not enabled until you select the database instance, then click back, then click next to come back to this screen.

     2. And then receiving the ended prematurely dialog with the gracious opportunity to finish with no further information.

 

10月15日

Cursory Look at WPF Control Suite Vendor Offerings (Part 2 of 2)

I conducted an investigation into WPF control suites for my client. I was graciously permitted to present the information I was able to drum up from the different vendor's websites. 

Apology: Live Spaces has a size limit for their blog posts ("This entry contains too much text. Please remove some text, and then publish this entry. To publish more text, add a new entry.") so I had to publish this in two posts. Vendor Suites in previous post: ComponentOne, Telerik, Actipro, Xceed, DevExpress. 


Infragistics

Product: NetAdvantage for WPF - Online Demo

Includes: Data Grid, Carousel, Data Presenter, Chart, Carousel Listbox, Carousel Panel, Dock Manager, Month Calendar,Outlook Bar, Tab Control, Ribbon, Editors, Excel Export/Import, Reporting.

  •  includes all controls, subscription services, updates, upgrades and new product releases for one year and C# source code for all Windows Forms and WPF controls and designers

Licensing : 

  • Per developer @ $995.00 USD Renewal @ $495.00 USD
  • Per developer @ $1490.00 USD with one year of priority phone, 24-hour chat and rapid response online support. Renewal @ 749.00 USD

 

Syncfusion

Product: Essential Studio WPF Edition - Online Demo

Includes: Data Grid, Tools - Ribbon/Docking/Editors/Menus/MDI, Chart, Diagram, Editors - with highlighting, Gauge.
Licensing : 


Binary Mission

Product: UI ControlSuite .NET Enterprise edition

Includes: Slideshow, Control resizer, ScrollViewer and ScrollBar, Grid and TreeListView, Ribbon, UI Virtualizing WrapPanel, Content flip / rotation capable Content control, Tab/Navigation, ListBox, and Color picker.

Licensing : 

 

Nextwave

Product: Nextwave Suite 2.5 for WPF - Dashboard Samples

Includes: Chart for WPF, and Nextwave Gauge for WPF

Licensing


Cursory Look at WPF Control Suite Vendor Offerings (Part 1 of 2)

I conducted an investigation into WPF control suites for my client. I was graciously permitted to present the information I was able to drum up from the different vendor's websites. 

Apology: Live Spaces has a size limit for their blog posts ("This entry contains too much text. Please remove some text, and then publish this entry. To publish more text, add a new entry.") so I had to publish this in two posts. Vendor Suites in next post: Infragistics, Syncfusion, Binary Mission, Nextwave.

 

ComponentOne

Product: Studio for WPF - Online Demo

Includes: Chart, Gauges, Grid, HyperPanel, MaskedTextBox, NumericBox, RangeSlider, Reports,Scheduler.

Licensing :  

  • Per developer @ $1100 USD - Source code is NOT included or available for WPF control set.

 

Telerik

Product: RadControls for WPF - Online Demo

Includes: Calendar, Carousel, Chart, ColorPicker, ComboBox, DatePicker, Docking, Drag & Drop, Expander, Gauge,GridView, Masked Textbox, Numeric Up/Down, OutlookBar, PanelBar, ProgressBar, Scheduler, Slider, TabControl,TileView, TimePicker, ToolBar, TreeView, Window.

Licensing : 

  • Per developer @ $999 USD - Source code included in the Developer License with Subscription and Priority Support option. (@ $999 USD /developer)


Actipro

Product: WPF Studio for WPF - Online Demo

Includes: Bar Code, Data Grid, Docking and MDI, Editors, Guage, Navigation, Property Grid, Ribbon, Syntax Editor,Wizard, and Shared Library

Licensing :  
  • Per developer @ $649 USD for first and 10% off for each additional license up to 8 licenses
  • Site License @ $4,999 USD | Organization License @ $9,999 USD
  • Option to add source code (Blueprint) to any of above options for $1499 USD
  • Renewals of Per developer License @ $389 USD for first and 10% off for each additional license up to 8 licenses

Xceed

Product: Xceed Ultimate Suite - Online Demo

Includes3D Views, DataGrid (professional), DataGrid (standard), Editors, Glass Theme, Media Theme, Office 2007 Theme, Professional Themes
Licensing : 

  • Per developer @ $999.95 USD
  • Per developer with Updates @ $1499.95 USD
  • Per Developer Source code included (Blueprint Edition) @ $1,999.95 USD
  • Renewals Per developer 1 year vanguard @ $599.95
  • Renewals Blueprint Edition @ $999.95

 

DevExpress

Product: DevExpress WPF Product Line - Online Grid Demo

Includes: Data Grid, Charting, Toolbar-Menu System, Dock Windows, Printing-Exporting Library, Data Editors, Navigation Pane, and Carousel.
Licensing : 

  • DXperience WPF Edition : 
  • DXperience Enterprise Edition (with source code) : 
  • DXperience Universal Edition (with source code) : 
  • Automatically receive all updates for those products which you are licensed under a given subscription