Friday, December 18, 2009
Using the Built-in Silverlight Media Player of 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 Servicesis 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
- SharePoint 2010 Features : (*FREE Channel9 SharePoint2010 Developer Course)
- SharePoint 2010 Designer New Tools
- BDC Entities
- List Schema
- Custom Actions
- Task/Approval Designer
- Visual Studio 2010 SharePoint Tools
- Web Part, BCS and Workflow designers
- View SharePoint site in Server Explorer
- Support for SharePoint Sandboxed Solutions
- Import WSP from SharePoint Designer
- Packaging Explorer
- Platform
- Web UI Framework
- Silverlight
- XSLT Views
- LINQ
- REST
- Client OM
- External Lists
- Improved Event Model
- Improved Solutions Lifecycle
- SharePoint 2010 Designer New Tools
- Word Automation Services in SharePoint 2010 + Open XML SDK
- “Identity normalization” in SharePoint 2010 – Services in Single Farm, Windows Identity Foundation Identity Delegation Feature
- Identity and Web2.0 Services – OAuth Token Authentication mechanism in SharePoint 2010
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
Velocityis now “Windows Server AppFabric Caching”Dublinis 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
- Features
- 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 Extensibility – Extensions Gallery & VSX Samples
ASP.net & SQL Server
- ASP.net 4.0 Futures:
- OOB Helpers for Image manipulation, Email (and signup email with verification), Background tasks, File upload with progress updates
- Support for HTML5 - <video>, <audio>, <menu> tags, Web Storage
- AdoNetDataContext – to get data from Windows Communication Foundation web services (*.svc)
- IntermediateDataContext to cache data in Web Storage
- Velocity – distributed cache platform
- Active Record design pattern to keep the database schema in sync with the Object-Relational Mapper.
- FREE ASP.NET 4 & MS Deploy Hosting
- Microsoft SQL Server 2008 R2 StreamInsight
- SQL Server 2008 R2 Embedded BI: Visual Studio 2010 Report Viewer Controls
- SQL Server Modeling Services
- Statistics Used by the Query Optimizer in Microsoft SQL Server 2008
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
- Messenger Web Toolkit
- Concurrency Runtime (ConcRT) & User Mode Scheduling (UMS) for C++
- “Snoop” - A random utility made to simplify visual debugging of WPF applications at runtime.
- “VMmap” - Process virtual and physical memory analysis utility from sysinternals
- DryadLINQ - Declarative programming style of LINQ for clusters
- Windows Performance Tools (WPT) Kit - contains performance analysis tools
- Windows Ribbon Framework Developer Guides
- .NET Micro Framework 4.0 Porting Kit and .NET Micro Framework 4.0 SDK
- Image Builder Wizard (IBW) – Quick and Easy Embedded OS Creation
- Microsoft adPlatform for Developers
- Windows Identity Foundation - Extension to .Net for claims-based identity
- Software Certification Toolkit – For ISV Application Readiness and Certification
- UC 14 Metro - OCS 14/OC 14 platform early adopter program
Wednesday, November 18, 2009
@PDC09 – Day 2 – Networking and Web Services with Silverlight
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
- ClientHttp networking stack (WebRequestCreator.ClientHttp)
- 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
- Programming Model
- WCF Data Services
- 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
- Duplex Messaging
- 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
- Multicast Messaging
@PDC09 – Day 2 - Keynote
These are some very rough notes from the today’s keynote at PDC 09’ . . . .
Topic : Windows 7
- Developing windows 7
- developing for windows 7
- 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
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 :
with search results . . .
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.
- TileView : This control also has a cool seek-from-origin style animation for each item, which fire in sequence as the items are added.
- 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
- 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.
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 :-). . . . .
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 :
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 . . . . .
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 :
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 :
ModulesCatalog.xaml
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 :
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 . . .
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>
</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
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 :
You can download the source code from here.
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.
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.
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.
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.
Now we can use the silverLightControl object and access the registered methods like this :
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:
The default is set to “Enabled”.
Learning is Inevitable !!!