Microsoft P&P Software Factories

I didn’t notice that the Microsoft P&P team has released something they call “Software Factories” which are supposed to guide the developer in building different apps using best practices (at least that is what I think they do from the descriptions).

Specifically I am interested in the Web Client Software Factory:

… provides an integrated set of guidance that assists architects and developers in creating composite Web applications and page flow client applications.

These applications have one or more of the following characteristics:

  • They have complex page flows and workflows.
  • They are developed by multiple collaborating development teams.
  • They are composite applications that present information from multiple sources through an integrated user interface.
  • They support XCopy deployment of independently developed modules.
  • They support online business transaction processing Web sites.

 

and the Web Service Software Factory, which as they put it is:

… an integrated collection of tools, patterns, source code and prescriptive guidance. It is designed to help you quickly and consistently construct Web services that adhere to well known architecture and design patterns.

The package covers:

  • Designing ASMX and WCF messages and service interfaces.
  • Applying exception shielding and exception handling.
  • Designing business entities in the domain model.
  • Translating messages to and from business entities.
  • Designing, building, and invoking the data access layer.
  • Validating the conformance of service implementation, configuration, and security using code analysis.
  • Planning for the migration to WCF.
  • Applying security to WCF services.
  • Applying message validation.
  • Nice NUnitASP writeup.

    Over at TheServerSide they had a nice writeup of an example of how to use NUnitASP to test the UI of some pages.

    I am not sure how valuable this would be to invest my time in, espically as it seems that there is now way to test repeaters or gridviews (there is a datagridtester however).

    I will have to look some more and see if ther eis a way to do this.

    Refactor! for ASP.NET

    This looks really cool. 

    You can download it here for free.

    Included Refactorings

    Add Validator
    Create Overload
    Encapsulate Field
    Extract ContentPlaceHolder
    Extract ContentPlaceHolder (create master page)
    Extract Method
    Extract Property
    Extract Style (Class)
    Extract Style (id)
    Extract to User Control
    Flatten Conditional
    Inline Temp
    Introduce Constant
    Introduce Local
    Introduce Local (replace all)
    Move Declaration Near Reference
    Move Initialization to Declaration
    Move Style Attributes to CSS
    Move to Code-behind
    Rename
    Reorder Parameters
    Replace Temp with Query
    Reverse Conditional
    Safe Rename
    Simplify Expression
    Split Initialization from Declaration
    Split Temporary Variable
    Surround with Update Panel

     

    UPDATE:  It seems that installing this may have removed some of the features of the old Refactor! that I was frequently using (?).  I used to use the “Surround With–>Region” all the time.  Now that is gone.  I will have to investigate.

    ASP.NET AJAX Errors

    I have been getting a few errors when trying to use the asp.net ajax framework.

    The one error message is:

    Error: Sys.ArgumentTypeException: Object of type ‘Sys_Application’ cannot be converted to type ‘Sys._Application’/

    Parameter name: instance

    This is caused by having SmartNavigation turned on for the page. 

    The other error I was getting was this Sys.ArgumentOutOfRangeException.  Value must be an integer.  Parameter name: X.  Actual value was NaN.

    This error is caused by using a “yes” or “no” for “frameborder” for a frame.

    Yes and No are valid entries but the framework is expecting a “1” or a “0”.

     

    ASP.NET Process Recycling Too Often

    I’m not going to write too much about this, but we have been seeing a LOT of recycles of our web application, which makes us lose session for everyone logged it.

    I am just going to archive a few links I have been using to track down this problem.

    ScottGu has some reflection code to get the reason the process is shutting down that I converted to vb.net

    Scott Gu’s Article

    And here are some places discussing the issue:

    asp.net thread

    Todd Carter’s Blog Article

    Scott Forsyth’s Blog Article