Saturday, October 23, 2010

Why to use MVVM patterns with Silverlight and WPF development

To begin with, there are numerous and varied ways in implementing methodologies like MVVM, most of which are used based on personal preference. To a novice trying to educate themselves, this leads to disparity in information. Complicating this factor is that many of the articles or videos that attempt to describe the MVVM pattern also include components of other architectural patterns. This adds unnecessary complexity to understanding the MVVM pattern because of the inconsistencies in the pattern being described.

A great artical by Kim Schmidt. Here is the link

Friday, October 22, 2010

Calendar & Date Picker Scripts for ASP.NET and more

Calendars can be seen frequently in most web pages today especially in blogs and personal websites. As for corporate sites or e-commerce sites, it is utilize to layout announcements, up-coming events, contest and much more. What makes a calendar almost essential? It allows users to know what is new, what to be expect on specified date and track back older information all at one glance.

Here is the full post

Thursday, October 21, 2010

Create games for Windows Phone 7 - Getting Started Platforms Full Download


Phase 1 - Platform

Get introduced to Windows Phone 7, and phone game development with XNA Game Studio. This set of educational content is for all skill levels and phases of development, with a focus on introducing basic game techniques – such as input, graphics, and sound – to developers interested in making games on Windows Phone 7 using XNA Game Studio 4.0.

Phase 2 - Performance

Learn how to get the most out of Windows Phone 7 and XNA Game Studio with optimization tips and tricks.

Wednesday, October 20, 2010

Sony Ericsson S006 phone with 16.2-megapixel CMOS sensor

Sony Ericsson S006 phone gets 16.2-megapixel CMOS sensor

Sony Ericsson has certainly outdone itself with the S006 smartphone from KDDI, where it will boast a massive 16.2-megapixel CMOS sensor, catering to those who think that "more is better". Digital photography doesn't work that way though, but at least it gives you some bragging rights among your less informed mates. Other specifications of the S006 include the proprietary Exmor R image engine, the ability to achieve ISO 12800, a 1GHz Snapdragon processor, Wi-Fi connectivity, an integrated FM tuner, GPS navigation, Bluetooth connectivity and a 3.3-inch display with VGA resolution. No idea on pricing, but don't expect to see this hit the US anytime soon.

Tuesday, October 19, 2010

IIS/Exchange logs and WebDAV functions

You can collect information about client requests by enabling logging for sites and services. IIS logs are stored in %SystemRoot%\system32\Logfiles\. If you examine the IIS/Exchange log file you will see the request for the sample application being handled by IIS - you can notice couple of jargons like GET, PUT, POST, MKCOL, LOCK, UNLOCK, PROPFIND, SEARCH, PROPATCH, SUSBCRIBE, UNSUBSCRIBE, POLL etc. 

clip_image002

The three main HTTP functions used are GET, PUT and POST:

  • GET: Retrieves a document 

  • PUT: Puts an item in a folder 

  • POST: Submits an item to a folder

In addition to above, there are few more WebDAV functions that are used:
  • MKCOL: Makes a collection that is in essence the same as a Web Storage System folder. MKCOL allows you to make folders and set their properties. 

  • LOCK: Locks documents to prevent writes. 

  • UNLOCK: Allows writes and creates updates. 

  • PROPFIND: Searches for properties individually or for a whole set of folders. 

  • SEARCH: Provides filter, subquery and sort capabilities to a search. 

  • PROPPATCH: Sets arbitrary properties on an item. 

  • SUBSCRIBE: Adds a user to a list. 

  • UNSUBSCRIBE: Removes a user from a list. 

  • POLL: Checks to see if the notification is fired.

Sunday, October 17, 2010

System Stored Procedure sys.sp_tables in SQL Server

to know the list of the tables from the database:
SELECT *
FROM sys.tables
GO
The script above provides various information from create date to file stream, and many other important information. If you need all those information, that script is the one for you. However, if you do not need all those information, I suggest that you run the following script:
EXEC sys.sp_tables
GO
The script above will give all the tables in the table with schema name and qualifiers. Additionally, this will return all the system catalog views together with other views. This Stored Procedure returns all the tables first in the result set, followed by views.
Even though Stored Procedure returns more numbers of rows, it still performs better than the sys.table query.
Let us verify it with two different methods for database AdventureWorks:
1) SET STATISTICS IO ON
USE AdventureWorks
GO
SET STATISTICS IO ON
SELECT
*
FROM sys.tables
GO
EXEC sys.sp_tables
GO
(81 row(s) affected) (This is for sys.tables)
Table ‘syspalvalues’. Scan count 0, logical reads 162, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table ‘syssingleobjrefs’. Scan count 0, logical reads 324, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table ‘sysidxstats’. Scan count 81, logical reads 168, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table ‘syspalnames’. Scan count 0, logical reads 162, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table ‘sysschobjs’. Scan count 1, logical reads 16, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
(1 row(s) affected)
(456 row(s) affected) (This is for sys.sp_tables)
Table ‘sysobjrdb’. Scan count 1, logical reads 29, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table ‘sysschobjs’. Scan count 1, logical reads 16, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
(1 row(s) affected)
2) Execution Plan
You can see that the execution plan for sys.table has much higher cost of query batch.
Well, if you only need to know the name of the tables, I suggest that you start using SP_TABLES; at least it takes less typing to do.

Source: sqlserverauthority

Wednesday, October 13, 2010

Free E-Books/Guides essential for .NET Programmers and Architects

Foundations Of Programming
The Foundation Of Programming Series Free e-book By Karl Seguin is one of my favorites. It is simple, short and sweet. Especially for ‘casual’ programmers, this will give a better thought process – that’ll definitely enable them to code better and think better. This book covers the ALT.NET Philosophy, Domain Driven Development concepts, DI, TDD etc in a nice way. This book is close to my heart.
Microsoft Application Architecture Guide, 2nd Edition
Published by Microsoft, this is an essential read for any Microsoft.NET developer or Architect to understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework. This guide neatly covers popular architecture patterns, best practices and common challenges you need to understand for developing .NET applications. Get a good grip on developing enterprise applications in .NET.
Rob Miles C# Yellow Book 2010
A nice action packed book that takes you through C# and .NET concepts. This book explains C# language and .NET library in general – with a clear focus on implementation thought process and best practices.
Threading in C#
A short, neatly written book from Joe Albahari about Threading in C#. This is a must read for any .NET programmer to understand more about threading in general, thread pooling, synchronization, Non blocking synchronization, etc. In this book, Joe even covers the Parallel Framework Extensions and Parallel programming in .NET
Improving .NET Application Performance and Scalability
This guide is again from Microsoft, and focuses on designing your applications with Performance and scalability in mind. It has sections relevant to architects, developers, testers, and administrators. Following the checklists and guidance in this book will ensure that there won’t be any unpleasant surprises in the end. Read this guide if you develop Enterprise applications in .NET
Applying Design Patterns
This is a quick introduction towards the thought process of applying design patterns. The objective of the book is to introduce design patterns in a simple way, so that developers can understand some common patterns and how to apply them. I wrote that some time back ;)
RefCardz from DZone
DZone has a number of awesome Ref Cardz (Quick reference sheets) on multiple technologies. You can go to DZone –> RefCardz to browse and download them (after getting a free DZone Id). Here are some of my recent favorites