Ban HTML comments from your pages and views |
- Ban HTML comments from your pages and views
- Awarded with the MVP Award
- Property change notifications for multithreaded Silverlight applications
- Porting NHProf from WPF to Silverlight – Day 5
- Silverlight at TechEd 2010 India .. See you there in Bangalore from 12th April 2010
- Tip: Zoom your browser when taking Silverlight Screenshots for Print
- Tip: Zoom your browser when taking Silverlight Screenshots for Print
- Optional Parameters and Named Arguments in C# 4 (and a cool scenario w/ ASP.NET MVC 2)
- Windows Phone 7 Developer Training Kit
- Silverlight Cream for April 01, 2010 -- #827
- Preview of My Current Windows Phone 7 Pivot Work
- An Annotated Line of Business Application
- Silverlight HVP on Silverlight TV
- Silverlight HVP on Silverlight TV
- An Annotated Line of Business Application
- Silverlight HVP on Silverlight TV
- Template parts and custom controls (quick tip)
- VC++ Tip: Get detailed build throughput diagnostics using MSBuild, compiler and linker
- CSharpQuery - A Fast Full Text Search Query Engine
- Netflix, jQuery, JSONP, and OData
Ban HTML comments from your pages and views Posted: 02 Apr 2010 02:39 PM PDT Too many people don't realize that there are other options than <!-- --> comments to annotate HTML. These comments are harmful because they are sent to the client and thus make your page heavier than it needs to be. When doing ASP.NET, a simple drop-in replacement is server comments, which are delimited by <%-- --%> instead of <!-- -->. Those server comments are visible in your source code, but will never be rendered to the client. Here's a simple way to sanitize a web site. From Visual Studio, hit CTRL+H to bring the search and replace dialog. Choose "Replace in Files" from the second meny on top of the dialog. Open the find options, check "use" and make sure "Regular expressions" are selected. Use "*.aspx;*.ascx;" as the...(read more) | ||
Posted: 02 Apr 2010 12:25 PM PDT Yesterday I received an e-mail from Microsoft. Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise...( read more )...(read more) | ||
Property change notifications for multithreaded Silverlight applications Posted: 02 Apr 2010 11:27 AM PDT Jeff Wilcox introduces a base class for dealing with INotifyPropertyChanged classes that is safe to use from background threads in Silverlight and Windows Phone....( read more )...(read more) | ||
Porting NHProf from WPF to Silverlight – Day 5 Posted: 02 Apr 2010 09:31 AM PDT Well, I'm pleased to say that on Wednesday I only encountered one new* issue during the port. ListBox does not support grouping. One neat thing in WPF is that all the items controls supported grouping. One of the reports we had was a set of master...( read more )...(read more) | ||
Silverlight at TechEd 2010 India .. See you there in Bangalore from 12th April 2010 Posted: 02 Apr 2010 08:49 AM PDT After wonderful celebration of TechEd 2009 India at Hyderabad, Its time to pack your bags for another wonderful TechEd ! Yeah ! I am talking about TechEd 2010 India in Bangalore on 12,12 and 14th April 2010 :) For more information about Venue and other...( read more )...(read more) | ||
Tip: Zoom your browser when taking Silverlight Screenshots for Print Posted: 02 Apr 2010 02:21 AM PDT I'm working rapidly towards finishing up Silverlight in Action, Revised Edition . As part of the work for this, I find myself taking screenshots pretty regularly. For a print publication, you want your screenshots to be the highest resolution possible...( read more )...(read more) | ||
Tip: Zoom your browser when taking Silverlight Screenshots for Print Posted: 02 Apr 2010 02:21 AM PDT I'm working rapidly towards finishing up Silverlight in Action, Revised Edition . As part of the work for this, I find myself taking screenshots pretty regularly. For a print publication, you want your screenshots to be the highest resolution possible...( read more )...(read more) | ||
Optional Parameters and Named Arguments in C# 4 (and a cool scenario w/ ASP.NET MVC 2) Posted: 02 Apr 2010 01:28 AM PDT [ In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu ] This is the seventeenth in a series of blog posts I'm doing on the upcoming VS 2010 and .NET 4 release. Today's post covers two new language feature being added to C# 4.0 – optional parameters and named arguments – as well as a cool way you can take advantage of optional parameters (both in VB and C#) with ASP.NET MVC 2. Optional Parameters in C# 4.0 C# 4.0 now supports using optional parameters with methods, constructors, and indexers (note: VB has supported optional parameters for awhile). Parameters are optional when a default value is specified as part of a declaration. For example, the method below takes...(read more) | ||
Windows Phone 7 Developer Training Kit Posted: 01 Apr 2010 10:17 PM PDT Quick callout to my colleague and evangelist Yochay Kiriaty, who posted a great set of learning materials and labs for Windows Phone 7 on Channel 9 . That's right … Channel 9! There are several great labs that are really cool that you can try out online...( read more )...(read more) | ||
Silverlight Cream for April 01, 2010 -- #827 Posted: 01 Apr 2010 09:54 PM PDT In this Issue: Max Paulousky , Hassan , Viktor Larsson , Fons Sonnemans , Jim McCurdy , Scott Marlowe , Mike Taulty , Brad Abrams , Jesse Liberty , Scott Barnes , Christopher Bennage , and John Papa and Ward Bell . Shoutouts: Tim Heuer posted a survey...( read more )...(read more) | ||
Preview of My Current Windows Phone 7 Pivot Work Posted: 01 Apr 2010 09:00 PM PDT I got some feedback after part 1 and part 2 of how to create a Pivot style for your Windows Phone 7 application - what I had created had a few issues. First, the pivot menu items across the top of the screen is supposed to be an endless scrolling menu...( read more )...(read more) | ||
An Annotated Line of Business Application Posted: 01 Apr 2010 08:23 PM PDT The Silverlight HyperVideo Player has met with strong support and interest. This mini-tutorial is the first in a series that will walk through the design and delivery of this project. This series will pretend that the design existed before we began coding...( read more )...(read more) | ||
Silverlight HVP on Silverlight TV Posted: 01 Apr 2010 08:22 PM PDT The Silverlight HyperVideo Project has made two guest appearances on Silverlight TV. In the first , I talk with John Papa about the project itself and how it has evolved. Then, during Mix, Tim Heuer and I sat down with John to discuss What...( read more )...(read more) | ||
Silverlight HVP on Silverlight TV Posted: 01 Apr 2010 08:22 PM PDT The Silverlight HyperVideo Project has made two guest appearances on Silverlight TV. In the first , I talk with John Papa about the project itself and how it has evolved. Then, during Mix, Tim Heuer and I sat down with John to discuss What Read More......(read more) | ||
An Annotated Line of Business Application Posted: 01 Apr 2010 08:23 PM PDT The Silverlight HyperVideo Player has met with strong support and interest. This mini-tutorial is the first in a series that will walk through the design and delivery of this project.
Understanding the Silverlight HVPIf a picture is worth a thousand words, a video must be worth an order of magnitude more. This video, created as part of the HVP sample set, explains the concepts behind the HVP. Design GuidelinesI'm a big believer in diving right into the code, but I did want to mention just a few of the design/coding guidelines I imposed on myself when writing this, and we can explore their motivation, implications and outcome as we go: Overarching message of the code: Silverlight is an application development framework: treat it like one.
Getting StartedThe premise of agile programming dove-tails neatly with the approach I've been advocating for two decades: get it working and keep it working. I can't claim any high minded values behind this; it is just what works for me. Worse, it is what I end up doing, even when I'm supposed to be doing design-first. I simply can't design in a vacuum and I get very tired and crabby when I do try to design in advance because it doesn't work. It never works because
The old argument was "don't paint yourself into a corner." On reflection, what I found was I was always painting myself into corners, but if I only painted for a few minutes before fixing the problem I was a lot better off than if I'd spent all day at it. Emerging DesignI love the term emerging design because it sounds so much better than "figure it out as you go." We'll come back to the most effective technique I know of for making all this work in large complex applications when we talk later about Test Driven Design, but let's get started. Here is what I know:
The First Thing To Get WorkingOne of the premises of "Emerging Design" that I like a lot is this: don't design anything until you're going to implement it. Do not say to yourself "I know I'm going to need this, so let me put in all the hooks I'll need." Reason: when you predict what you'll need, you are usually wrong. Work done today does not save you work later, but work not done today may never need to be done at all. In that spirit, the first thing to do is to create an application that has the Silverlight Media Framework player in it, and get that working in a very simple page.
Since adding a SMF is a well documented and short set of steps, I'll just take my lead from the SMF documentation and create a simple Silverlight Application named HVPT1 (Tutorial 1). That will create two projects: HVPT1 and HVPT1.web. The startup project will be HVPT1.web, the startup page will be HVPT1TestPage.aspx and the first Silverlight page will be in the HVPT1 (client side) project, the file mainpage.xaml Getting the SMurF LibrariesFor the SMF to work, we need the four SMF libraries, which can be downloaded from here, as well as the IIS Smooth Streaming Player Development Kit which is available here. The Smooth Streaming Player Development Kit (SSPDK) is unpacked by double clicking on the downloaded .exe. Place all five DLLs (the four from the SMF and the unpacked SSPDK into the same directory. In HVPT1 add a reference to all the DLLs except SilverlightMediaFramework.data.dll and then replace the header of HVPT1.MainPage.xaml with the following: <UserControl x:Class="HVPT1.MainPage" xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> Note that the second line declares a namespace alias "p" that refers to the Microsoft.SilvelrightMediaFramework.Player. You can now declare the player and its source, which must be a streaming media file. Here's the entire .xaml file: <UserControl x:Class="HVPT1.MainPage" xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <p:Player> <p:CoreSmoothStreamingMediaElement AutoPlay="True" SmoothStreamingSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest" /> </p:Player> </Grid> </UserControl> Build the application and watch the streaming movie. There is nothing more satisfying than getting something (anything) working! This work is licensed under a Creative Commons license. | ||
Silverlight HVP on Silverlight TV Posted: 01 Apr 2010 08:22 PM PDT
The Silverlight HyperVideo Project has made two guest appearances on Silverlight TV. In the first, I talk with John Papa about the project itself and how it has evolved. Then, during Mix, Tim Heuer and I sat down with John to discuss What's New In Silverlight 4, and I managed to sneak in a few comments about the HVP as well. Silverlight TV has numerous great interviews, and is quickly becoming a valued asset throughout the Silverlight community. Tens of thousands of people view each episode. Check it out here. Then take a look at John Papa's site as well. Then come back here, because the last thing I want is for you to decide you like JP so much you stop visiting. Next thing you know, I'm sitting in the dark. This work is licensed under a Creative Commons license. | ||
Template parts and custom controls (quick tip) Posted: 01 Apr 2010 05:40 PM PDT Here's a few simple tips and recommendations when developing custom Silverlight controls, as it relates to template parts. What's with all the control development tips? We're looking at the best way to share a lot of the 'black magic' of control development...( read more )...(read more) | ||
VC++ Tip: Get detailed build throughput diagnostics using MSBuild, compiler and linker Posted: 01 Apr 2010 02:23 PM PDT We know that build throughput for applications are a time crunch on developer productivity. We have spent some time on improving linker throughput and other areas in VS2010, and will continue to investigate improving overall build throughput in future releases. In this blog post, we will describe a couple of options to get diagnostics for your projects using MSBuild and then taking a deeper dive into the compiler and the linker. Using MSBuild Using the IDE, you can enable Timing Logging by setting "Tools/Options/Projects and Solutions/VC++ Project Settings/Build Timings" = "Yes" or raise the verbosity of the build to "Diagnostics" from "Tools/Options/Project and Solutions/Build and Run/MSBuild project build output verbosity". Using these options, you can get performance summaries per project and also get details on where time is spent on targets and tasks. This sort of information is useful say when you are trying to figure out how long that copy task is taking to copy your files over from across folders. 1>------ Rebuild All started: Project: mfc-app, Configuration: Debug Win32 ------ 1>Build started 1/12/2010 5:31:58 PM. 1>_PrepareForClean: 1> Deleting file "Debug\mfc-app.lastbuildstate". 1>InitializeBuildStatus: 1> Creating "Debug\mfc-app.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>ClCompile: 1> stdafx.cpp ............... 1> ChildFrm.cpp 1> Generating Code... 1>Manifest: 1> Deleting file "Debug\mfc-app.exe.embed.manifest". 1>LinkEmbedManifest: 1> mfc-app.vcxproj -> C:\Users\user\documents\visual studio 2010\Projects\mfc-app\Debug\mfc-app.exe 1>FinalizeBuildStatus: 1> Deleting file "Debug\mfc-app.unsuccessfulbuild". 1> Touching "Debug\mfc-app.lastbuildstate". 1> 1>Project Performance Summary: 1> 17877 ms C:\Users\user\documents\visual studio 2010\Projects\mfc-app\mfc-app\mfc-app.vcxproj 1 calls 1> 17877 ms rebuild 1 calls 1> 1>Target Performance Summary: 1> 0 ms CreateCustomManifestResourceNames 1 calls ............... 1> 630 ms LinkEmbedManifest 1 calls 1> 956 ms Manifest 1 calls 1> 2419 ms Link 1 calls 1> 12738 ms ClCompile 1 calls 1> 1>Task Performance Summary: 1> 0 ms FindUnderPath 2 calls ............... 1> 3035 ms Link 2 calls 1> 12733 ms CL 2 calls 1> 1>Build succeeded. 1> 1>Time Elapsed 00:00:17.89 ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== Compiler and Linker switchesThere are a couple of "hidden" undocumented switches that you could use to diagnose where you are spending most of your build times. /Bt and /time switches could be valuable to you if you are interested to know about where time is being spent. We use /Bt+ and /time+ pairings for our internal throughput runs where a tool takes as input the output timings and generates a summary listing of time spent per component. This allows us to get throughput measurements for individual components. (A useful tool for someone to write and contribute to code gallery ;-) ) Note on hidden switches: These are switches that we sometimes expose for diagnostic purposes. They are not documented and will/could change in future releases. Please use them with discretion. Usage · To get less verbose output, use "cl /Bt" or "link /time" · To get more verbose output, use "cl /Bt+" or "link /time+" (Works in VS2010 only) Using compiler switch "/Bt"Add "/Bt" to your compiler options directly on the command line or go to project properties and add "/Bt" to Additional options in "Configuration Properties/C/C++/Command Line". After building, the highlighted text will tell you how much time was spent in c1xx (front end compiler) and c2 (back end compiler) 1>------ Rebuild All started: Project: mfc-app, Configuration: Debug Win32 ------ 1>Build started 1/13/2010 10:44:51 AM. 1>_PrepareForClean: 1> Deleting file "Debug\mfc-app.lastbuildstate". 1>InitializeBuildStatus: 1> Creating "Debug\mfc-app.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>ClCompile: 1> stdafx.cpp 1> time(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c1xx.dll)=6.914s 1> time(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c2.dll)=0.064s …… 1> Generating Code... 1> time(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c2.dll)=0.011s …… 1> time(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c2.dll)=0.005s 1>Manifest: 1> Deleting file "Debug\mfc-app.exe.embed.manifest". 1>LinkEmbedManifest: 1> mfc-app.vcxproj -> C:\Users\user\documents\visual studio 2010\Projects\mfc-app\Debug\mfc-app.exe 1>FinalizeBuildStatus: 1> Deleting file "Debug\mfc-app.unsuccessfulbuild". 1> Touching "Debug\mfc-app.lastbuildstate". 1> 1>Build succeeded. 1> 1>Time Elapsed 00:00:10.92 ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== Using linker switch "/time"Add "/time" to your linker options directly on the command line or go to project properties and add "/time" to Additional options in Configuration Properties->Linker->Command Line. The highlighted text will tell you how much time was spent in each pass of the linker. See more on why linker does multiple passes here Note on LTCG: Link time code generation or LTCG is where the linker calls the back end (c2.dll) to do code generation. Thus, if you use generate LTCG builds, you may see that a lot of time is spent in the linker though it is the back end compiler that is doing all the work. 1>------ Rebuild All started: Project: mfc-app, Configuration: Debug Win32 ------ 1>Build started 1/13/2010 10:47:39 AM. 1>_PrepareForClean: 1> Deleting file "Debug\mfc-app.lastbuildstate". 1>InitializeBuildStatus: 1> Creating "Debug\mfc-app.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>ClCompile: …. 1> Generating Code... 1>Link: 1> Pass 1: Interval #1, time = 0.187s 1> Wait PDB close: Total time = 0.484s 1> Pass 2: Interval #2, time = 0.578s 1> Final: Total time = 0.765s 1>Manifest: 1> Deleting file "Debug\mfc-app.exe.embed.manifest". 1>LinkEmbedManifest: 1> IncrPass2: Interval #1, time = 0.062s 1> IncrPass2: Interval #2, time = 0.032s 1> Final: Total time = 0.094s 1> mfc-app.vcxproj -> C:\Users\user\documents\visual studio 2010\Projects\mfc-app\Debug\mfc-app.exe 1>FinalizeBuildStatus: 1> Deleting file "Debug\mfc-app.unsuccessfulbuild". 1> Touching "Debug\mfc-app.lastbuildstate". 1> 1>Build succeeded. 1> 1>Time Elapsed 00:00:10.82 ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
If you have any questions or have tips/stories that you would like to share, please post a comment to this blog and we will respond where appropriate. Vikas Bhatia VC++ Team | ||
CSharpQuery - A Fast Full Text Search Query Engine Posted: 16 Oct 2009 12:00 PM PDT CSharpQuery is a Full text search engine that can replace Microsoft Full Text Engine (FTE) and provide some enhancements to relevance, ranking, word breaking, and compound words. It can be used with or without a database, but is modeled to replace SQL FTE. | ||
Netflix, jQuery, JSONP, and OData Posted: 01 Apr 2010 02:58 PM PDT At the last MIX conference, Netflix announced that they are exposing their catalog of movie information using the OData protocol. This is great news! This means that you can take advantage of all of the advanced OData querying features against a live database of Netflix movies. In this blog entry, I'll demonstrate how you can use Netflix, jQuery, JSONP, and OData to create a simple movie lookup form. The form enables you to enter a movie title, or part of a movie title, and display a list of matching movies. For example, Figure 1 illustrates the movies displayed when you enter the value robot into the lookup form. Using the Netflix OData Catalog API You can learn about the Netflix OData Catalog API at the following website: http://developer...(read more) |
You are subscribed to email updates from "microsoft" via ehsan in Google Reader To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment