04 July 2006

Starting developing in .Net Framework 3.0

Here's a how to start developing .Net Framework 3.0 applications.

For any doubts on OS and framework's compatibility, read the article Deploying .Net Framework 3.0.

What's nedded for developing .Net3 applications (taken from here):

  • .Net Framework 3 Runtime Components (already ships with WindowsVista and Longhorn)
  • Windows SDK: includes the documentation, samples, tools and build environments to develop Windows applications - either native or .NET Framework 3.0.
  • [Optional] Visual Studio 2005
  • [Optional] "Orcas" .NET Framework 3.0 Development Tools: development tools that work with Visual Studio 2005 and provide functionality such as XAML Intellisense support through schema extensions for the editor, project templates for the Windows Presentation Foundation and Windows Communication Foundation namespaces and .NET Framework 3.0 SDK documentation integration.
  • [Optional] Visual Studio 2005 Extensions for Windows Workflow Foundation:extensions to Visual Studio 2005 include project templates, intellisense support for the Workflow namespace (System.Workflow) and integrated documentation.

.Net Glossary 3.0

This is just a summary of the new terms incorporated by the third generation of the .Net Framework.

The new managed-code programming model for Windows.
It's basically the sum of the .NET Framework 2.0 plus some new technologies.
It will ship with Windows Vista.
It is available for Windows XP and 2000 with SP2 and for Windows Server 2003.
Here's the .Net Framework 3.0's diagram (stolen from MSDN):

  • Authentic Energic Reflexive Open (AERO): Windows Vista's Look & Feel. Refers back to the UX Guidelines.
  • Card Space (ex InfoCard): Unified Digital Identity.
  • eXtensible Application Markup Language (XAML): XML based languaged used to code the WPF's object model.
  • Microsoft Expression: multimedia software package for graphic designers. It ships with 3 applications:
    • Acrilyc Graphic Designer: Design tool compatible with bitmaps and vectorial graphics.
    • Sparkle Interactive Designer: XAML, MS alternative to Macromedia Flash.
    • Quartz Web Designer: MS Frontpage's replacement.
  • ORCAS: codename for the next version of Visual Studio.
  • Team Foundation Server (TFS): workflow collaboration engine that enables the use of a team's customized process, as well as a centralized data warehouse that collects real-time intelligence on project history.
  • The LINQ Proyect: codename for a set of extensions to the .NET Framework that encompass Language-INtegrated Query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.
  • User Experience (UX) Guidelines (UX Guide): Contain information on what’s new in Windows Vista, design principles, guidelines for controls, text, windows, and aesthetics.
  • Windows Comunication Foundation (WCF) (codename Indigo): Unified set of technologies to build Service Oriented Applications.
  • Windows Presentation Foundation (WPF) (codename Avalon)
  • WindowsVista (codename Longhorn): Major Windows Operating System
  • Windows Workflow Foundation (WF): programming model, engine and tools for quickly building workflow enabled applications.

Dependencies Metrics

In his paper about Stability (1997), Robert C. Martin describes a set of principles and metrics that can be used to measure the quality of a large object oriented designed proyect in terms of the interdependence between its packages.

The metrics

  • Abstract types: The number of abstract types contained in the assembly.
  • Total types: The number of total types contained in the assembly.
  • Abstractness (A): The ratio of abstract types in the assembly to the total number of types. A = abstract types / total types.
  • Efferent Couplings (Ce): The number of types inside the assembly that depend upon types outside the assembly.
  • Afferent Couplings (Ca): The number of types outside the assembly that depend upon types within the assembly.
  • Instability (I): I = Ce / (Ce+Ca). Measure of the facility in changing the assembly.
  • Distance from the Main Sequence (D): In an Abstraction vs Instability space, the distance from the assembly (I,A) possition to the Main Sequence (the line of maximum balance between abstractness and instability). D = |A+I-1|/sqrt(2)
  • Normalized Distance (D'): The above distance ranged between [0,1]. D’ = |A+I-1|
The Principles
  • Stable Abstraction Principle (SAP): Reference's direction must be from a less abstract to a more abstract assembly.
  • Stable Dependency Principle (SDP): Reference's directon must be from a more instable assembly to a more stable assembly.
Examples

<- The figure on the left shows a bad dependency (the red arrow) because As1 depends on As2, but As2 in less abstract than As1 and more instable too.






-> The figure on the right shows a good dependency because it goes in the abstraction's direction (As1 is more abstract thanAs2) and also in the stability's direction (As1 is more stable -less instable- than As2).

Why to use them


  • They are easy to calculate (already exists tools to do the job -at least for java-)
  • They are widely used and approved.
  • They will help a lot in determining the proyect's health in terms of its dependencies, although it is possible that not ALL references seen as bad references below the eye of this principles are REALLY bad references.
  • They allow to continuously monitor the quality aspects of code that can affect the long-term viability of your software architecture.
Tools for calculating them

For Java:
For .Net: