Saturday, January 21, 2012

Metro Design

A Windows applications UI is not changed for many years.  The recent big change was office Ribbon.  Now there is major shift in UI design which is Metro style design. Metro design is already adopted completely in Windows Phone 7, Zune.  Windows 8 will also be based on Metro design.  The design is from the inspiration of sign boards in Metro cities.  Hence the name.
 
Principles
  • Light & simple: No glassy buttons are rich graphics.  Simple flat graphics
  • Typography: Beauty is given importance, Have specific type (ex Segoe) use at various weightages to have textual hierarchy
  • Motion: The lively of the application is given importance, little animation added for every user interface and page transitions
  • Content, not chrome: Important is for the content not for controls, so unnecessary controls are removed, so no more scroll bar for a list, a list it self can be scrollable.
  • Honesty: It is unique and new style
Design Language
Principles talks about abstract concepts language takes a shape. 
  • Navigation: Pivot & Panaroma
  • Motion: Animations
  • Iconography: Flat icon set
  • Images & Photos
  • Themes & Personalization
  • Touch Gestures & Targets
  • UI controls: Application Bar, Application Bar Menu
  • Hardware
  • Services
  • Marketplace and Branding
Tutorial: http://blendinsider.com/tutorial/blend-tutorial-part-1-design-your-first-metro-style-app-with-javascript-html5-css-2012-1-20/
For more detail check out Channel 9MSDN, Blog Reference

Friday, January 6, 2012

SQL Server 2008 High Availability

High availability configuration is a tricky area for me, I feel Operation team will take care on them!! and never ventured to understand in depth.  But today I came across simple video on configuring high availability options in a simple way.  It is simple and clear.

Grouping set in SQL Server 2008


Aggregation is primary need when you are building reports.  The simple GROUP BY is not sufficient when you are building reports.  The ROLLUP and CUBE are handy features for cumulative aggregates.  These ROLLUP and CUBE are replaced with GROUPING SET in SQL 2008.  

The features like ROLLUP, CUBE exists for backward compatibility, so in if you are in SQL 2008 start using GROUPING SET.  

Instead of explaining GROUPING SET, I just listed set of query and output which is self explanatory. .

Sample Table
EmpId
Yr
Sales
1
2005
12000.00
1
2006
18000.00
1
2007
25000.00
2
2005
15000.00
2
2006
6000.00
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY EmpId, Yr WITH ROLLUP

OR

SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY ROLLUP(EmpId, Yr)
EmpId
Yr
Sales
1
2005
12000
1
2006
18000
1
2007
25000
1
NULL
55000
2
2005
15000
2
2006
6000
2
NULL
21000
NULL
NULL
76000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY EmpId, Yr WITH CUBE

OR

SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY CUBE(EmpId, Yr)
EmpId
Yr
Sales
1
2005
12000
2
2005
15000
NULL
2005
27000
1
2006
18000
2
2006
6000
NULL
2006
24000
1
2007
25000
NULL
2007
25000
NULL
NULL
76000
1
NULL
55000
2
NULL
21000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId), ())
EmpId
Yr
Sales
1
2005
12000
1
2006
18000
1
2007
25000
1
NULL
55000
2
2005
15000
2
2006
6000
2
NULL
21000
NULL
NULL
76000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId))
EmpId
Yr
Sales
1
2005
12000
1
2006
18000
1
2007
25000
1
NULL
55000
2
2005
15000
2
2006
6000
2
NULL
21000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId))
EmpId
Yr
Sales
1
2005
12000
1
2006
18000
1
2007
25000
1
NULL
55000
2
2005
15000
2
2006
6000
2
NULL
21000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId), (Yr))
EmpId
Yr
Sales
NULL
2005
27000
NULL
2006
24000
NULL
2007
25000
1
NULL
55000
2
NULL
21000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr))
EmpId
Yr
Sales
1
2005
12000
2
2005
15000
1
2006
18000
2
2006
6000
1
2007
25000
SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId, Yr), (EmpId) )

OR

SELECT EmpId, Yr, SUM(Sales) AS Sales
FROM Sales
GROUP BY GROUPING SETS((EmpId), (Yr, EmpId))

EmpId
Yr
Sales
1
2005
12000
1
2006
18000
1
2007
25000
1
NULL
55000
2
2005
15000
2
2006
6000
2
NULL
21000



Teams PowerShell

 The PowerShell helps to get quick meta data around Teams. Install-Module -Name MicrosoftTeams Connect-MicrosoftTeams Get-TeamAllChannel...