Friday, November 26, 2010

WPF XAML overview - what I have learnt

 I have programmed my first WPF app and here are some information I find important for starting WPF developers. This is not meat to be any tutorial or reference.

WPF is a GUI framework that is successor of Winform. These two technologies have very little in common. Winform is based on imperative architecture where all GUI components have to be placed by coding, this was greatly added by Visual studio designer. WPF allows the same capabilities as Winform but it is not the way it is meant to be used.

Microsoft develop for WPF xml derived language called XAML (read [zemel]). XAML allows to separate development of GUI and business logic of a program. XAML can fully describe GUI layout, appearance, and even functionality. Everything that is possible to accomplish with XAML is also possible by code. In fact XAML is translated to the code by WPF types.

XAML 
It is possible to say that philosophy behind XAML and HTML is similar.
  • both are hierarchical structure based on XML
  • both use styles (in different) 
  • both have code behind (javascript + css vs. c# or vb )
  • many properties (i.e. styles) are inherited by child elements from a parent element

Sunday, November 7, 2010

Webcast: An Introduction to Visual Studio 2010 Extensibility

An Introduction to Visual Studio 2010 Extensibility
Quick notes from the webcast:

www.visualstudiongellery.com - hosting for addins, templates

downloading project templates (even websites' design), start pages and managing addons right from visual studio

Why extending Visual studio?
  Faster and higher quality development
  Avoid repetitive work
  Improve the IDE
  Business opportunities (ms visual studio partner program)

Terminology
  Visual Studio Package
  - modul that allows to extend Visual studio and plug in some functionality
  - e.g. solution explorer

DTE 
  - Development Tool Enviroment
  - to query visual studio UI, code file, object inside VS and programaticaly interact with - e.g,
    get all code file from solution...

Start page 
  - highly customizable (xaml)
  - can be uploaded/downloaded

Visual studio integration package
  - New Project -> Other Project Types -> Extensibility
  - need to be signed
  - in development they run in a special instace of VS called VS Experimental Instance. It is isolated from normal VS and allows
  - confortable development

Editor newly only in WPF -> great extensibility

How to get started?
  http://msdn.microsoft.com/vsx -> download the VS2010 SDK

Code test

This is testing arcticle on my new blog.
The Syntax Highlighter was added.
I created a subversion repository on code.google.com

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = AddTwoNumbers(1, 2);
            Console.WriteLine(a);
        }

        public static int AddTwoNumbers(int firstNumber, int secondSecond)
        {
           
            return firstNumber + secondSecond;
        }
    }
}