Friday, January 20, 2012

Experiences with Binary and DNA abstractions


Since over a year now, I have been working on an Innovation product on SharePoint 2010 (read more…) and I would like to share some my experiences, architecting and developing it. Below I have tried to group my experiences into technical and non-technical headings and also shared some of the interesting resources that I went through.
In the next few posts I would try to expand some of these headings and talk about them in more details…

Thursday, October 20, 2011

First hands on Roslyn . . .

 

image

 

image

 

image

 

Microsoft “Roslyn” CTP

Traditionally, compilers are black boxes – source code goes in one end and object files or assemblies come out the other end. The Roslyn project changes that model by opening up the Visual Basic and C# compilers as APIs. These APIs allow tools and end-users to share in the wealth of information the compilers have about code. The Roslyn CTP previews the next generation of language object models for code generation, analysis, and refactoring, and the upcoming support for scripting and interactive use of VB and C#.

http://msdn.microsoft.com/en-us/roslyn

Friday, October 14, 2011

HTML5 Diaries – Canvas & SVG


image


How to choose between Canvas and SVG ?

Fundamentally, Canvas is a pixel-based, immediate mode graphics system that works best with a smaller surface or a larger number of objects.
While, SVG is a shape-based, retained mode graphics system that works better with a larger surface or a smaller number of objects.

For more information, visit :

http://msdn.microsoft.com/en-us/library/gg589488(v=vs.85).aspx
http://dev.opera.com/articles/view/svg-or-canvas-choosing-between-the-two/
https://developer.mozilla.org/en/Canvas_tutorial
http://www.canvasdemos.com/

Friday, September 30, 2011

WebSockets + Long Polling + SignalR === Awesome;

Steps for creating a chat client using ASP.net 4.5 :

1) Install Visual Studio 2011 Developer Preview (download)
2) Install NuGet Package Manager (download)
3) File -> New -> Project
clip_image002[1]
4) Right Click on References -> Manage NuGet Packages
clip_image004[1]
1) Search “SignalR” and install the package
clip_image002[3]
2) Add 2 files “Default.aspx” and “Chat.cs” and change the code as below:
clip_image004[3]
(*Note : I am referring to my C# type and methods in Javascript )
3) Done.
clip_image006[6]
You may think this is trivial but believe me, it isn’t ..

This is the most exciting piece of technology that I have seen so far from BUILD (offcourse after Windows Native Apps in HTML5 & Javascript) so I would encourage everyone to start playing with VS 2011.
And if you haven’t seen yet what happened in BUILD than I would strongly recommend you see it here.


Web development is taking a whole new perspective with HTML 5 and Javascript . . . .

Thursday, March 17, 2011

Code Leaders and Beautiful Teams . . . . .

 

I came across this nice presentation done by Roy Osherove at NDC 2010 where he talks about team types and some very good fundamental aspects of directing the team as a technical leader.

Here is the torrent link for all the videos - NDC2010 Sessions Torrent . I especially liked his Song at the end of the presentation (below)  Smile

Here are some really good excerpts from the original presentation :

image

image

image

image

Wednesday, March 02, 2011

Diving & Exploration


Some very good SharePoint links that I came across in last few weeks :

Enjoy Learning !!

Wednesday, January 12, 2011

First touch to Windows Phone 7

 

IMG00077-20101028-1814

Monday, June 21, 2010

Visual Studio 2010 Power Tools


Here are few features I liked from the VS 2010 Power Tools released last week :

Visual Studio 2010 Pro Power Tools

  • Close button in tab as well
  • Pinned Tabs
  • Searchable Add Reference Dialog
  • Triple Click to select a line
  • Align Assignments (Ctrl + Alt + ] )

vspowertools1

vspowertools2

Visual Studio 2010 SharePoint Power Tools

  • Sandbox Visual Webpart

vspowertools3
(Although there are few limitations which are mentioned in the tool description tab here)

Thursday, May 20, 2010

Zion Rebuild . . . . . . . . Again !!!


Right from the RFP meetings to the daily scrums and the final PROD release calls/emails, it has been a tremendously exciting journey once again with this project. I am immensely happy to announce the launch of our new SharePoint site: http://sharepoint.microsoft.com

The entire team learnt & applied a ton of exciting stuff in SharePoint 2010 including :

  • LIVE ID Integration with SharePoint 2010
  • 2010 Media Player Integration
  • Localization using Variations + lots of Hack
  • [PageQueryString] in Content Query Webparts
  • SharePoint Tools in Visual Studio 2010
  • Caching API’s for accessing SharePoint List Data
  • Bing Maps Geo-code service
  • HTML Compliance / Accessibility standards
  • jQuery

image

SharePoint 2010 is a huge successor of 2007 and since last 1 year I have been enjoying more and more working on this product . . . . . .

Thursday, March 18, 2010

First Look at Windows Phone Developer Tools (CTP)


I just downloaded the Windows Phone Developer Tools and tried the Code Samples on my Windows 7 PDC Laptop. Here are few snapshots of the emulator:

image

image

If you want to get your hands more dirty than here is the Windows Phone 7 Series Developer Training Kit

Wednesday, March 17, 2010

First Look at IE9 – GPU-powered HTML5 graphics


IE9 Developer Platform Preview : http://ie.microsoft.com/testdrive/

image

 

Border Radius

image

T-Shirt Designer

image

SVG-oids

image

Business Charts

image

image

Atlas

image

Tuesday, January 19, 2010

SharePoint 2010 Branding


Just saw these interesting Tips from Randy Drisgrill on branding SharePoint 2010 sites and also a Starter Master Page for SharePoint 2010, with all the detailed comments to understand each and every section of the 2010 Master page. . . . .

Sunday, January 03, 2010

Diving & Exploration


I was busy with PDC so this post is coming a bit late. Here are some of the gems that I had explored lastly:

Friday, December 18, 2009

Using the Built-in Silverlight Media Player of SharePoint 2010

This summary is not available. Please click here to view the post.

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

AddIn