I subscribe to 'threads watched by Channel 9 MSDN team' on the Channel 9 MSDN web site, the problem is, once a thread falls off the feed, it's a real PITA to find it again!
This interview with Scott Guthrie, MS VP, offers a great introduction to what Silverlight 2.0 really is and is a must watch for anyone new to the technology:
I am proud to announce that I have released my first independant commercial module on Snowcovered.com: the ACIA Silverlight Slide Show and Photo Gallery. The module provides a management UI for a popular open source Silverlight Slide Show control. The gallery provides a Silverlight 1.0 control for publishing highly-customizable photo slideshows on the Web.
Best decision I ever made.
I rarely have an original thought (if I have ever had one) and this entry is no exception. A while back while comparing the Commerce Starter Kit with the DNN Core Store Module, I found an interesting post on “Spooks Blog” (link) discussing the merrits of a DotNetNuke ecommerce module.
In response to this post, Sean Walker posted a very eloquent response, in which I found the following especially pointed and relevant to DotNetNuke's use in a great whole:
He also addressed performance issues, always a sticky subject with old school manager types:
I originally posted most of this in my reply on the SubSonic Community Forums to a thread on how to incorporate SubSonic DAL into a DNN Module without having to modify the web.config file. I figured it would be useful here because I had a bit of a time figuring this out.
To recap what I did (for my test app):
Started with a new Class Library project, named it ACIA.Data, added this to my DotNetNuke 'classic' web application project solution (which includes the BuildSupport assembly which compiles all assemblies into the web site's \Bin folder... another topic but important for module developers).
Set up the Subsonic Command line tool as per instructions in the Club Starter Kit (http://www.codeplex.com/ClubStarterKit) (which is a great starter kit not mentioned many places on Subsonic Community which uses Subsonic very nicely). Generated my code into the \Generated folder just like Club Starter Kit. Using this method, only a single app.config file necessary in the Assembly's root folder.
In my case, I wanted to limit the amount of code I generated to the objects (tables only) in my module, so my entire app.config looked like:
xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
configSections>
<connectionStrings>
<add name="SiteSqlServer" connectionString="Data Source=.; Initial Catalog=DotNetNuke4;Integrated Security=True" providerName="System.Data.SqlClient" />
connectionStrings>
<SubSonicService defaultProvider="SiteSqlServer">
<providers>
<clear/>
<add name="SiteSqlServer" type="SubSonic.SqlDataProvider, SubSonic"
connectionStringName="SiteSqlServer" fixPluralClassNames="false"
spClassName="SPs" generatedNamespace="Database"
stripTableText="ACIA_"
includeTableList="ACIA_Committee,ACIA_Media_Files,ACIA_Meeting, ACIA_MeetingCommittee,ACIA_MeetingRSVP,ACIA_Organization,ACIA_UserOrganization"
includeProcedureList=""
viewStartsWith=""
/>
providers>
SubSonicService>
configuration>
Once code generation was working OK, I created a new class in my ACIA.Data project ... named it Application ... Created new method in the class InitializeProvider:
Imports SubSonic
Imports System.Configuration
Public Class SubsonicProvider
'''
''' Initialize Subsonic for the default provider.
'''
'''
Public Shared Sub InitializeProvider()
InitializeProvider("")
InitializeProvider("")
End Sub
'''
''' Initialize Subsonic for given Provider: Convention is to use same name
''' for Connection String and Provider name.
'''
'''
'''
Public Shared Sub InitializeProvider(ByVal ProviderName As String)
If DataService.ProviderCount = 0 Then
DataService.Provider = New SubSonic.SqlDataProvider()
DataService.Providers = New DataProviderCollection()
Dim provider As SubSonic.DataProvider = DataService.Provider
Dim config As System.Collections.Specialized.NameValueCollection = New System.Collections.Specialized.NameValueCollection()
config.Add("connectionStringName", ConfigurationManager.ConnectionStrings(ProviderName).ConnectionString)
provider.Initialize(ProviderName, config)
provider.DefaultConnectionString = ConfigurationManager.ConnectionStrings(ProviderName).ConnectionString
provider.GeneratedNamespace = "Data"
DataService.Providers.Add(provider)
End If
If DataService.Providers.Item(ProviderName) Is Nothing Then
Dim provider As New SubSonic.SqlDataProvider()
Dim config As System.Collections.Specialized.NameValueCollection = New System.Collections.Specialized.NameValueCollection()
config.Add("connectionStringName", ConfigurationManager.ConnectionStrings(ProviderName).ConnectionString)
provider.Initialize(ProviderName, config)
provider.DefaultConnectionString = ConfigurationManager.ConnectionStrings(ProviderName).ConnectionString
provider.GeneratedNamespace = "Data"
DataService.Providers.Add(provider)
End If
End Sub
End Class
Then in my test method in my module:
Private Sub TestSubSonic()
NCIGF.Data.Application.InitializeProvider()
Dim committee As Database.Committee = New Database.Committee(CommitteeID)
Debug.WriteLine(committee.Name)
End Sub
Having to call InitializeProvider before using Subsonic isn't so bad, and ultimately could just be put into a base class in my module project and never be messed with again: the import thing here is that I made no configuration changes to my web.config and was indeed able to exercise my Subsonic Dal.
I don't understand why Excel doesn't (appear to) have a Row To Column function built in. If it does, I couldn't find it. The following macro does the trick, and only took like five minutes to record edit and run to get right. I figured this has to be a common enough problem, so here was my own solution: