Archives

Archives / 2010
  • What is ForkCan.com – Do you have what it takes to Share your code?

    I have worked on a project for a while now, I call it ForkCan and can be found on the following URL www.forkcan.com. ForkCan is all about sharing code in a social way. I have notice that several developers on twitter paste pointers to sites like paste-it.net to share some code with others, and to get feedback on the code. I moved this a little bit further and created a similar site BUT! I also want to make sure developers can learn from each other, discuss the code with each other and much more. There are so many great code examples shared and distributed on the web, but to find them we need to search for it and it’s spread around different blog posts, forums etc. I wanted to create one place where developers can add the code, make a repository of codes where everyone can find great code to be used in a project. I also created ForkCan to save my own “good to have” code snippets, so I can find it easy and and copy and paste it into my projects. You may wonder why I call it ForkCan? It’s because it can be used as a can of forks ;) Fork in Software development is about taking an existing code and make development on it. So with ForkCan you can share your code, someone else can make it even better by making a Fork of it. The idea of ForkCan is to help each other to be better developers. The site also is a great tool for the Copy & Pasters.. ;)

  • The Aspen progress – Silverlight 4, Net 4, WCF RIA Services ref. project

    It was a while since I wrote a blog post, the reason are many, first preparation for the SDC2010 conference where I talked about WCF RIA Services, then 2 sessions at Microsoft TechDays 2010 where I talked about Web Form vs MVC and building business application with Silverlight 4, MVVM and WCF RIA Services.. and then bought a new car and also have bean on the Microsoft Visual Studio 2010 Ultimate tour and one week vacation in Italy. So a busy time. This blog post will only mention some of the latest updates we have made to the project.

  • Some steps for moving WCF RIA Services Preveiw to the RC version.

    I moved the Aspen project from the WCF RIA Services VS2010 Preview to the RC version. Maybe some of you will move your Preview version to the RC, so I wrote down some steps..
     
     
    Server Side
     
    You can start with replacing the Web.Config, because I don’t know how your config looks like, I just copy a clean PDC preview config and paste it here and the new one for the RC
     

    Old one:
     
     
    <?xml version="1.0"?>
    <configuration>

        <system.web>
            <httpModules>
                <add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </httpModules>
            <compilation debug="true" targetFramework="4.0" />
        </system.web>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true">
                <add name="DomainServiceModule" preCondition="managedHandler"
                    type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </modules>
            <validation validateIntegratedModeConfiguration="false" />
        </system.webServer>
     
        <system.serviceModel>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        </system.serviceModel>
    </configuration>
     
     
    New one:
     
     

    <configuration>
      <configSections>
        <sectionGroup name="system.serviceModel">
          <section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" allowDefinition="MachineToApplication" requirePermission="false" />
        </sectionGroup>
      </configSections>
     
      <system.web>
        <httpModules>
          <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </httpModules>
        <compilation debug="true" targetFramework="4.0" />
     
      </system.web>
     
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
          <add name="DomainServiceModule" preCondition="managedHandler"
              type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </modules>
      </system.webServer>
     
      <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
     
     
    You can see all the changes by comparing both of them. I just made a simple copy and paste of the whole file in the Aspen project.
    On the server-side the following assembly references need to be replaced:
     
    Replace:
    System.Web.DomainServices
     
    To:
    System.ServiceModel.DomainServices.Server
     
    Located in the following folder (depends where your SDK is  installed):
    C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server

    Then replace the System.Web.DomainServices namespace to System.ServiceModel.DomainServices.Server

    Replace the following assembly references:

    System.Web.Ria
    (and System.Web.Ria.Services)

    To:

    System.ServiceModel.DomainServices.Hosting
    System.ServiceModel.DomainServices.Server

    The EnableClientAttribute is located in the Hosting assembly now.

    Then replace the System.Web.Ria namespace to System.ServiceModel.DomainServices.Hosting.

    For the Invoke-, Insert,  IgnoreAttribute etc, replace the System.Web.Ria.Services namespace with System.ServiceModel.DomainServices.Server.
     
     
    Note: I don’t use LinqToEntitesDomainService, but I guess if you do, then you need on the server side add a reference to the assembly:
     
    System.ServiceModel.DomainServices.EntityFramework
     
    The LinqToEntitesDomainService is located in the following namespace: System.ServiceModel.DomainServices.EntityFramework
     
     
     
    Client-Side:
     
    Replace:

    System.Web.Ria

    To:

    System.ServiceModel.DomainServices.Client
    System.ServiceModel.DomainServices.Client.Web

    Located in the folder (depends where your SDK is installed):

    C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight

    Add a reference to the following assembly:

    System.ServiceModel.Web.Extensions

    (This assembly is not in the SDK folder; use the .NET Tab in the Add Ref. dialog)
    Remove the old “Generated_Code” folder and rebuild your solution.


    If you want to know when I publish a new blog post, you can follow me on twitter: http://www.twitter.com/fredrikn
     

  • WCF RIA Services Silverlight Business Application – Using ASP.NET SiteMap for Navigation

    Note: This blog post examples is based on the WCF RIA Services PDC Beta and WCF RIA Services VS 2010 Preview, changes to the framework may happen before it hits RTM.

    This blog post will be about using the ASP.NET SiteMap together with WCF RIA Services and the Navigation feature added to Silverlight. I assume you are familiar to how the Navigation feature will work when reading this blog post, even if you don’t know you may find this blog post interesting.

  • Looking for great .Net developers – Where are you all?

    Never done this kind of post before I don’t like to do write post like this one, but I have too.. I need more .Net developers! If you are interested to work as an consultant in Sweden and in the city of Gothenburg (to begin with), and have at least 4-5 years of experience of building .Net based apps, and your life is all about learning new stuff, and like to improve your self when it comes to write good code, good software etc. Please contact me ASAP! I prefer people that are self learned (but others are of course welcome), so you don’t need to have just a paper with some degrees that will not say anything in this fast moving forward evolution ;)

  • Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 1 of X

    Together with Dag König and Danwei Tran at Microsoft, I’m building an app with the code name “Aspen”. This application will use most of the new features shipped with Visual Studio 2010, such as, Silverlight 4, Entity Framework 4, MEF, WCF RIA Services etc. We are going to use the MVVM pattern and a sort of Domain Driven Design (DDD) approach. Danwei is the GUI designer, she will use Sketchflow and Expression Blend 4. Dag König is the “Standards authority” and  will also do some development. My part is to be a developer, both backend and client-side. I will blog about our progress on my blog and that is the reason for the X in the title of this blog post. I don’t know how many parts it will be ;)

  • Silverlight – About validation when binding to custom forms – Part 2 using Silverlight 4

    In my first part about validation and binding to custom forms I wrote about how we could with some small hack enable the Validation Tooltip for a bounded control manually when we press a button. In this post I will instead use Silverlight 4 with Commanding and the INotifyDataErrorInfo interface to “manually” show the validation tooltip for a specific control.

  • Silverlight – About validation when binding to custom forms

    I have notice that some people have problems about how to implement User Input validation when they don’t use controls like the DataForm or DataGrid  etc, and instead bind directly to a TextBox or other user input controls. In this post I will write about different ways to handle validations. In this post I will work with a simple View. I will later add a post where I will use some new Validation features in Siverlight 4 and where I also use the MVVM pattern and Commanding.

  • Silverlight - Navigate to a specific Page using a Hyperlink

    Sometimes I think it’s hard to know what I should write about, my ideas comes from different sources. Some of my posts is based on questions people are asking on forums. If someone ask one specific question, it’s a big chance that someone else have the same kind of question, so I often blog about the solution so others kind find them. So this blog post will be about how we can from a HTML page navigate to a page hosting a Silverlight application and navigate to a specific .XAML page. Probably someone else have blogged about this before but I also use my blog as a reference for my self :P

  • My first day at my new work

    Today is my new day at my new work. I have now started to work for Iptor a .Net and Java consultant company in Gothenburg. My role will be coaching, mentoring, consulting and also as a instructor. My main role is to help companies with starting up new projects, helping them with architecture and design choice and make sure they use the correct tools for the correct task. The main focus will be everything from small web based and RIA apps to enterprise apps where I will spend a lot of time with Silverlight and of course other .Net frameworks. I will also work as an instructor to lift developers and architects to a reasonable level to succeed with the implementation of projects. Please don’t hesitate to contact me if you need any help with upcoming or existing projects.