Category Archives: Web

Web related content development and integration with .NET

Microsoft Web Matrix

I’ve been using the Microsoft Web Matrix more and more lately to install CMS and eCommerce solutions.  This application is a simply install which has links on most popular Microsoft style web products allowing you to directly install and setup your IIS instance without any fuss or mess.

The Web Matrix also let’s you create templates based on sites, or use existing templates.  I have also agreed with using templates as bases, because a good template will give you the proper wire frame for your site and you simply need to tweak styles to get what you need.  Finally, the Web Matrix sets up your database for whatever web application you install, and also has plenty of options for automatically tuning your IIS instance.  Definitely a great tool to have in your tool shed.

Take a look at this video for some information about the Web Matrix:


Here are some popular sites that use the Web Matrix for installation:



HOW TO: Create A Salesforce Email And Associate It To An Opportunity

The Salesforce developer site describes the email object as having a whatId property which you can use to associate to a property. This specific property is commented as only working if you set a target targetObjectId which can be set to the contact the opportunity was created for. In my specific case, I decided to create a .NET mail object and transform it into a SingleMailMessage to associate to an opportunity. The final result looked something like this:

Public Sub SendEmailForOpportunity(ByVal Email As Net.Mail.MailMessage, ByVal OpportunityId As String)
        Dim semSingleEmailMessage As SalesForceEnterprise.SingleEmailMessage
        Dim lstEmails As List(Of String)
        Dim lstMessages As List(Of SalesForceEnterprise.SingleEmailMessage)
            semSingleEmailMessage = New SalesForceEnterprise.SingleEmailMessage
            If Email.Bcc IsNot Nothing Then
                lstEmails = New List(Of String)
                For Each maoMailAddress As MailAddress In Email.Bcc
                semSingleEmailMessage.bccAddresses = lstEmails.ToArray
            End If
            If Email.CC IsNot Nothing Then
                lstEmails = New List(Of String)
                For Each maoMailAddress As MailAddress In Email.CC
                semSingleEmailMessage.ccAddresses = lstEmails.ToArray
            End If
            If Email.ReplyTo IsNot Nothing Then
                semSingleEmailMessage.replyTo = Email.ReplyTo.Address
                semSingleEmailMessage.senderDisplayName = Email.ReplyTo.DisplayName
            End If
            If Email.To IsNot Nothing Then
                lstEmails = New List(Of String)
                For Each maoMailAddress As MailAddress In Email.To
                semSingleEmailMessage.toAddresses = lstEmails.ToArray
            End If
            semSingleEmailMessage.htmlBody = Email.Body
            semSingleEmailMessage.subject = Email.Subject
            semSingleEmailMessage.whatId = OpportunityId
            lstMessages = New List(Of SalesForceEnterprise.SingleEmailMessage)
        Catch ex As Exception
            Throw New Exception("Failure during sending email", ex)
        End Try
    End Sub

The SetupService method logs into the service and passes in the necessary credentials just like the standard Salesforce API recommends.

OAuth Usage In Web Design

A feature which DevExpress has recently released into their library is the oAuth integration library. This allows for Facebook, LinkedIn and popular oAuth login methods to connect to your XAF or ASP.NET website. A nice feature of this tool is the automation of the login process, and seemless integration into websites.

This login method is a token based login, which was not a popular method until it was adopted by media giants such as Google and Facebook.There are a lot of good sample websites on how to use oAuth if you were to write your own integration library:

About OAuth
OAuth By Example
Twitter Developers On OAuth

I would also recommend reading the third part in the DevExpress blog regarding setting up an oAuth website while using their controls. It is a great read, and helps any developer get up and going with this technology in a few simple steps:

DevExpress Using OAuth

XHTML…a lost monster

XHTML has been severely damaged as the future leader of the web standards In the first half of the decade, XHTML had been marketed as the say all do all for how to progress your websites. It had introduced a new standard for being compliant with XML documentation and was hoped to be the future of the web in general. Present day, we all know that XML is not exactly the future of web design and proper data storage. While XML does have it’s place, and so does XHTML, they both can be phased out easily with a few simple arguments.

The biggest disadvantage to using XHTML being, any user agent (e.g. the browser) when it comes across an unescape ampersand (&) in a URL or a mismatched character encoding in a track back message, would cause the entire page to fail, and so most of today’s public web applications can’t safely be incorporated in a true XHTML page.Internet Explorer has never supported XHTML (not even IE 8) making all arguments about standards compliance go down the drain.

XHTML is not HTML compliant if it is served as content type text/html (read more on why sending XHTML as text/html is harmful). Moreover, XHTML 2 is not compatible with XHTML 1.1, which throws the future compatibility argument out of the window. Others have doubts over XHTML and XHTML 2.0 which paved the way for HTML 5.

I am personally looking forward to moving clients to HTML version 5 based on some of the tags I have seen come out. While this doesn’t seem to impress most, being able to embed document content directly in a page is going to be fantastic. Also, there looks like there is a curve with HTML interpreters to shift towards visual design and actions instead of rendering text. This is an exciting time for web pages and the web in general, glad it’s finally here.