Friday, December 11, 2009

Dialog Platform in SharePoint 2010 & How to open the Edit Form Dialog for List Item


Dialog Platform in SharePoint 2010:

One of the New User Interface Platforms in SharePoint 2010 is ‘The Dialog Platform’
A dialog is essentially a <div> which gets visible on demand and renders the HTML using a background overlay creating a modal dialog like user experience.

We can show an existing div from within the page or a different page using a URL inside the dialogs.
When we pass the URL to the dialog it looks for the Querystring parameter “IsDlg=1”. If this parameters exists than it would dynamically load the "/_layouts/styles/dlgframe.css” file. This file overrides the “s4-notdlg” class items as “display:none”, which means that all items with this class would not get displayed in Dialog Mode. 
So if we go to the v4.master page we can see that this class is used by the Ribbon control to hide the ribbon when in dialog mode:

image 

How to open the Edit Form Dialog for List Item:


In SharePoint 2010 The URL for opening the Edit Form of any list item looks like something like this :

”http://intranet.contoso.com/<SiteName>/Lists/<ListName>/EditForm.aspx?ID=1&IsDlg=1”

ID
is the list item row identifier and as discussed above the IsDlg is for the dialog mode.

Now to open a dialog we need to use the SP.UI.ModalDialog.showModalDialog method from the ECMAScript Client Object model and pass in the url of the page, width & height of the dialog and also a callback function in case we want some code to run after the dialog is closed.

<script type="text/javascript">
//Handle the DialogCallback callback
function DialogCallback(dialogResult, returnValue){
}

//Open the Dialog
function OpenEditDialog(id){
var options = {
url:&quot;http://intranet.contoso.com/<SiteName>/Lists/<ListName>/EditForm.aspx?ID=&quot; + id + &quot;&amp;IsDlg=1&quot;,
width: 700,
height: 700,
dialogReturnValueCallback: DialogCallback
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>




The .js files for the ECMAScript Object Model (SP.js, SP.Core.js, SP.Ribbon.js, and SP.Runtime.js ) are installed in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS directory.


Here is a good MSDN link explaining the Client Object Model Distribution and Deployment options available in SharePoint 2010.



Sunday, November 29, 2009

Summary of all PDC09 – Announcements / Product Features / Cool Stuff

 

Silverlight

  • Silverlight 4.0 Features & More:
    • Support for Webcam, Microphones, Right Click, Mouse Wheel
    • New Rich Text control
    • Clipboard Access
    • Print Preview Dialogs
    • Authorization support in Client HTTP Stack (NTLM, Basic, Digest)
    • Running outside sandbox for Trusted Out of browser applications
      • HTML rendering control inside Silverlight
      • Local file system access
      • Keyboard in full screen
      • COM automation support (read word/excel files)
      • Notification Popups
  • Screen Presentation Framework (MVVM + Prism) for Silverlight
  • Silverlight Media Framework - Smooth Streaming Porting Kit
  • Microsoft XAML Toolkit : Provides Static Analysis, Localization, & XamlDom for .NET/Silverlight XAML
  • ADO.NET Data Services is now “OData”  - Open Data Protocol & WCF Data Services 
  • .NET 4 Location API - Installed by default with .NET 4 and supported in Visual Studio 2010. (System.Device.dll) See WHDC site for Sensors/Location : www.microsoft.com/WHDC/Sensors
  • Bing Maps Silverlight Control
  • Advanced Performance & Profiling in Silverlight 4
  • WCF RIA Services for Silverlight

SharePoint

Windows Azure

  • Windows Azure + Windows Identity Foundation + ADFS2 : https://federatedidentity.cloudapp.net/
  • Windows Azure Platform AppFabric - provides secure connectivity as a service to help developers bridge cloud, on-premises, and hosted deployments
  • Velocity is now “Windows Server AppFabric Caching
  • Dublin is now  “Windows Server AppFabric” - The Windows Server AppFabric supports WCF and Workflow services by:
    • Providing runtime databases
    • Capabilities for monitoring, persistence, hosting and caching
    • Tooling and scripting to manage and monitor WCF and WF services
  • Windows Azure :
    • Features
      • Blobs – Provide a simple interface for storing named files along with metadata for the file
      • New Type - Page Blob
      • New Operations – Updated, Copy, Snapshot, Lease Blob
      • New Ways of Accessing and Service Blob Content -
        • Custom Domain Names
        • Root Blob Container
        • Content Delivery Network access
        • Shared Access Signatures
      • Entity Group Transactions - Atomically perform multiple insert/update/delete
        over entities in same partition in a single transaction
      • Dequeue count returned with message
    • Futures
      • Administrator privileges in the VM
      • Deployment of pre-configured VM images
      • User-selectable geo-locations for replicas
      • Secondary indices on tables
      • New storage option “Drives” - Provides durable NTFS volumes for Windows Azure applications to use (Feb 2010)
      • Remote terminal server access to VMs
      • Microsoft Sync Framework and ADO.NET Sync Services - Tools for data synchronization with SQL Azure
  • TCO and ROI Calculator - provides a customized estimate of potential cost savings you (or your company or organization) may achieve by building on the Windows Azure Platform
  • Windows Azure Diagnostics - SDK component providing distributed monitoring & data collection for cloud apps
  • Visual Studio 2010 RTM and SQL Azure Futures:
    • Connect to SQL Azure – Data | Add New Data Source (DataSet & EDM)
    • EDM Conceptual Data Modeling Designer – Generate database
    • Server Explorer – Browse
    • Data Sources Window (DataSet, EDM, LinqToSQL, data binding tools)
    • Configure SQL Data Source
  • File Classification Infrastructure (FCI) - provides many avenues to be part of end-to-end data lifecycle management solutions
  • Houston- Project Houston will provide a easy to use cloud based database development experience
  • Access Control Service - claims based access control for REST web services
    • Implements OAuth Web Resource Authorization Protocol (WRAP) & Simple Web Tokens (SWT)
    • Integrates with AD FS v2

Surface & Windows 7

  • Multitouch on Windows 7
    • Manipulation Events
    • ScrollViewer Panning Support
    • WPF Controls Styles with Panning Enabled
    • Multi-Touch on the web with Silverlight
      • Manipulation and Inertia Process API
  • Windows API Code Pack – Managed Class Library to access to Windows (7) features
  • Surface Toolkit for Windows Touch” – Would be coming shortly after the WPF4 Launch
  • Surface Futures:
    • Cheaper
    • Thinner
    • Vertical
  • Surface SDK & Resources now available free

Visual Studio, WCF, WPF

  • WCF 4.0 Features:
    • Default Endpoints, Protocol Mapping, Binding Configurations,Behavior Configurations
    • File-less Activation (no .svc)
    • Simple Ad-hoc Service Discovery
    • Service Announcements
    • Routing Service
    • Message Filters and Content-based Routing
    • Automatic Help Page
    • HTTP Caching Support
  • WPF 4.0 New Features: Here is an excellent blog series from Lester covering all the below features with sample code:
    • MultiTouch
    • DatePicker\Calendar
    • Datagrid
    • Visual State Manager (VSM)
    • Easing Functions
    • JumpLists
    • Pixel Shader 3 support
    • Cached Composition
    • Full trust Xbap Deployment
    • Binding to Dynamic Objects
    • Custom Speller Support
    • Script Interop in Xbap
    • UIA Virtualization
    • UIA SynchronizedInputPattern
    • Input Key\Gesture Binding
    • TextFormattingMode
    • CaretBrush
    • SelectionBrush
    • Bindable Run
    • ClearTypeHint
    • LayoutRounding
    • Updated File Dialogs
  • Manycore & .NET 4.0 with Visual Studio 2010 (Concurrency):
    • ThreadPool.QueueUserWorkItem
    • System.Threading.Tasks.Task + System.Collections.Concurrent
    • New Sync Primitives in .NET 4
    • Visual Studio 2010 Concurrency Profiler Views + Parallel Debugger Toolwindow
  • Visual Studio 2010 ExtensibilityExtensions Gallery & VSX Samples

ASP.net & SQL Server

Microsoft Research & Labs

  • Infer.NET - framework for running Bayesian inference in graphical models (from MSR)
  • Axum” : A .NET Language for Safe and Scalable Concurrency
  • Holmes” - Automated Statistical Debugging using Path Profiles (from MSR)
  • Darwin” - An Approach for Debugging Software Regressions (from MSR)
  • Project Trident” - A Scientific Workflow Workbench (from MSR)
  • Pivot” by Live Labs : Visualizing collections of objects, Revealing hidden patterns within data, Acting on discovered insights
  • DevLabs: Reactive Extensions for .NET (Rx)
  • Trustworthy Data Collaboration SQL Azure Codename ‘Vidalia’
  • Microsoft Codename “Dallas” - Content Brokerage and Discovery platform

Other

Thursday, November 19, 2009

@PDC09 – Day 3 – Developing custom applications in SharePoint 2010 using ASP.net, WCF, REST


SharePoint Web Services

  • REST
  • Client Object Model
  • ASP.net
  • WCF

REST

  • Access to sharepoint lists and library data ( …/_vti_bin/listdata.svc)
  • Lists and List items map to resources (listdata.svc/Employees(123) )
  • Operation are mapped with HTTP verbs (GET, POST . . )
  • Based on ADO.net Data Services
    • Flexible URL conventions for querying data
      • listdata.svc/Employees?$filder=JobTitle eq ‘SDE’
      • $orderby=Fullname
    • Multiple representations
      • JSON and Atom (full AtomPub support)
    • Batching, ETags, Paging, Documents

Demo . . .
REST query is converted to CAML query…..

Integrated Development Experience in VS 2010 and VS 2008 SP1 using just “Add Reference”

  • Data Source configuration has a new item to connect to SharePoint
  • Master Details type application development

Client Object Model

  • Supports
    • Site Operations
    • Lists, ListItems
    • content types, fields
    • but not administration namespace, farm objects
  • Implemented as WCF Service
    • …/vti_bin/client.svc
    • It passes batch command to the WCF service (in XML)
    • than the server executes and returns the data back to client (in JSON Other SharePoint Web Services
  • Advanced Operations
    • User Profiles
    • People
    • Search
    • Enterprise Metadata
    • Document Coauthoring
    • Excek REST web services
    • Publishing
    • Workflow
    • BCS web services
    • ….. see MSDN
  • we can also extend sharepoint and create custom web services
    • ASP.net
    • WCF (is now recommended for sharepoint 2010 custom service development)

WCF Services

  • Problem
    • IT Admin configures IIS
      • Different authentication schemes can be configured (Basic, Claims, Windows Integrated . . .)
      • Multiple IIS address bindings
    • Developer configures WCF Service endpoint
  • Solution
    • Dynamic (Programmatic) configuration
      this would be in RTM only
    • SOAP
      • Specify Service Factory in SVC file
      • Add MEX endpoint behavior attribute to the service class
      • Deploy SVC service to ISAPI Folder
    • REST

Demo of creating custom WCF service inside sharepoint

  • sandbox solutions doesn’t support services

WCF Service Configuration

  • Service.svc
  • SharePoint Service Factory creates the endpoint based on all authentications
    • service.svc/negotiate
    • service.svc/ntlm
  • SharePoint Http Modules

@PDC09 – Day 3 – Multitouch in Microsoft Surface and Windows 7 for .NET Developers


Multi touch

  • …creates new opportunities
    • software that is
  • is not new
    • researchers have been exploring this
  • is now going mainstream
    • hardware
    • OS
    • SDK’s

Microsoft surface and WPF4

  • with surface, microsoft became a thought leader in multi touch
  • surface has been shipping a multi touch dev platform for several years
  • Touch API’s baked into sdk

WPF 4 Touch Capabilities

  • (Beta 1)
    • Manipulation Events (pan, zoom & rotate gestures)
  • (Beta 2)
    • Touch Events
    • Extensible Touch Device
    • Win7 Touch Device
  • Release
    • ScrollViewer Panning Support
    • WPF controls styles with events

Demo of sample code

  • TouchDown, TouchMove and TouchUp events for canvas or any control
  • e.GetTouchPoint(_canvas)  - returns the coordinates for the touch point
  • _canvas.CaptureTouch(e.TouchDevice)
  • each UI element can capture multiple device events
  • _canvas.ReleaseTouchCapture(e.TouchDevice)

Multitouch in Web in Silverligh

  • Subset of the WPF4 touch input API
    • Reports groups of touch events in “frames”
    • Apps are responsible for hit testing and event routing
  • Manipulation & Intertia processor API

Demo WPF Multitouch Manipulation Events

  • ManipulationStarting event
  • IsManipulationEnabled = true for the elements like Image, to be manipulated for pan, zoom and rotate
  • ManipulationDelta event

Demo Manipulation Inertia (s

  • ManipulationInertiaStarting event (it is called at the end of manipulation, configure the inertia parameters here)
    e.g we can just scroll or throw the images using finger scroll,
  • e.TranslationBehavior.DesiredDeceleration = 0.001;

Inertia behaviors – 1/96th DIP (Device Independent Pixel) per milli sec

Touch Panning Support

  • Only in Release Candidate
  • Cancel() method on manipulation events
  • ScrollViewer handles manipulation events

Microsoft Surface Extensions of WPF

Surface WPF controls

  • Designed for multi touch
  • Designed for simultaneous user
  • Designed for manipulation & inertia

Drawing with Surface Controls

  • SurfaceInkCanvas control
  • ScatterView control
  • SurfaceScrollViewer control

Announcing – Surface Toolkit for Windows Touch

Surface is not just multi touch

  • Windows 7
  • Massive multi touch
  • Multi user experiences
    • Trend : software continues to reduce the need for face to face human interactions
    • Problem
    • Surface bring people together
  • Surface Objects
    • Byte Tags (256 unique values)
    • Identity Tags (move unique values)
  • Surface Optics
    • Determine the shape and size of every input
    • See into certain objects

Announcing – Surface SDK 1.0 is available for public download

Wednesday, November 18, 2009

@PDC09 – Day 2 – Networking and Web Services with Silverlight

                                                                   (Rough notes from the session)

Getting Data into Silverlight :

  • Message Pattern
    • Request / Reply
    • Duplex (email sending, confirmation received from server)
    • Multicast (Server send only 1 copy)
  • Interaction Model
    • Operation centric (service and client in memory passing messages)
    • Resource centric (start with data or data model, CRUD)

Data Access Examples :

  • “Forms over data” E2E business app  
    (Request / Reply Message Pattern solution / Travel Agent Application example)
    • WCF RIA Services (System.Web.DomainServices)
    • Perscriptive model for CRUD services
    • Great tooling to maximize productivity
    • E2E data: sorting, paging, filtering, validation
  • Access data from third party REST service  (System.Net )
    • ClientHttp networking stack (WebRequestCreator.ClientHttp)
      • Integrated with the OS networking stack
      • Support common BrowserHttp stack features for consistent experience
      • Basic, Digest and NTLM authentication is supported in client stack
    • BrowserHttp stack
  • Access your database or SharePoint data model using REST (System.Data.Services)
    • WCF Data Services
      • Formerly ADO.NET data services
      • Services with RESTful interface and a set of conventions designed for easy data sharing
    • What is Data Services?
      • Server framework for .NET, other coming
      • Clients for silverlight
    • Accessing Data Services
      • Silverlight ClientHttp stack still an option
      • Data services client more usable as it knows the details of the data service interface
      • Features
        • Full abstraction on top of the services – no need to serialize
        • Data as objects with automatic change tracking
        • LINQ to querie
      • WCF Programming Model
        • Programming Model
          • Core Services
          • Web HTTP Services
          • Data Services
          • RIA Services
          • Workflow Services
        • Service Model
        • Channel Model
  • App which accesses server business logic (Operation Centric – System.ServiceModel)
    • Generated proxies
    • Serialization of objects on wire
    • High performance
    • Binary Message Encoder (server throughput increase / message size reduction)
      • Its the default encoder
      • It can also be used with IIS Gzip compression
    • WCF Features
      • Faults enabled in SL3
      • To get full exceptions, use ClientHttp stack
      • Security in cross domain scenarios enabled
        • Normally use browser-managed security (generally not safe for cross-domain use)
        • Transport security with message credentials in cross-domain scenarios
          (Browser never sees the credentials and can’t cache it for malicious things)
  • Chat app (System.Net)
      • Duplex Messaging
        • Server push is compelling when server has to notify client of events (email server)
        • Internet: PollingDuplex (HTTP-based)
          • SL4 – performance enhancements and scale across machines (for azure)
        • Intranet: NetTcp (TCP sockets based)
          • Also works for request / reply services
        • Both of above use same programming models, just need to change the binding
  • Streamed data (video, stock prices) inside an intranet  (System.Net)
    • Multicast Messaging
      • Scales to a large receiver population
      • Two key shapes
        • Single source multicast
        • Any source multicast
      • Need to expose a policy responder (just like sockets and http)
        • SL4 – policy file is going away for both sockets and multicast if app is elevated

@PDC09 – Day 2 – Developing Advanced Applications with Windows Azure

                                                                   (Rough notes from the session)

By Steve Marx, Technical Strategist, Microsoft Corporation

LB –> Web Role + Worker Role

Official shipping version of the Table Storage SDK is available now

What we’ll Build – Search application using IIS + SMTP  + Web and Worker Roles

  • Three role architecture
    • Web UI (ASP.net MVC)
    • SMTP Server (TCPListener)
    • Search (Lucene.NET)
  • New Features we’ll take advantage of
    • Inter-role communication
    • Non-HTTP endpoints
    • Role instance lifecycle
    • VM sizes
    • Local storage

HOW TO: Model your application

  • Draw the boxes and arrows
  • Each box is a role
    • Which receive traffic from the internet
    • Which need IIS?
    • Which receive internal communication?

Receiving Traffic. Input Endpoints

  • Different ports on the same domain
  • Always load balanced
  • Declared in ServiceDefinition.csdef
  • Handled by IIS in web roles
  • Handled by your code in worker roles
  • API to find

The instance could should always be atleast 2 or else SLA isn’t valid.
Azure Storage Explorer in codeplex

Input Endpoints Demo :  Set the configurations in the xml file

As an Aside about Email

  • Spammers will use Windows Azure. (sending email should not be done via azure as the IP is not trusted)

Asynchronous work without a Queue

  • Queues deliver messages to one worker
  • We need every worker to see the messages
  • Use a table instead
    • build your own secondary index
    • order references
    • (Beware of clock drift!!)

HOW TI: DO Initialization

  • don’t want traffic until we are listening
  • role instance lifecycle lets us prepare
    • both web roles and worker roles
    • OnStart() - “busy” state, initialization
    • Run() – do work
    • OnStop() – traffic stops, graceful shutdown

HOW TO: Internal Endpoints

  • Declare endpoints in servicedefinition.csdef
  • API to find out what port to listen on:
    RoleEnvironment.CurrentRoleInstance.InstanceEndpoints[“”]

For internal endpoints always rely on the API to provide the port number, do not assign any port number.

HOW TO: Get more RAM

  • RAMDirectory puts everything in memory
  • If we have lots of data, we need lots of RAM
  • Choose among four VM sizes:
    • Small
    • Medium
    • Large
    • Extra Large
  • Simple edit to servicedefinition.csdef
    <WorkerRole  vmsize=”ExraLarge” />

HOW TO: Save the Index

  • Lucene.NET writes files to the local system
  • Preserve those across reboots/upgrades : 
    <LocalStorage cleanOnRoleRecycle=”false” />
  • Consider writing state on OnStop()
    (this is the to write I was on record XX and save the last state)

Using In-Place Upgrade

  • Rolling Upgrade
  • Specify which roles to upgrade
  • Keep local storage intact
  • Great for stateful roles


Call of Action:

  • Any instance can talk to any other
  • Don’t need IIS to listen for traffic
  • Use the role instance lifecycle
  • Choose different VM sizes
  • In-Place upgrades

@PDC09 – Day 2 - Keynote


These are some very rough notes from the today’s keynote at PDC 09’ . . . .  

Topic : Windows 7

  1. Developing windows 7
  2. developing for windows 7
  3. looking forward

Developing windows 7 : Learning

  • Solving problems + innovation
  • “Engineering 7” dialog
  • Ecosystem readiness
  • Developer pre-beta, beta, RC rhythm
  • Telemetry
    • Send feedback button
    • hardware and device diagnostics
    • reliability analysis component (RAC)
    • software quality monitor (SQM)
    • windows error reporting (WER or “Watson”)

Behind the scenes - “funny video”

  • push pin chairs
  • electric chairs

Telemetry figures (this one was interesting)

  • 514 million times the start menu was clicked (last 6 months)

Developing windows 7 : Research

  • Surveys, market studies
  • Reviews, blogs, commentary
  • Segment engagements
  • follow me home
  • Baseline studies
  • prototype testing, usability testing

Feature explanations and their videos on why they were added : \

  • UAC – Choose when to be notified
  • Windows Management – Tiling, Shake window

Ecosystem Energy – Michael Angiulo

All hardware demos discussing the hardware optimization and enhancements done

Making of a laptop : hardware / software

Announcement - FREE Acer Notebook Laptops with Windows 7 for all attendees !!!!

IE-9 already in progress
- ACID3 (32/100)   IE-8 had (20/100)
- multi system performance (picture)
IE-9 Demo

Windows 7 : Call of Action

  • Integrate with windows 7 desktop
  • develop for 64 bit
  • focus on fundamentals in your code
  • build on new API’s in windows 7

(today – channel9 videos on IE-9)

Scott Guthrie enters in and a huge applaud and woooh from the crowd !!!!

Silverlight 3

  • Sketch flow

Silverlight on 45% of internet PC’s

Announcement : Silverlight 4

Silverlight 4 Beta Download : http://silverlight.net/getstarted/silverlight-4-beta/
Silverlight 4 Training Course : http://channel9.msdn.com/learn/courses/Silverlight4/

Below are the new feature List :

  • Media
    • webcam and microphone
    • multicast streaming (IIS smooth streaming)
      • source of silverlight media player is on codeplex
      • publish media on variety of devices (apple iphone)
    • output protection
    • offline DRM
  • Business applications
    • Printing
    • Rich Text
    • Clipboard Access
    • Right Click
    • Mouse wheel
  • Application development
    • implicit styles
    • drag/drop word files into the rich text editor control
    • bidi & rtl
    • HTML control inside silverlight
    • commanding and MVVM
    • additional controls
    • print preview dialogs
  • Data and Networking
    • share assemblies across SL and .Net 4 with just 1 time compilation
    • Data binding improvements
    • UDP multicast support
    • REST enhancements
    • WCF improvements
    • WCF RIA services
  • VS 2010
    • full WYSIWYG design surface
    • XAML intellisense improvements
    • data binding, layouts, styles

Demo of Silverlight 4 (RIA and databinding) by Scott Hanselman
Snapflow.com demo

  • Beyond the browser (outside browser features)
    • windowing API’s
    • notification popups
    • HTML support
    • Drop Target
    • Running outside sandbox for outside browser application (Trusted applications)
      • Custom window chrome
      • local file system
      • cross-site network
      • keyboard in full screen mode
      • hardware device access
      • COM automation Support (e.g using dynamic keyword in .net 4.0 for office and geolocation API’s)
  • Silverlight 4 Performance
    • Twice as fast
    • 30% faster startup
    • new profiling support

Silverlight SDK for facebook published last week

Reference facebook application would be shipped soon (excellent application demo)

Schedule for Silverlight 4

  • Beta – Now Available
  • RC  -
  • Final  - Mid next year

Kurt Delbene – Office and SharePoint 2010

Microsoft Business Productivity Infrastructure

Announcement – SharePoint2010 Beta available now !!!

SharePoint 2010 Public Beta Download : http://technet.microsoft.com/en-us/evalcenter/ee388573.aspx

Tuesday, November 10, 2009

SharePoint 2010 Developer Training (for FREE)


Another gem coming out of the Channel9 Learning Center Courses is the new ‘SharePoint 2010 Developer’ Course. The course material is presented by Ted Pattison and Andrew Connell themselves which makes it even more interesting.
Currently there are around 37 videos along with the presentation decks being posted on various improvements done in SharePoint 2010 around many areas like :

  • Visual Studio Tools for SharePoint 2010
  • UI Enhancements
  • Lists and Schemas
  • LINQ to SharePoint
  • Client Object Model
  • Workflow
  • Services Architecture
  • Accessing External Data
  • Enterprise Content Management
  • Extending Search
  • PerformancePoint Services
  • Sandboxed Solutions
  • SharePoint 2010 Security

The videos would soon follow by the Hands On Labs, Source Code and other materials for ITPro’s as well, so keep watching the updates on this course . . .

Monday, October 26, 2009

Visual Studio 2010 (Beta 2) – First Look


Here are some screenshots of VS 2010 Beta 2 (Ultimate) and some of the new features coming along with it :

I just liked the new curvy splash screen . . .

splash screen

That is the new ‘Startup’ Page. If you are new to Visual Studio or want to know ‘What’s New’, this page has ton’s of information to get you started and also lots of guidance and resources links for various platforms including Windows, Web, Cloud, Office, SharePoint and Data.

startup 1

image

Here is the Project Templates Screen. A bunch of templates are now included out-of-the-box in VS 2010 including Cloud, SharePoint, Silverlight and off-course the new Visual F# templates for Windows & Silverlight applications

image

Some of the new Explorer’s including the ‘Architecture Explorer’ and other windows – F# Interactive, Performance Explorer, Code Metrics Results 

image

Performance Analysis as well as the much interesting ‘IntelliTrace’ feature. Find out more about IntelliTrace here

image

Performance Analysis Report. . .

image

The ‘Generate Dependency Graph’ feature which generates a DGML document, part of the Architecture Tools in VS 2010

image


Also you can downloaded the Visual Studio 2010 and .NET Framework 4 Training Kit - October Preview which has lots of Presentations & Demos on many of the new features and language enhancements coming up in .NET 4.0

image

image

Wednesday, October 21, 2009

SharePoint2010.Microsoft.com & SharePoint2010 Resources


Since last 2 months Me and my team went through an exciting journey of migrating the existing Sharepoint.Microsoft.com site (which we created a while back) to the upcoming version of SharePoint, i.e SharePoint 2010.

image

When we started the project, the product was hardly in its beta stages. So we had a bit of struggle initially to understand some of the advancements but overall with the excellent support from out college Todd and the MS team we not only understood the product well but also successfully launched the site just before the SharePoint Conference 2009.

There are various materials out now to know more about SharePoint 2010.

Andrew Connell has posted some great articles on his blog explaining some of the new advancements done in the product :

There are bunch of resources including the SharePoint 2010 (Beta) Developer center and other links on the Microsoft SharePoint Team Blog as well as,
Paul Andrew has posted some really good links of a white paper by David Chappell, SharePoint 2010 Developer Platform Post and many other resource links here

We are about to start the Phase II of the project and would be adding cool new features on the 2010 site showcasing some of the new advancements of the product, so stay tuned . . . . . 

Sunday, October 04, 2009

VS2010 & .NET 4.0 Sneaky Features


A must watch features Video from Mr. Guthrie himself on VS2010 & .Net 4.0 

  • Parameter Usage Highlighting
  • RegEx based Intellisense Filtering
  • View Call Hierarchy for Methods
  • Vertical Text Selection
  • Consume First Intellisense Mode
  • Snippets for Markups & JavaScript
  • Debug History
  • .Net 4 (New CLR)
  • Search Project Templates on Online Gallery
  • VS Web Development (Code Optimized) Profile
  • URL Routing in Web Forms
  • IIS SEO Toolkit
  • XML comments in Intellisense within JavaScript file
  • Dynamic named variable Intellisense in JavaScript
  • T4 Template customization in ADO.net Entity Framework
  • LINQDataSource + QueryExtender Control
  • DynamicValidation of data
  • New Markup Syntax for automatically HTML encoding . . <%: Message %>

Lots more in the Video so check it out. . . .

Monday, September 07, 2009

Diving & Exploration


Gems which I found last month :

  1. Scott Hanselman's 2009 Ultimate Developer and Power Users Tool List for Windows
    If you are a MS developer you would know Mr. Hanselman and this popular post series wherein he lists out some of the most powerful tools for windows.
  2. 50 Windows 7 tips, tricks and secrets
    One stop shop of all the cool features of Windows 7.
  3. Cloaking your ASP.NET MVC Web Application on IIS 7
    Here Howard explains the security aspects of a publish facing web application and how we can change the header information of an ASP.net MVC application on a WISA (Windows, Internet Information Services, SQL Server, ASP.NET) Platform
  4. The role of a hands-on software architect
    This is an excellent article from ‘coding the architecture’ community explaining - “What should a hands-on software architect do?” in various aspects of project life cycle.
  5. 10 Things Every Software Architect Should Know
    This is an excerpt from the Richard Monson-Haefel’s 97 Things Every Software Architect Should Know,  where he collaborated with over two dozen authors to collect 97 axioms of software architecture

Friday, September 04, 2009

SOS debugging extension on 64bit Applications


Recently I got into a problem running the SOS on a 64bit Virtual Machine. Visual Studio gave the following message :

---------------------------
Microsoft Visual Studio
---------------------------
Error while trying to run project: Unable to start program '<app path>'.

The debugger does not support debugging managed and native code at the same time on this platform.
---------------------------
OK  
---------------------------

Binging’ around I found that there is a known issue in Visual Studio 2008 Mixed Mode Debugging for 64bit Applications. Since to run the SOS we have to ‘Enable unmanaged code debugging’, hence the issue.
The only way I could make it working with VS 2008 was by changing the Platform Configuration to x86.

Tuesday, September 01, 2009

Spec# - Code Contracts in .Net 4.0


Spec# is a formal language for API contracts (influenced by JML, AsmL, and Eiffel), which extends C# with constructs for non-null types, preconditions, postconditions, and object invariants.”

Code Contracts is a library which provides a language-agnostic way to express coding assumptions in .NET programs and would be included as part of the base class library in .NET 4.0. The contracts can be called as a subset of Spec# and take the form of preconditions, postconditions, and object invariants”

Let’s see how an we leverage code contracts. After installing the code contracts create a new VS Project (I used a console app here) and add the reference to ‘Microsoft.Contracts.dll’, which you would find in ProgramFiles\Microsoft\Contracts\PublicAssemblies\v3.5.
Then enable the Static Contract checking in VS (which is the whole purpose of contracts, validating things at compile time rather than runtime). Goto –> Project Properties and you check the options as shown below :

image  

Now lets see some quick examples of precoditions, postconditions and object invariants . . .

Preconditions - What does it expect?
As the name suggests, precoditions are contracts to ensure that the expected data is provided while performaing an operation.
e.g. :

image

Postconditions - What does it guarantee?
Postconditions are contracts to ensure certain conditions are met just before exiting an operation.
e.g. :

image

Object Invariants - What does it maintain?
Object invariants express the conditions under which the object is in a good state.
e.g. :

image
(In the above customer class we have an invariant contract to check that the ID should always be greater than zero, which is being called after each public method calls and validated)

Interface Contracts
Code contracts can also be applied to Interface methods by creating a sealed classes as shown below :

image

There are many other methods in the Contract class which could be used in many other scenarios. Checkout the documentation of this library and Matthew’s blog post for more details.

Sunday, August 16, 2009

Gartner's 2009 Hype Cycle


Last week ‘Gartner’ published its 2009 Hype Cycle report which is by far the Largest to Date With the Expansion of New Topics. Gartner, Inc. has examined the maturity of 1,650 technologies and trends in 79 technology, topic, and industry areas.



No doubt ‘Cloud Computing’ is at the peak of the hype since almost every major players in the industry are talking about it and building their long term strategy around providing cost effective and reliable services over cloud.

It is interesting to see that Surface Computers and 3-D Printing are climbing high while Microblogging and Green IT are slopping down the peak.

Here is the detailed analysis of the report and if you have seen this report first time read these details to better understand the report.

Wednesday, August 12, 2009

First Look at - Silverlight SDK for Bing


Recently I downloaded and tried the ‘Silverlight SDK for Bing’. The SDK includes a very cool application with it, which basically demonstrates some of the new controls from View Control Toolkit and some of the advanced data metaphors shown in the Bing search component. Here is how the application looks :

image
with search results . . .

image

The most interesting stuff that I found in the SDK is the View Control Toolkit, which includes many reusable  controls for Silverlight for overall enhancing the visual metaphors. Below are some screenshots of those views :

  • StackView : This is very similar to a Listbox but the cool thing in StackView is that it has a build in vertical blind-style animation for each item, which fires in sequence as the items are added.
    image
  • TileView : This control also has a cool seek-from-origin style animation for each item, which fire in sequence as the items are added.
    image 
  • CloudView : This view displays the results with dual axis, one being Relevance and other is configurable based on data type. CloudView also provides a simple magnification function so that items can be magnified when clustering occurs
    image 
  • BandCloudView : This view enhances the cloudview by providing a configurable vertical and horizontal axis and an extensible model using flexible data binding and sorting. The difference between CloudView and BandCloudView is that in CloudView, items are arranged free form across a fluid Cartesian surface. In BandCloudView, items are arranged in vertical bands based on granular division. Items in each band are arranged horizontally within each band as if each band were a horizontal list. It also has a cool item animation, which animates the items from the center of the view at data binding time.
    image

The crux of all the animations in all these views is the “MultiView” control which essentially is a stack of MultiView Panel controls which animates panels into views.

The SDK also includes a detailed help on all the components with examples in both C# and VB. So to get started first you would need to create a Bing AppID, then download the Source Code and change the AppID in the SearchEnvironment.cs file - line 105 and get silvery binged  :-). . . . .

Sunday, August 02, 2009

Diving & Exploration

Gems which I found last month :

General:


Security :

Wednesday, July 29, 2009

Managing Azure Storage with ‘Cloud Storage Studio’


Recently I had an opportunity to explore the private beta of ‘Cloud Storage Studio’ by Cerebrata

Cloud Storage Studio is a WPF app which allows you to manage your tables, queues and blob containers for Windows Azure Storage. Although there are limited features right now in the app but I really liked the overall simplicity and ease of use. 

 image

Also there are various configuration settings available which can be applied on all Tables, Queues and Containers like Maximum Tables, Entities, Queues and Blobs per Request, Request Timeout.

The one that I liked the most is the Block Size Settings for Upload/Download Blob Size. This is very important when you are uploading a large chunk of blob data. The CSS would automatically divide a large Blob data in block based on this configuration so that its faster and easier for uploading.

image 

I would definitely recommend everybody to get its private beta from here,  try out yourself and provide your valuable feedback as they are really listening with big ears :-)

Also I had a chat with Gaurav Mantri (owner of Cerebrata) about the upcoming features and vision of CSS and believe me it was super exciting, so please stay tuned and keep your eyes on this . . .  

Thursday, July 23, 2009

“Gestalt” - Writing XAML code inside your HTML


Gestalt is a library released by MIX Online Labs that allows you to write Ruby, Python & XAML code in your (X)HTML pages. It enables you to build richer and more powerful web applications by marrying the benefits of expressive languages, modern compilers, AJAX & RIAs with the write » save » refresh development model of the web.”



My First Thoughts:

· It’s a great entry point for someone to learn and try out XAML (especially for web designers)

· It is not so intuitive for building complete business apps in something like silverlight


Any more thoughts are welcomed  !!!

Cheers . . .

Monday, July 13, 2009

SharePoint 2010 Sneak Peek . . . .


Last 2 weeks were full of excitement, thrill, lots of sleepless nights and several barrels of fluids . . . . all this for :

image

The SharePoint 2010 Sneak Peek site is launched today. The site previews some of the upcoming features in SharePoint 2010. Again a good project completed with an excellent team . . .

Cheers . . . . .

Saturday, June 20, 2009

Opera Unite - Reinventing Web?


Opera Unite : “A new technology that shakes up the old client-server computing model of the Web”.

Opera unite provides the following services:


Here is good post on installing and configuring these services. The only service that I felt interesting was the ‘Web Server’. So I tried it and the first cut really went well. Below is the link of a file hosted on my laptop by unite:
http://home.jomitvaghela.operaunite.com/webserver/content/

My first impression:
While the services being offered are not at all new, the crux here is the ease of sharing this from your own device using a simple browser.


Try it out yourself and share your thoughts. . . . .

Friday, June 19, 2009

Rebuilding Microsoft.com/SharePoint


Since last couple of months I, along with my wonderful team including
Todd, Vivek, Meeta and Ritu had been working with Tony on rebuilding the Microsoft's SharePoint web site.

The web site went live last month :
http://www.microsoft.com/sharepoint . . . .


and now, there is also a 'How we did it' article on MSDN describing goals and technicals details of how we developed all the pieces and fitted it together.

Tuesday, June 02, 2009

Loading .xap files OnDemand using Composite Client Application Guidance (PRISM)


One of the challenges of porting large business applications on silverlight is the size of .xap file. A typical business app would have multiple screens, rich data visualization and lots of user interaction which would in turn increase the overall size of the xap file. Also it would have users with multiple roles and each role would have specific permissions to specific screens. 
So wouldn’t it be nice to divide the entire app into multiple silverlight modules and than load them only when required  ? This is where PRISM can help us . . .

Composite Client Application Guidance (PRISM) provides us a rich framework to divide a silverlight application into various Modules and also load them ‘on demand’. A module can be a separate silverlight app. You can watch Erick’s video for creating the basic structure of a PRISM Project.

The solution structure for our scenario would be a bit different with multiple Silverlight Applications linked to a Single Web App as below :

image

image

Now what we need is a Default View which would be loaded first and than some triggers/events which would load the other on-demand views. 
In our case “DefaultView” is in “MyPortal” app and the “VoterModule” inside MyVoterModule Application would be loaded on-demand when a button is clicked from “DefaultView”.

Next, we need to add our Modules into the ModulesCatalog :

image

ModulesCatalog.xaml

 image

The important thing to note here is that we can create groups of modules and than can specify when do we want to initialize the modules being loaded in that particular group. We can also add modules via code instead of loading it from a xaml file.

Than we need to create some event on the DefaultView which would load the VoterModule. I have created a simple button as under, but we can also add more complex business logic to drive the loading of modules :

image

That’s all we need. The VoterModule would add the appropriate view onto the region and since we have specified to load this “OnDemand” the entire .xap for that application would be loaded when we click on the button.

We can also verify this using Fiddler . . .

Sunday, May 10, 2009

Diving & Exploration


Internet is like a deep ocean with many hidden gems so I just thought to wear my scuba suit and find those gems and share them. This is what I found last month :

Sunday, March 15, 2009

Re-Sizing .VHD Files


While creating a Virtual Disk (.VHD) for Virtual PC we need to allocate a maximum size for both Dynamic and Fixed sized disks. Now once we set this size it’s really difficult to change it. I had a similar issue last week and luckily I happen to find a solution for it which I am going to share here.

Firstly we would need the Vhd Resizer tool from the vmToolkit. This tool would copy sector by sector all the contents of a VHD and create a new VHD with the new size.

vhdresizer

Once the resize is complete the added GB’s/MB’s would be shown as an unallocated partition in the new VHD file. (To view the partitions, start the VPC (with the new VHD) -> Right Click My Computer > Click Manage -> Disk Management)
Now to merge this unallocated partition we need to use a command line utility ‘diskpart’ as follows:

Open command prompt and type diskpart, press enter and you would get this prompt

diskpart

· Type list disk (this would list all the disks)

· Type select disk # (select the disk number in which you want to merge the unallocated partition)

· Type detail disk (this would display all the volumes of the disk)

· Type select volume # (select the volume number in which you want to merge the unallocated partition)

· Finally Type extend (this would merge the unallocated partition on the selected disk & volume)

Open the Disk Management again and you should see the new size of the VHD. We can also use other tools like Partition Magic for merging the unallocated partitions.

Friday, March 06, 2009

How to create context menus and capture right click event in Silverlight


Context menus & right click event is something which is not out of the box supported in silverlight but I think they prove to be very crucial while developing LOB applications. So here is a workaround on how you can create them. Basically I am using HTML/Javascript to create and render menus on top of silverlight but it involves a few tweaks which are listed below.

First tweak is – How to display a HTML Menu on top of silverlight control.
For this we need to change 2 properties on the .aspx or .html page where the silverlight control is being hosted.

      <param name="background" value="transparent" />
  
<param name="windowless" value="true" />


Than capturing the right click event in HTML and displaying our menu.

<
script language="javascript">

  function click(e) {
     if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2) {

                var menu = document.getElementById('myMenu');
                menu.style.left = event.clientX + 'px';
                menu.style.top = event.clientY + 'px';
                menu.style.visibility = 'visible';
                return false;
            }
            return true;
  }
  document.onmousedown = click

</script>

'myMenu'
is a <div> I have created on the html page which contains a simple table as below:

<
div id="myMenu" style="position: absolute; visibility: hidden; width: 75px">

   <table width="100%" style="background: #000000" cellspacing="1" cellpadding="1">
    
<tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand">
             
Edit
        
</td>
    
</tr>
     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              Save

        
</td>
    
</tr>
     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              ________

        
</td>
    
</tr>


     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              Exit

        
</td>
    
</tr>

   </table>


</
div>

The SomeFunctionWhichCallsSilverlight() function would be the interop function to call the relevant Silverlight function as described in my earlier blog.

Now the last thing is to disable the default ‘SilverlightConfiguration’ menu

<body oncontextmenu="return false">


You can download the sample code from here

Monday, February 23, 2009

‘OneNote on Cloud’ – First bits deployed on MESH


I have deployed the first bits of my OneNote application on Cloud. Currently I have created a very basic version with Pen / Text for writing the notes.

onenotemesh

Overall the aim is to get the know how of Windows Azure platform including .Net Services, Mesh Enabled Web Applications (MEWA) and SQL Data Services.

 image

I have already created the SDS Proxy WCF Service. So the next step is to configure and deploy it on Azure. Than finally to tie all the pieces together . . .

Wednesday, February 18, 2009

Accessing SQL Data Services from Silverlight


“OneNote on Cloud”…  This is something I have started exploring on since last couple of days. 
The idea is to have a OneNote type application experience on web, using Silverlight and SQL Data Services.

The first hurdle was to access SDS from silverlight. We can’t directly use the SDS from silverlight because of some known limitations. So the option that I thought of was to use some Proxy Services in between the Silverlight Client and SDS, which was also suggested by the guys who developed the Omega.SDSClient

Now there are few gotchas while developing these proxy services for silverlight client which I am listing below :

  1. We need to Change the service bindings to ‘basicHttpBinding’ as silverlight doesn’t support any other bindings.
  2. We need to set the AspNetCompatibilityRequirements attribute to ‘Allowed’ for all the service implementations
  3. (If we add the services using the ‘Silverlight-enabled WCF Service’ template than the above changes are done automatically.)
    silverlightenabledservice 
  4. The last thing is to add the cross-domain policy file at the root of in case of IIS hosted services it should be on the root of the mapped directory. 

     crossdomainfile

    The important thing to note in this file is the SOAPAction headers which are required to be enabled for SOAP based messages transfers from silverlight.

Friday, February 06, 2009

Getting started with ‘Microsoft Surface’ development


This week I went on a roller coaster ride of formatting & configuring my laptop for Surface development. I will just brief out the steps that I had to do before installing the Surface SDK 1.0 :

(You would need a monitor that is capable of 1280 × 960 screen resolution or a widescreen monitor that is capable of 1440 × 900 screen resolution to start the Surface Simulator)

Now lets build our first surface application using Visual C# 2008 Express Edition :

  1. Under the Create New Project you should be able to see couple of VS Templates for surface apps:

    new project 
  2. Select the Surface Application (WPF) and you would see the default template as below :

    template
  3. The First interesting control to look at is the ScatterView control.
    (The ScatterView control is the control that you should use when you have one or more UI elements that you want users to be able to move, rotate, or resize freely within a fixed area)

    scatterview
  4. Once you build the application first open the Simulator and than press F5 to run the application and it would automatically get displayed on the simulator . . .

    surface
    As you can see I have added multiple fingers on the screen so you can use your mousepad (on laptop) and your external mouse as two fingers and than can stretch or rotate the images . . . .

Enjoy Learning !!!

Thursday, January 29, 2009

Disposing SharePoint 2007 and WSS 3.0 Objects


Here is an excellent article by Roger Lamb explaining the various design patterns to be used for disposing various SharePoint and WSS objects before deploying to the production environment.
Some of these may cause serious implications and memory leaks if not addressed correctly. In particular there are 3 objects to be taken care of,  Microsoft.SharePoint.SPSite , Microsoft.SharePoint.SPWeb and Microsoft.SharePoint.Publishing

There are also couple of White Papers by Scott Harris's on MSDN for more details:
Best Practices: Using Disposable Windows SharePoint Services Objects
Best Practices: Common Coding Issues When Using the SharePoint Object Model.

Also recently there is a Tool published on the MSDN Code Gallery which provides assistance in correctly disposing of certain SharePoint objects to help us follow these best practices.

SPDisposeCheck.exe is a command line tool which takes the path to a managed .DLL or .EXE or the path to a directory containing many managed assemblies. It will recursively search for and analyze each managed module attempting to detect coding patterns based on the MDSN article.

Below is the screenshot of the actual output generated which running the spdisposecheck on the sample exe. Reading the command line output is a bit tedious. Although the documentation states that this tools has an -xml option to output the details to an xml file but it doesn't seem to work for me..SpDisposeCheck

Friday, January 23, 2009

Live Mesh Beta & Live Mesh Tech Preview


I just installed the Live Framework SDK and started playing around with the Live Mesh and came up with some interesting things to share.

The first thing to remember is that "Live Mesh Beta" and "Live Mesh CTP" are two different Mesh Environments.

The Live Mesh CTP : https://developer.mesh-ctp.com/ installed from the Live Framework SDK is a developer sandbox environment with limited options and doesn't include the File/Folder Synchronization functionality.  

The Live Mesh Beta : https://www.mesh.com/ is preview environment with full set of options including the File/Folder Synchronization functionality. 

For developing Mesh Applications we have to use the Live Mesh CTP only.

If you have registered for both these services than probably you would have 2 clients installed on your machine :


clients

Initially while signing in for the Live Framework client I got a message box popup saying :

---------------------------------------------------------------------------------
Unable to sign in to Live Mesh.

Please make sure your user name and password are correct.

Request to MOE failed with return code "0x80070005"
---------------------------------------------------------------------------------

Finally I got this resolved by disabling the antivirus software running in the background and now my laptop is "meshified" and ready to mess around inside the sandbox :-)  

mymesh

Thursday, January 08, 2009

Free eBooks at CodePlex

 
(From : Wriju's BLOG )


· Application Architecture Guidance

· Enterprise Library

· Guidance Explorer

· Performance Testing Guidance for Web Applications

· Smart Client Guidance

· Team Development with Visual Studio Team Foundation Server

· WCF Security Guidance

 

· Acceptance Test Engineering Guidance

· Common Service Locator

· Composite Application Guidance for WPF

· Design for Operations

· ESB Guidance

· GAX Extensions Library

· Performance Testing Guidance Project

· SharePoint Development Guidance

· Unity Application Block

· VSTS Guidance Project

· Web Client Software Factory

· Web Service Software Factory

Monday, January 05, 2009

Bits on 'Cloud Computing' . . . . . !!!


So What is Cloud Computing ?

"Cloud computing is Internet-based ("cloud") development and use of computer technology ("computing"). The cloud is a metaphor for the Internet, based on how it is depicted in computer network diagrams, and is an abstraction for the complex infrastructure it conceals."

Live Services, Live Mesh, Live Platform, Windows Azure, SQL Services, .Net Services . . .
these are some of the titles associated with the cloud offerings from Microsoft.

So where should we start from ?

I would recommend to start with the Live Framework. Here is a brief description of some of the basic concepts of live framework including some of the common application models and different flavors of Live Operating Environments available today. ( What is Live Framework and Why Should I Care? )

( Mike Taulty has written some good posts describing his development experience with Live Framework SDK which might be useful for all. )


The next step could be to explore the Azure Services Platform, which includes .Net Services, SQL Services, SharePoint Services and Live Services as well. 

azureservicesplatform

( Here is a good list of Links and Resources from Sriram Krishnan on Windows Azure. )

Tuesday, December 30, 2008

Loading & Unloading Assemblies from GAC on runtime


Recently we developed a tool for Inspecting whether the system has the required components for Silverlight SharePoint Integration.
This tool provides a checklist of things which are required & not installed on the users system and then allow the user to install them and re-run the Inspection.

The tricky part was to re-run the inspection for the assemblies in GAC. We were using the Assembly.Load method to dynamically load the assemblies from GAC and than just have a null check against it.
But the issue was that once we load the assemblies it doesn't allow to unload it. Which means that this would not work as expected when we try to re-run the inspection and try to re-load the same assembly within the same application domain.

The solution was to create a separate application domain and than load the assembly in that appdomain and than unload the appdomain once used.

Here is a sample code of the Inspection button click :

image

Wednesday, December 03, 2008

Creating a Tag Cloud in Silverlight


For one of our Data Visualization projects I wanted to create a Tag Cloud type UI in Silverlight. Googling around I found this very nice article on this.

I decided to reproduce the user control so I could learn more about Silverlight and also added few customizations and some mouse enter and leave events to highlight the selected tag.
I also made some other small modifications to clean up the code a bit.

Here is the screen of the control :

tagcloud

You can download the source code from here.

Sunday, November 30, 2008

‘Concurrency’ – The elephant in the room . . .


Concurrency is one of the biggest challenges the industry is working on now days. Anders mentioned about the details of this in his talk ‘Future of C#’ at PDC.
So what’s the problem about?

Concurrency is about doing multiple tasks simultaneously. Most of our applications today do this asynchronous programming using multiple threads/processes but they all work on a Single CPU.
This worked fine until now as the single CPU’s were getting faster and faster as per the Moore’s Law and hence the applications would also just run faster without us having to do anything.

But now we are facing some physical limitations increasing the speed of a Single CPU. So to increase the processing power we need to have multiple CPU’s in a single machine. Hence we are already getting many core machines with 2, 4, 8 to 64 CPU’s.

So how does this impact us as a Developer?

With this solution in place the traditional asynchronous programming isn’t going to help us scale our applications. We would have to create programs which can divide their workload into tasks that can be executed in parallel on Multiple CPU’s.

Parallel FX (PFX)

Microsoft is developing a number of technologies to simplify parallel programming. Parallel Extensions for the .NET Framework (PFX) is an example of this. It is a managed programming model for data parallelism, task parallelism, scheduling, and coordination on parallel hardware. This technology was first discussed by Anders Hejlsberg and Joe Duffy in Oct 2007 and was initially provided as an extension library but it’s now deeply integrated into the .Net Framework 4.0.

Task Parallel Library (TPL)

The basic unit of parallel execution in the TPL is a ‘Task’. The Parallel.For() and Parallel.ForEach() static methods create a Task for each member of the source IEnumerable and distribute execution of these across the machine’s available processors using User Mode Scheduling.

ParallelFor

Parallel LINQ (PLINQ)

We can setup a LINQ query for parallel execution using PLINQ. We just need to wrap IEnumerable<T> in an IParallelEnumerable<T> by calling the AsParallel() extension method.

PLINQ


Daniel Moth did an excellent presentation on PFX at Tech-Ed which you can watch here.

For more details you can go to the PFX Team blog site which contains lots of videos and tutorials on parallel programming.

Monday, November 17, 2008

First Look at - "Windows 7"


Install Experience :

1

2

3

Its just a 2 step pretty smooth installation procedure. Took me about an hour to finish the entire thing.
The theme and the UX looks similar to Vista with a few tweaks here and there.

The wordpad has the office ribbons and the calculator has a new UI with additional modes :

wordpad_calc

Another good feature is the new search capabilities.
Open the search and type this " How much RAM is on this computer " -> and than click on the result link . . . .

search

that would take you to the system properties . . . isn't that cool !!!

There are many other refinements to poke around so worth having a look . . .

Monday, November 10, 2008

'System.Dynamic' namespace missing on VS2010 CTP

Finally I got my hands on all the materials from this year’s PDC including the VPC with VS 2010 CTP, Oslo, WF & WCF 4.0 and other bits.

The first thing I wanted to try out was the new ‘dynamic’ keyword and the creation of dynamic classes but I found that I can’t seem to refer to the ‘System.Dynamic’ namespace as mentioned in Anders Session.

Googling around I found the resolution around this issue here. I just had to slightly modify the code to include a generic dictionary for the dynamic property dispatching as below :

dynamicobject


Enjoy dynamic learning,

Sunday, November 09, 2008

Webcasts on Oslo, WCF, WF (.net 4.0) & Dublin


Just found these 2 webcasts by Alan Smith reviewing some of the recent bits provided from PDC 08 :

Enjoy Learning !!!


Wednesday, October 01, 2008

Simple Introduction to Extensible Applications with the Managed Extensions Framework

Here is a excellent post from Brad Abrams explaining the Managed Extensions Framework (MEF)

“The Managed Extensibility Framework (MEF) is a new library in .NET that enables greater reuse of applications and components. Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed.”

Simple Introduction to Extensible Applications with the Managed Extensions Framework

Monday, September 29, 2008

Run a Server Side Code and Open a Popup Window onClick of a Link in Asp.net


There are 3 ways we can achieve this :

1) Create a LinkButton and add both client side as well as server side onclick event handlers :

<LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click>LinkButton <asp:LinkButton>

protected override void OnLoad(EventArgs e)
{
LinkButton1.Attributes.Add("onclick", "window.open('test.aspx');");
}

protected void LinkButton1_Click(object sender, EventArgs e)
{
//Server side code here
}

(Problem : Both the events occur simultaneously so if we have a scenario wherein we want the popup to open after the server side code is executed, this isn’t useful)

2) Render the script using Response.Write :

protected void LinkButton1_Click(object sender, EventArgs e)
{
//Server side code here

Response.Write("&lt;script&gt;");

Response.Write("window.open('test.aspx','_blank')");

Response.Write("&lt;/script&gt;");
}

(Problem : In some browsers the CSS of the background window gets affected with this solution)


3) Use the Page.ClientScript.RegisterClientScriptBlock method :

protected void LinkButton1_Click(object sender, EventArgs e)
{
//Server side code

string _url = "test.aspx";

this.Page.ClientScript.RegisterClientScriptBlock(
this.GetType(),
"openNewWindow", "window.open(\"" + _url + "\");",
true);
}

The 3rd one is the most efficient way in my view.

Wednesday, September 03, 2008

Whoa! Google Chrome has crashed. Restart Now ?

Google Crome

This was the first message I got after installing google’s new browser Google Chrome . . . :-)

But since then its working like a charm. . . . . Here are some of the features I like the most :

Thumnail view of the ‘Most Visited’ sites when you first open the browser

Google Crome Most Visited

Opening ‘incognito window’ for private browing (seems similar to IE-8 privacy feature )

Google Crome incognito window

‘Inspect Element’ to see the HTML source code of that element along with the DOM

Inspect Element

Inspector Window

John and Rory have also posted some performance and memory usage benchmarks compared to IE7 here and here.

Monday, September 01, 2008

A Paragraph that explains LIFE . . . .


Recently I got this email from one of my friend which really inspired me and gave a different vision of looking at life . . . . .



Arthur Ashe, the legendary Wimbledon player was dying of AIDS which he got due to infected blood he received during a heart surgery in 1983.

From world over, he received letters from his fans, one of which conveyed: "Why does GOD have to select you for such a bad disease"?

To this Arthur Ashe replied:

"The world over -- 50 million children start playing tennis, 5 million learn to play tennis,
500,000 learn professional tennis, 50,000 come to the circuit, 5000 reach the grand slam,
50 reach Wimbledon, 4 to semi final, 2 to the finals,
when I was holding a cup I never asked GOD 'Why me?'.
And today in pain I should not be asking GOD 'Why me?' "



Happiness keeps you Sweet,

Trials keep you Strong,

Sorrow keeps you Human,

Failure keeps you humble and Success keeps you glowing, but only

Faith & Attitude Keeps you going....

Wednesday, August 27, 2008

WoW64 (Insights from ‘CLR via C#’)

I am currenly reading ‘CLR via C#’ by Jeffrey Richter and would be posting some insights from it as I read along.

Windows 32-bit on Windows 64-bit (WoW64) is an emulation layer that enables 32-bit Windows applications to run seamlessly on 64-bit Windows platforms. Microsoft provides WoW64 to ease the burden of migrating to 64-bit platforms for application developers and to help encourage the adoption of 64-bit computing.”

You can also find the Best Practices Whitepaper for WOW64 which has been recently updated for Windows Vista.

Note: I would hightly recommend every .net developer to read this book at least once.

Monday, August 04, 2008

Interacting between JavaScript and Silverlight 2 functions

How to call a JavaScript function from SilverLight ?

The simplest way which I found is by calling the Invoke method of the HtmlWindow class using the HtmlPage object.

1

As you can see the method take 2 arguments, first being the name of the function and second is the object array for parameters. HtmlPage class is available under System.Windows.Browser namespace.

How to call a SilverLight function from JavaScript ?

Lets take a simple scenario that we need a string trimming functionality on the client side. Since the Silverlight library already has this functionality buildin, we would try to reuse it by exposing a method from Silverlight and calling it from JavaScript.

I have created a separate class for the function to make is easy.

2

The function which we need to access from the client side should be marked with the [ScriptableMember] attribute.


The next step is to register the scriptable objects when the application is started.

3

The Application_Startup event can be found in the App.xaml file. The RegisterScriptableObject inturn calls the :
NativeHost.Current.RuntimeHost.RegisterScriptableObject & NativeHost.Current.BrowserService.ReleaseObject methods for the interop.

Now to access this registered object we need to handle the OnPluginLoaded event and get the reference of the entire silverlight control first.

4

5

Now we can use the silverLightControl object and access the registered methods like this :

6

Does this mean that a Silverlight control could access any of your client side code on the hosting page ?

No, we can disable the silverlight to access any of the html/client side content by setting the HtmlAccess property as below:

7

The default is set to “Enabled”.

Learning is Inevitable !!!

Wednesday, July 30, 2008

ASP.net Performance tuning

Excellent list of 25 Resources for Tuning Your .NET Application Performance ” :

http://effectize.com/23-resources-tuning-your-net-application-performance

One that I liked the most from the list is -

- Speed Up Your Site! 8 ASP.NET Performance Tips (By Jeff Atwood and Jon Galloway )

It covers many interesting topics like :

  • Tracing
  • Compressing the ViewState
  • Storing the ViewState on Server
  • HTTP Compression
  • OutputCache & SQL Cache Dependency etc

Learning is Inevitable . . . .

Sunday, July 27, 2008

using ValidatorHookupControlID() and ValidatorTrim() functions in asp.net Validators

Scenario
Lets imagine a scenario where we have 2 input boxes and we need to validate that atleast 1 of them should contain some value.

image

Solution
Asp.net CustomValidator comes handy here. Here is the code which would help us validate this simple scenario:

image

All works fine except that the validation occurs on the server side. What if we also want this validation from the client side ?

Its simple, create a client side function to validate the same scenario and specify the name of that function in the ‘ClientValidationFunction’ property of the CustomValidator.

image
<asp:CustomValidator ID="validateAddress" runat="server"
ErrorMessage="Please enter atleast 1 Address"
ClientValidationFunction="validateAtLeastOneAddressHasData"
OnServerValidate="validateAddress_ServerValidate1">
</asp:CustomValidator>

This enables the client side validation but there are still 2 issues with the above code :
1) There is no trimming happening in the client side validation code
2) The client side validation is fired only on the button click event.

For trimming there is a function provided by the asp.net validation scripts named ‘ValidatorTrim’ which is kind of hidden and only available once you start the page. This is how we can use it :

textBox1Value = ValidatorTrim(textBox1Value);
textBox2Value = ValidatorTrim(textBox2Value);

Now for the second issue, ideally the client side validation script should be fired on the onblur() event of any of the textboxes. To do that we would have to hookup the textboxes with the CustomValidator.

Hooking the first textbox is simple. Just specify it in the ControlToValidate property and set the ‘ValidateEmptyText’ property of the CustomValidator to true.

<asp:CustomValidator ID="validateAddress" runat="server"
ErrorMessage="Please enter atleast 1 Address"
ClientValidationFunction="validateAtLeastOneAddressHasData"
OnServerValidate="validateAddress_ServerValidate1"
ControlToValidate="txtAddress1"
ValidateEmptyText="True" >
</asp:CustomValidator>

For hooking the second textbox we would have to use a startup script function 'ValidatorHookupControlID as below :

<script type="text/javascript">

ValidatorHookupControlID ( '<% = txtAddress2.ClientID %>',
document.getElementById('<% =validateAddress.ClientID %>')
);
</script>

Wednesday, July 23, 2008

Excellent Whitepaper on : ‘Tools of Agility’

Recently I came across this brief but excellent whitepaper written by Kent Back on Tools of Agility.

I found these two diagrams from the whitepaper very interesting as they clearly explain,
- how the process flow differs in agile practise
- how the different tools are interwoven and support the agile practice


Waterfall

image

Agile

image


Tools to support Agility

image

Learning is Inevitable ! ! !

Tuesday, July 22, 2008

‘Foundations of Programming’ – Karl Seguin


Before few weeks Karl Seguin released an excellent free ebook titled 'Foundations of Programming' which covered many interesting topics focused more around design and coding fundamentals rather than API and framework details like :

- Design Principles
- Domain Driven Design
- Dependency Injection
- ORM's
- Why Unit Testing & Mocking ?

and some really interesting 'Back to Basics' stuff.

And now he also released the 'Foundations of Programming - Learning Application'.

Worth reading material for all . . . .

Thursday, July 17, 2008

Back to Basics - Page_Load & OnPreRender events with nested Web Controls

While working on some refactorings in my recent project I came across a piece of what I would like to call ‘ignorant code’*.

I have tried to get the gist of the scenario with the below diagram :


scenario


Its a pretty basic scenario where we have multiple web controls clubbed together in a single control. (Although I not a huge fan of nested web controls)

What’s important to consider here is the use of Page_Load and OnPreRender events in the Parent and Child web controls.

Probably we all know that Page_Load always occurs before the OnPreRender but the OnPreRender only occurs if the ‘Visible’ property of the web control is set to true.

So in the above scenario although the controls were made visible according to the page, the Page_Load event of all the 7 sub web controls was called everytime. The solution to this is to simply move the hefty code from Page_Load to the OnPreRender event. As the rendering would only occur if the control is visible it would only execute the hefty code on the relevant pages.

*ignorant Code : No code is crap code or bad code its just that we do not know a better way to do it at that point of time

Tuesday, July 15, 2008

Private & Public behaviours with Explicit interface member implementations


Have a look at the below code :

InterfaceCode

Here we are using the Explicit interface member implementation to differentiate the methods.

Now if we try to access these methods from an instance variable. . .

privateIntellense

We can’t !!! Because there is no access modifier specified in the implementation and hence the methods are treated as ‘private’.

So we try specifying the ‘public’ access modifier for these methods but that too generates a compiler error in visual studio !!!

So then how do we actually use any of those methods . . . .

privateIntellenseDone

So what’s confusing here is that although the methods were private they are behaving like public.

ilcode

Finally I managed to find the answer to this behaviour. . . .

Here is a good explanation of this and how the IL code for implicit & explicit Interface Contracts.

Thursday, June 12, 2008

Debugging Assemblies in 'GAC'


Visual Studio requires the program database (.pdb) files to find the debugging information of any assembly. Now to debug assemblies in GAC we can either :

- Create a symbol server and put all the pdb files there and configure visual studio to use it.
- Or else we can copy the .pdb files to the global assemble cache folder.

Now the c:\windows\assembly folder is not the real folder where the files are stored, it is just a virtual folder. To get to the real folder, we need to do the following:

Click: Start -> Run
Type: %systemroot%\assembly\gac [ENTER]

This will open the real GAC folder where the files are saved. Now go 1 level up :

assemblyfolder


Go inside the folder [GAC_MSIL]. Find the folder [assembly Name] \ [assembly version in format of #.#.#.#]__[assembly public key token].

Open the folder and you would be able to see your assembly. Now copy the PDB file to that folder and then attach the debugger and enjoy debugging . . . !!

Tuesday, June 03, 2008

A-Z Guide to being an Architect

While reading the Architecture Journal I came across this excellent list of skills from A-Z which really depicts that architecture is as much about softer skills—good judgment, balance, and other wisdom—as it is about understanding the broad technical landscape, or the skills required to design and implement an architecture.

I have compiled this table to stick it on my desk This would constantly remind me 'where I can imporve myself' . . .

architect

Monday, June 02, 2008

Microsoft's Source Analysis Tool for C#

Microsoft released a Source Analysis tool for C# last friday. It is released under Ms-PL License and can be found at MSDN Code Gallery (Source Analysis 4.2)

Source Analysis covers around 200 best practises and rules around code formatting including line spacing, placement of brackets, file and method headers for documentation and many more. This blog covers more details and future plans for this tool.

One of the rule which draw my interest and made me 'google' around is the 'using' directive ordering rule:

source1

I haven't heard many people recommending this as a good practise and hence I started searching around, trying to find when this rule could be useful.

On my search I came across this interesting blog post by Eric Lippert. The comments in this post also has couple of scenarious when this could be used.

Monday, April 21, 2008

Languages & Runtimes


One of the points on my TODO list is exploring few things around Languages and Runtimes. As a part of it I am going to play around with IronPython for the next few days and would keep on posting any interesting stuff.

I am using the Ben Hall's Getting Started with IronPython to start this adventure

Monday, January 07, 2008

My Company Blog

Please tune in here for my adventures :

http://blogs.conchango.com/jomitvaghela/

Wednesday, June 21, 2006

The Companies have redefined themselves as

1. INFOSYS: Inferior Offline Systems
2. WIPRO: Weak Input, Poor & Rubbish Output
3. HCL: Hidden Costs & Losses
4. TCS: Totally Confusing Solutions
5. C-DOT: Coffee During Office Timings
6. HUGHES: Highly Useless Graduates Hired for Eating and Sleeping
7. BAAN: Beggars Association And Nerds
8. IBM: Implicitly Boring Machines
9. SATYAM: Sad And Tired Yelling Away Madly
10. PARAM: Puzzled And Ridiculous Array of Microprocessors
11. HP: Hen Pecked
12. AT & T: All Troubles & Terrible
13. CMC: Coffee, Meals and Comfort
14. DEC: Drifting and Exhausted Computers
15. BFL: Brainwash First and Let them go
16. DELL: Deplorable Equipment and Lack Luster
17. TISL: Totally Inconsistent Systems Limited
18. PSI: Peculiar Symptoms of India
19. PCL: Poor Computers Limited
20. SPARC: Simply Poor And Redundant Computers
21. SUN: Surely Useless Novelties
22. CRAY: Cry Repeatedly After An Year
23. TUL: Troubles Un Limited
24 CTS: Coffee Tea and Snacks
25. ICIM: Impossible Computers In Maintenance
26. BPL: Below Poverty Line
27. NIIT: Not Interested in IT
FINALLY
ICICI : Incredible Calls from Irate Customers of India

Friday, June 16, 2006

How ASP.NET Web Pages are Processed on the Web Server

Excellent Article to understand this :

http://aspnet.4guysfromrolla.com/articles/011404-1.aspx

Wednesday, May 31, 2006

Good Flash Game

Adjust Things in a Bag :

http://www.funlinx.de/?redirect=2536

Source site : http://www.funlinx.de/


Special Mission

http://hallpass.com/media/specialmission.html

Source site : http://hallpass.com

Monday, May 29, 2006

Latest DIVX Movies & Hindi Songs

http://www.divxcrawler.com/

Download Songs :

www.desim4u.net

www.pakfellows.com (rashid/rashid)

SQL Server Database Best Practices,

http://www.sql-server-performance.com/vk_sql_best_practices.asp

Friday, May 26, 2006

Knowledge Management Vs Skill Management

Point 1:
KM Involves capturing the knowledge of employees and sharing it so that it is available for others to use.
SM merely focuses on application of Knowledge to find Solution
In brief, KM is learning and SM is applying what has been learnt. Such application of skill may result in improvement over earlier learning and thus knowledge but not necessarily improvement of skill. Thus Knowlede is dynamic.
-----------
Point 2
KM is a Learning Technique
SM is a Problem Solving Technique
-----------
Point 3
KM starts from individual and ends in sharing.
SM starts with sharing and ends up in individuals ability
------------
Point 4
Knowledge Management uses experience gained out of failures and also success.
Skill is strongly measured based on only success of solving problems.
------------
Point 5
Knowledge is an intellectual property.
Skill is one of the means of producing intellectual property.
------------
Point 6
Knowledge is relative.
Skill is individualistic.
-----------
Point 7
Knowledge is implicit.
Skill is explicit.
-----------
Point 8
KM is a measure of the VALUE of the Organization.
SM is the measure of the ABILITY of the Organization.

eBooks FTP

ftp.pomoyka.com

List of Freeweare Applications

Antivirus:
AVG - http://www.grisoft.com/us/us_index.php
Avast - http://www.avast.com/
AntiVir - http://www.free-av.com/
Panda ActiveScan -
http://www.pandasoftware.com/activescan

Audio Players:
Foobar2000 - http://www.foobar2000.org/
Sonique - http://sonique.lycos.com/
iTunes - http://www.apple.com/itunes/
jetAudio - http://www.jetaudio.com/
QCD - http://www.quinnware.com/
Winamp - http://www.winamp.com/

Audio Utilities:
CDex - http://cdexos.sourceforge.net/
dbPowerAMP Music Converter -
http://www.dbpoweramp.com/dmc.htm

CD Recording:
ASPI Drivers -
http://www.adaptec.com/worldwide/su...oduct/ASPI-4.70
CD/DVD Burner XP - http://www.cdburnerxp.se/
Burn 4 Free - http://www.burn4free.com/

CD Utilities:
Daemon Tools -
http://www.daemon-tools.cc/dtcc/portal/portal.php

Download Managers:
WackGet - http://millweed.com/projects/wackget/
LeechGet - http://www.leechget.net/en/
wget for Windows - http://xoomer.virgilio.it/hherold/
(Do NOT USE Download Accelerator Plus (DAP)…
It infects the machine with adware/spyware.
Leechget is good and has no adware /
spyware components whatsoever)

Encryption:
PGP Freeware Edition -
http://www.pgp.com/products/freeware.html
Axcrypt - http://axcrypt.sourceforge.net/
GnuPG - http://www.gnupg.org/

Firewall:
ZoneAlarm - http://www.zonelabs.com/
Sygate Personal Firewall -
http://smb.sygate.com/products/spf_standard.htm
Kerio Personal Firewall - http://www.kerio.com/kpf_home.html
Outpost - http://www.agnitum.com/download/outpost1.html

GUI Utilities:
Tclock - http://homepage1.nifty.com/kazubon/tclock/index.html
IconPhile - http://www.virtualplastic.net/scrow/iphile.html
PowerMenu -
http://www.veridicus.com/tummy/programming/powermenu/
Glass2k - http://www.chime.tv/products/glass2k.shtml
D-Color XP -
http://dliboon.freeshell.org/products/dcolor/index.php
CursorXP -
http://www.stardock.com/products/cursorxp/download.html
MobyDock - http://www.mobydock.com/
Samurize - http://www.samurize.com/

Image Viewers:
IrfanView - http://www.irfanview.com/
iBrowser - http://ibrowser.fcodersoft.com/
AhaView - http://www.aha-soft.com/ahaview/free.htm

Instant Messaging:
Miranda IM - http://www.miranda-im.org/
Gaim - http://gaim.sourceforge.net/
Trillian - http://www.ceruleanstudios.com/downloads/
Yahoo Instant Messenger - http://messenger.yahoo.com/
MSN Messenger - http://messenger.msn.com/
AOL Instant Messenger - http://www.aim.com/
ICQ - http://www.icq.com/
Jabber - http://www.jabber.org/

Networking:
Putty Telnet/SSH Client -
http://www.chiark.greenend.org.uk/~sgtatham/putty/
IP Tools - http://www.ks-soft.net/ip-tools.eng/
Ethereal Protocol Analyzer - http://www.ethereal.com/
HyperTerminal Private Edition -
http://www.hilgraeve.com/htpe/download.html
RealVNC - http://www.realvnc.com/
Nmap - http://www.insecure.org/nmap/

Programming:
PHP - http://www.php.net/
ActivePerl - http://www.activestate.com/Products/ActivePerl/
jEdit - http://www.jedit.org/
Dev-C++ - http://www.bloodshed.net/
MySQL - http://www.mysql.com/
SciTE - http://www.scintilla.org/SciTE.html

Publication/Document Manipulation:
OpenOffice.org - http://download.openoffice.org/index.html
AbiWord - http://www.abisource.com/download/

Spyware Protection:
Ad-Aware - http://www.lavasoft.de/software/adaware/
Spybot: Search & Destroy - http://spybot.safer-networking.de/
CWShredder -
http://www.spywareinfo.com/~merijn/downloads.html
Hijack This -
http://www.spywareinfo.com/~merijn/downloads.html
IE-SPYAD -
http://www.staff.uiuc.edu/~ehowes/resource.htm#IESPYAD
SpywareBlaster - http://www.javacoolsoftware.com/

System Utilities:
BootVis - http://www.majorgeeks.com/download.php?det=664
Resource Hacker -
http://www.users.on.net/~johnson/resourcehacker/
PC Inspector File Recovery -
http://www.pcinspector.de/file_recovery/UK/welcome.htm
Motherboard Monitor - http://mbm.livewiredev.com/
Sysinternals Utilities -
http://www.sysinternals.com/ntw2k/utilities.shtml
WCPUID -
http://hp.vector.co.jp/authors/VA00...c/download.html

Video Players:
BSPlayer - http://www.bsplayer.org/
Core Media Player - http://www.tcmp.org/
Media Player Classic -
ttp://sourceforge.net/project/show...?group_id=82303
VideoLAN - http://www.videolan.org/
Zoom Player -
http://www.inmatrix.com/files/zoomplayer_download.shtml

Video Utilities:
KVCD - http://www.kvcd.net/
TMPGEnc - http://www.tmpgenc.net/
VirtualDUB - http://www.virtualdub.org/

Web Browsers:
Mozilla FireFox - http://www.mozilla.org/download.html
Mozilla - http://www.mozilla.org/
Netscape - http://channels.netscape.com/ns/browsers/default.jsp
MyIE2 - http://www.myie2.com/
Avantbrowser - http://www.avantbrowser.com/
SlimBrowser -
http://www.flashpeak.com/sbrowser/sbrowser.htm

Web/FTP Servers:
SlimFTPd - http://www.whitsoftdev.com/slimftpd/
Filezilla - http://filezilla.sourceforge.net/
Xitami - http://www.xitami.com/
Apache - http://www.apache.org/
Savant - http://savant.sourceforge.net/
----------------------------------------------------------------

A to Z .net Glossary

http://www.developer.com/net/asp/article.php/1756291

VS2005 Differences

http://www.400plusdifferences.com/

Family Joke

A Patel family in Gujarat was puzzled when the coffin of their deadmother arrived from the US. It was sent by one of the daughters. The dead body was very tightly squeezed inside the coffin, with no space left in it Whenthey opened the lid , they found a letter on top addressed to herbrothersand sisters:

Dear Chandrakantbhai,Arvindbhai, Mohan and Varsha, I am sending Ba\'s body to you, since it washer wish that she should be cremated in the compound of our ancestral homein GUJARAT. Sorry, I could not come along as all of my paid leave isconsumed. You will find inside the coffin, under Ba\'s body, 12 cans of cheese, 10 packets of Toblerone chocolates and 8 packets ofBadam. Please divide these among all of you. On Ba\'s feet you will findanew pair of Reebok shoes (size 10) for Mohan. There are also 2 pairs of shoes for Radha\'s and Lakshmi\'s sons. Hope the sizes are correct. Ba iswearing 6 American T-Shirts. The large size is for Mohan. Justdistributethe rest among yourselves. The 2 new Jeans that Ba\'s is wearing are for the boys. The Swiss watch thatReema wanted is on Ba\'s left wrist. Shanta masi, Ba is wearing the necklace, earrings and ringthat you asked for. Please take them off her. The 6 white cotton socksthat Ba is wearing must be divided among my nephews. Please distribute allthese fairly.

Love , Smita PatelPS: And if anything more required let me know soon as Bapuji is also notfeeling too well nowadays.

Good Facts

=> Coca-Cola was originally green.

=>The most common name in the world is Mohammed.

=>The strongest muscle in the body is the tongue.

=>There are two credit cards for every person in the United States.

=>TYPEWRITER is the longest word that can be made using the letters only on
one row of the keyboard.

=>Women blink nearly twice as much as men!!

=>You can't kill yourself by holding your breath.

=>It is impossible to lick your elbow.

=>People say "Bless you" when you sneeze because when you sneeze, your heart
stops for a millisecond.

=>If you sneeze too hard, you can fracture a rib. If you try to suppress a
sneeze, you can rupture a blood vessel in your head or neck and die.

=>Each king in a deck of playing cards represents a great king from history.
Spades - King David
Clubs - Al! exander the Great,
Hearts - Charlemagne
Diamonds - Julius Caesar.

=>111,111,111 x 111,111,111 = 12,345,678,987,654,321

=>Honey is the only food that doesn't spoil.

=>A crocodile cannot stick its tongue out.

=>A snail can sleep for three years.

=>All polar bears are left handed.

=>American Airlines saved $40,000 in 1987 by eliminating one olive from
each salad served in first-class.

=>Butterflies taste with their feet.

=>Elephants are the only animals that can't jump.

=>Stewardesses is the longest word typed with only the left hand.

=>The ant always falls over on its right side when intoxicated.

=>The electric chair was invented by a dentist.

=>The human heart creates enough pressure when it pumps out to the body to
squirt blood 30 feet.

=>Rats multiply so quickly that in 18 months, two rats could have over
million descendants.

=>Wearing headphones for just an hour will increase the bacteria in your ear
by 700 times.

=>The cigarette lighter was ! invented before the match.

=>Most lipstick contains fish scales.

=>Like fingerprints, everyone's tongue print is different.

Never Give Up

Think the Unthinkable

A first-grade teacher, Ms Neelam (Age 22) was having trouble with one of her students
The teacher asked,"Boy. What is your problem?"
Boy answered, "I'm too smart for the first-grade. My sister is in the third-grade and I'm smarter than she is! I think I should be in the third-grade too!"
Ms Neelam had enough. She took Boy. to the principal's office.
While the boy waited in the out of the office, the teacher explained to the Principal what the situation was.
The principal told Ms Neelam he would give the boy a test and if he failed to answer any of his questions he was to go back to the first-grade and behave.She agreed.
Boy was brought in and the conditions were explained to him and he agreed to take the test.
Principal: "What is 3 x 3?"
Boy: "9"
Principal: "What is 6 x 6?"
Boy: "36".
And so it went with every question the principal thought a third-grade should know. The principal looks at Ms Neelam and tells her, "I think Boy can go to the third-grade."
Ms Neelam says to the principal, "I have some of my own questions. Can I ask him?" The principal and boy both agree.
Ms Neelam asks, "What does a cow have four of that I have only two of?
Boy, aft! er a moment "Legs."
Ms Neelam: "What is in your pants that you have but I do not have?"
Boy: "Pockets."
Ms Neelam: What starts with a C and ends with a T, is hairy, oval, and delicious and contains thin whitish liquid?
Boy: Coconut
Ms Neelam: What goes in hard and pink then comes out soft and sticky? (The principal's eyes open really wide and before he could stop the answer, boy was taking charge)
Boy: Bubblegum
Ms Neelam: What does a man do standing up, a woman does sitting down and a dog does on three legs? The principal's eyes open really wide and before he could stop the answer...
Boy: Shake hands
Ms Neelam: Now I will ask some "Who am I" sort of questions, okay? Boy: Yep.
Ms Neelam: You stick your poles inside me. You tie me down to get me up. I get wet before you do.
Boy: Tent
Ms Neelam: A finger goes in me. You fiddle with me when you're bored. The best man always has me first. The Principal was looking restless, a bit tense and took one large Patiala Vodka peg.
Boy: Wedding Ring
Ms Neelam: I come in many sizes. When I'm not well, I drip. When you blow me, you feel good.
Boy: Nose
Ms Neelam: I have a! stiff shaft. My tip penetrates. I come with a quiver.
Boy: Arrow
Ms Neelam: What word starts with a 'F' and ends in 'K' that means lot of heat and excitement?
Boy: Firetruck
Ms Neelam: What word starts with! a 'F' and ends in 'K' & if u dont get it u have to use your hand.
Boy: Fork
Ms Neelam: hat is it that all men have one of it's longer on some men than on others, the pope doesn't use his and a man gives it to his wife after they're married? Boy: SURNAME
Ms Neelam: What part of the man has no bone but has muscles, has lots of veins, like pumping, & is > responsible for making love?
Boy: HEART.
The principal breathed a sigh of relief and said > to the teacher, "Send this Boy to Delhi University , I got the last ten questions wrong myself!"

Regular Expression Library

http://www.regxlib.com/default.aspx

Tuesday, May 23, 2006

Some Facts

1. Chewing on gum while cutting onions can help a person from stop producing tears. Try it next time you chop onions!!!!!!!!!!

2. Until babies are six months old, they can breathe and swallow at the same time. Indeed convenient!

3. Offered a new pen to write with, 97% of all people will write their own name.

4. Male mosquitoes are vegetarians. Only females bite.

5. The average person's field of vision encompasses a 200-degree wide angle.

6. To find out if a watermelon is ripe, knock it, and if it sounds hollow then it is ripe.

7. Canadians can send letters with personalized postage stamps showing their own photos on each stamp.

8. Babies' eyes do not produce tears until the baby is approximately six to eight weeks old.

9. It snowed in the Sahara Desert in February of 1979.

10. Plants watered with warm water grow larger and more quickly than plants watered with cold water.

11. Wearing headphones for just an hour will increase the bacteria in your ear by 700 times. 12. Grapes explode when you put them in the microwave.

13. Those stars and colors you see when you rub your eyes are called phosphenes.

14. Our eyes are always the same size from birth, but our nose and ears never stop growing.

15. Everyone's tongue print is different, like fingerprints.

16. Contrary to popular belief, a swallowed chewing gum doesn't stay in the gut. It will pass through the system and be excreted.

17. At 40 Centigrade a person loses about 14.4 calories per hour by breathing.

18. There is a hotel in Sweden built entirely out of ice; it is rebuilt every year.

19. Cats, camels and giraffes are the only animals in the world that walk rightfoot, right foot, left foot, left foot, rather than right foot, left foot...

20. Onions help reduce cholesterol if eaten after a fatty meal.

21. The sound you hear when you crack your knuckles is actually the sound of nitrogen gas bubbles bursting.

Hindi Letter

Purchase land on Moon

http://www.lunarregistry.com/

Good Morning

Million, Billion, Trillion... ......

Number of zeros
U.S. & scientific community
Other countries


3
thousand
thousand
6
million
million
9
billion
1000 million (1 milliard)
12
trillion
billion
15
quadrillion
1000 billion
18
quintillion
trillion
21
sextillion
1000 trillion
24
septillion
quadrillion
27
octillion
1000 quadrillion
30
nonillion
quintillion
33
decillion
1000 quintillion
36
undecillion
sextillion
39
duodecillion
1000 sextillion
42
tredecillion
septillion
45
quattuordecillion
1000 septillion
48
quindecillion
octillion
51
sexdecillion
1000 octillion
54
septendecillion
nonillion
57
octodecillion
1000 nonillion
60
novemdecillion
decillion
63
vigintillion
1000 decillion
66 - 120
undecillion - vigintillion
303
centillion

600
centillion

Confidence.....

Confidence, like art, never comes from having all the answers,
it comes from being open to all the questions.

Two Letters to Project Manager

A project leader wrote two letters to his project manager evaluating an Employee named : Bob Smith.

Letter 1

1 Bob Smith, my assistant programmer, can always be found
2 hard at work in his cubicle. Bob works independently, without
3 wasting company time talking to colleagues. Bob never
4 thinks twice about assisting fellow employees, and he always
5 finishes given assignments on time. Often he takes extended
6 measures to complete his work, sometimes skipping coffee
7 breaks. Bob is a dedicated individual who has absolutely no
8 vanity in spite of his high accomplishments and profound
9 knowledge in his field. I firmly believe that Bob can be
10 classed as a high-caliber employee, the type which cannot be
11 dispensed with. Consequently, I duly recommend that Bob be
12 promoted to executive management, and a proposal will be
13 executed as soon as possible.

Letter 2
Addendum: That idiot was standing over my shoulder while I wrote the report sent to you earlier today. Kindly re-read only the odd numbered lines.

Funny New Rules For Employment

SICKNESS AND RELATED LEAVE: We will no longer accept a doctor statement as proof of sickness. If you are able to go to the doctor, you are able to come to work.
SURGERY: Operations are now banned. As long as you are an employee here, you need all your organs. You should not consider removing anything. We hired you intact. To have something removed constitutes a breach of employment.

BEREAVEMENT LEAVE: This is no excuse for missing work. There is nothing you can do for dead friends, Relatives or coworkers. Every effort should be made to have non-employees attend to the arrangements. In rare cases, where employee involvement is necessary, the funeral should be scheduled in the late afternoon. We will be glad to allow you to work through your lunch hour and subsequently leave one hour early, provided your share of the work is done enough.

YOUR OWN DEATH: This will be accepted as an excuse. However, we require at least two weeks notice as it is your duty to train your own replacement.

RESTROOM USE: Entirely too much time is being spent in the restroom. In the future, we will follow the practice of going in alphabetical order. For instance, all employees whose names begin with ''''''''''''''''A'''''''''''''''' will go from 8:00 to 8:10, employees whose names begin with ''''''''''''''''B'''''''''''''''' will go from 8:10 to 8:20 and so on. If you''''''''''''''''re unable to go at your allotted time, it will be necessary to wait until the next day when your turn comes again. In extreme emergencies employees may swap their time with a coworker. Both employees'''''''''''''''' supervisors in writing must approve this exchange. In addition, there is now a strict 3-minute time limit in the stalls. At the end of three minutes, an alarm will sound, the toilet paper roll will retract, and the stall door will open.

PAYCHECK GUIDE: The following helpful guide has been prepared to help our employees better understand their paychecks:

Item Amount Gross pay $1,222.02 Income tax $244.40 Outgo tax $45.21 State tax $11.61 Interstate tax $61.10 County tax $6.11 City tax $12.22 Rural tax $4.44 Back tax $1.11 Front tax $1.16 Side tax $1.61 Up tax $1.08 Down tax $1.14 Tic-Tacs $1.98 Thumbtacks $3.93 Carpet tacks $0.98 Stadium tax $0.69 Flat tax $8.32 Surtax $2.23 Ma''''''''''''''''am tax $1.23 Corporate tax $2.60 Parking fee $5.00 F.I.C.A. $81.88 T.G.I.F. Fund $9.95 Life insurance $5.85 Health insurance $16.23 Dental insurance $4.50 Mental insurance $4.33 Disability $2.50 Ability $0.25 Liability $3.41 Coffee $6.85 Coffee Cups $66.51 Floor rental $16.85 Chair rental $0.32 Desk rental $4.32 Union dues $5.85 Union don''''''''''''''''ts $3.77 Cash advance $0.69 Cash retreats $121.35 Overtime $1.26 Undertime $54.83 Eastern time $9.00 Central time $8.00 Mountain time $7.00 Pacific time $6.00 Time Out $12.21 Oxygen $10.02 Water $16.54 Heat $51.42 Cool air $26.83 Hot air $20.00 Miscellaneous $113.29 Various $8.01 Sundry $12.09 ------- Net Take Home Pay $0.02

Thank you for your loyalty to our company. We are here to provide a positive employment experience. Therefore, all questions, comments, concerns, complaints, frustrations, irritations, aggravations, insinuations, allegations, accusations, contemplations, consternations, or input should be directed elsewhere.

WHO KNOWS....

He who knows not and knows not that he knows not is a fool; avoid him.
He who knows not and knows that he knows not is a student; teach him.
He who knows and knows not that he knows is asleep; wake him.
He who knows and knows that he knows is a wise man; follow him.

Funny SDLC

1. Programmer produces code he believes is bug-free.

2. Product is tested. 20 bugs are found.

3. Programmer fixes 10 of the bugs and explains to the testing departmentthat the other 10 aren't really bugs, they're features.

4. Testing department finds that five of the fixes didn't work anddiscovers 15 new bugs.

5. Repeat three times steps 3 and 4.

6. Due to marketing pressure and an extremely premature productannouncement based on
overly-optimistic programming schedule, theproduct is released.

7. Users find 137 new bugs.

8. Original programmer, having cashed his royalty check, is nowhere to befound.

9. Newly-assembled programming team fixes almost all of the 137 bugs, butintroduce 456 new ones.

10. Original programmer sends underpaid testing department a postcard fromFiji. Entire testing department quits.

11. Company is bought in a hostile takeover by competitor using profits fromtheir latest release, which had 783 bugs.

12. New CEO is brought in by board of directors. He hires a programmer toredo program from scratch.

13. Programmer produces code he believes is bug-free...(probably the original programmer)

Color Magic

God is Everywhere


The Road to success is not straight
There is a curve called failure
A loop called confusion
Speed bumps called friends
Red lights called enemies
Caution lights called family
You will have flats called jobs,
But, if you have a spare called determination
An engine called perseverance
Insurance called faith
A driver called God You will make it to a place called Success !

Lets begin this day with a faith that there is SOMEONE, SOMEWHERE ALWAYS HOLDING OUR HANDS AND GUIDING US IN THIS ENDLESS JOURNEY CALLED LIFE.

Open Web Application Security Project

Open Web Application Security Project www.owasp.org.

Tuesday, May 09, 2006

MANAGEMENT LESSONS

MANAGEMENT LESSONS

Once upon a time a tortoise and a hare had an argument about whowas faster. They decided to settle the argument with a race. They agreed on a route and started off the race. The hare shot ahead and ran briskly for some time. Then seeing that he was far ahead of the tortoise, he thought he'd sit under a tree for some time and relax before continuing the race. He sat under the tree and soon fell asleep. The tortoise plodding on overtook him and soon finished the race, emerging as the undisputed champ. The hare woke up and
realised that he'd lost the race.
The moral of the story is that slow and steady wins the race.

This is the version of the story that we've all grown up with.
But then recently, someone told me a more interesting version of
this story. It continues.

The hare was disappointed at losing the race and he did some soul-searching. He realised that he'd lost the race only because he had been overconfident, careless and lax. If he had
not taken things for granted, there's no way the tortoise could have beaten him. So he challenged the tortoise to another race. The tortoise agreed. This time, the hare went all out and ran without stopping from start to finish. He won by several miles.
The moral of the story?
Fast and consistent will always beat the slow and steady.
If you have two people in your organisation, one slow, methodical and eliable, and the other fast and still reliable at what he does, the fast and reliable chap will consistently climb the organizational ladder faster than the slow, methodical chap.
It's good to be slow and steady; but it's better to be fast and reliable.

But the story doesn't end here.

The tortoise did some thinking this time, and realised that there's no way he can beat the hare in a race the way it was currently formatted. He thought for a while, and then challenged the hare to another race, but on a slightly different route. The hare agreed. They started off. In keeping with his self-made commitment to be consistently fast, the hare took off and ran at top speed until he came to a broad river. The finishing line was a couple of kilometres on the other side of the river. The hare sat there wondering what to do. In the meantime the tortoise trundled along, got into the river, swam to the opposite bank, continued walking and finished the race.

The moral of the story? First identify your core competency and then
change the playing field to suit your core competency.
In an organisation, if you are a good speaker, make sure you create opportunities to give presentations that enable the senior management to notice you. If your strength is analysis, make sure you do some sort of research, make a report and send it upstairs. Working to your
strengths will not only get you noticed, but will also create opportunities for growth and advancement.

The story still hasn't ended.

The hare and the tortoise, by this time, had become pretty good friends and they did some thinking together. Both realised that the last race could have been run much better. So they decided to do the last race again, but to run as a team this time. They started off, and
this time the hare carried the tortoise till the riverbank. There, the tortoise took over and swam across with the hare on his back. On the opposite bank, the hare again carried the tortoise and they reached the finishing line together. They both felt a greater sense of
satisfaction than they'd felt earlier.
The moral of the story?
It's good to be individually brilliant and to have strong core competencies; but unless you're able to work in a team and harness each other's core competencies, you'll always perform below par because there will always be situations at which you'll do poorly and someone else does well.
Teamwork is mainly about situational leadership, letting the person with the relevant core competency for a situation take leadership.

There are more lessons to be learnt from this story.

1) Note that neither the hare nor the tortoise gave up after failures.
2) The hare decided to work harder and put in more effort after his failure.
3) The tortoise changed his strategy because he was already working as hard as he could. In life, when faced with failure, sometimes it is appropriate to work harder and put in more effort.
4) Sometimes it is appropriate to change strategy and try something different. And sometimes it is appropriate to do both.
5) The hare and the tortoise also learnt another vital lesson. When we stop competing against a rival and instead start competing against the situation, we perform far better.

Chief among them are that fast and consistent will always beat slow and steady; work to your competencies; pooling resources andworking as a team will always beat individual performers; nevergive up when faced with failure; and finally, compete against the
situation - not against a rival.

Wednesday, May 03, 2006

Good SQL Server Commands

sp_who --gets all the users connected to sqlserver

select name from syscolumns where id = object_id('job') --gets only column names

select name from sysindexes where id=object_id('job') --gets only index names

select groupname from sysfilegroups -- list all the filegroups

select name, user_name(uid) from sysobjects where type='U' --list all the userdefined table in the database

select sysobjects.name, * from syscolumns, sysobjectswhere syscolumns.name='Dated'and sysobjects.id = syscolumns.idand (sysobjects.xtype='U' or sysobjects.xtype='S') --select all tables containing the given column name

/* Move the Database */Use multi1GoExec sp_helpfileGo--Exec sp_detach_db 'MyDatabase'Go--Exec sp_attach_db 'MyDatabase','E:\MsSql7\NewHome\MyDatabase_Data.mdf','E:\MsSql7\NewHome\MyDatabase_Log.ldf'


--get the min, max and avg length of a column
Select min(datalength(dated)),avg(datalength(dated)),max(datalength(dated)) from job;

-- Checks the database integrity of a given database. with no_infomsgs can be removed
dbcc checkdb(multi1) with no_infomsgs

/* Check if a trigger exists */
if exists (select * from sysobjects where name='tD_Employee' and xtype='TR') print 'Trigger exists'else print 'Trigger does not exist'

/* get the details of current connection */
sp_who @@SPID

print SYSTEM_USER

select nt_username, hostname, nt_domain, loginame, login_time, program_name from master..sysprocesses where spid=53

SELECT @@version --gets the current service pack installed

Monday, April 17, 2006

Government Online Grievance Forum

Government Online Grievance Forum

I-serve IT Solutions

Affordable Software Development India,Offshore Web Development india
Iserve-IT is an software development company, Web Development, System Administration and Embedded Development base in india

General IT Reading Links

(Testing Checklist)
(beerhouse project in asp.net 2.0)
sql 2005

Reading
http://www.ddj.com/http://www.aspheute.com/english/
Questions
http://weblog.arkane-systems.net/2005/03/04/ How+Great+Am+I+I+Of+III.aspx
http://community.devpinoy.org/blogs/dehranph/archive/2005/03.aspx

DATA PROTECTION ACT
======================
http://www.dfid.gov.uk/aboutdfid/foi/dataprotection.asp

VEJALPUR NAGARPALIKA
==========================
http://203.88.139.11/eng/ptax/details/master_details.asp?ward_no=08&SOCIETY_NO=0084

PURHCASE PHP SCRIPTS
==================
http://www.popscript.com/

Check Event Compatibilty of Javascript in different browsers =======================================
http://www.quirksmode.org/js/events_compinfo.html

Check Page Rank of Site
=======================
http://www.pagerank.net/

FREE CBT & E-BOOKS
====================
http://www.cbtdirect.com/courses/default.asp
(free-books MCSD, CCNA, J2EE)
http://www.mcsebraindumps.com/

Excellent Visual Basic personal blog
=========================================
http://www.panopticoncentral.net/category/17.aspx

Career
=======================
http://www.onesmartclick.com/interviews/interviews.html
http://www.quintcareers.com/job_interview_preparation.html
http://aucse.com/careerplaning.htm (free papers & resume tips)

DNS
===============
http://www.dnsstuff.com/

Internet Security
=====================
http://isc.sans.org/

Fun

http://o3.indiatimes.com/laughingjokes
http://www.metacafe.com

http://www.cool-clip.de/
http://www.ryoni.com/
http://www.warfalcons.com/
http://www.boreme.com/
http://www.extremefunnyhumor.com/
http://www.buzzardbros.com/
http://www.humorheights.com/
http://www.ugoto.com/
http://www.devilducky.com/
http://www.yikers.com/
http://www.aznclips.com/
http://flashsrealm.com/myworld/photoworld.html
http://www.humorsource.com/topsites/index.html
http://www.ebaumsworld.com/
http://www.needforfun.com/
http://www.davesdaily.com/
http://www.coolquiz.com/
http://www.teknetik.com/
Magic Revealled

http://www.goodtricks.net/levilink.html
http://www.ellusionist.com/How-To-Levitate.htm

Project Management - Links

http://cs.ua.edu/415/CS%20415%20Schedule%20Fall%202004.htm

http://www.allpm.com

http://www.columbia.edu/~jm2217/#QADocs

http://www.softwaredioxide.com

http://www.pmstudy.com (free 200 questions test)

http://www.stc.org (Society for Technical Communication)(Testing Checklist)

http://www.methodsandtools.com/archive/archive.php?id=37

Data Protection Act

http://www.dfid.gov.uk/aboutdfid/foi/dataprotection.asp

PMP Yahoo Group Login

http://login.yahoo.com/config/login?.intl=us&.src=ygrp&.done=http%3a//groups.yahoo.com%2Fgroup%2FPMHub%2Fmessages

PMP Suggested Site by Nimesh Mehta

http://www.pmhub.net/index.php