Alliagator Tags Archive for Thursday, May 1 2008



DotNetKicks.com Links
Master-Detail with the GridView, DetailsView and ModalPopup Controls ... A while back I wrote a post describing how the DetailsView, GridView, UpdatePanel and the AjaxControlToolkit's ModalPopup controls could be used to implement the common Master/Details UI pattern. I cheated a bit when creating my original example in that I didn't really complete the implementation - the Save button on the popup didn't actually do anything. Since writing that post I have received a lot of email and a number of people left comments asking me to complete the example - so here it is. If you plan on reading through this article, I recommend playing around with the demo site to get a feel for how the page works. All data changes are only persisted to memory, so don't worry about messing up the data set.Go
WPF performance profiling tools ... The WPF Performance Suite is a set of performance profiling tools that allow you to analyze the runtime behavior of your WPF application.Go
SubSonic & Oracle - Play Nice! ... Making SubSonic work right with Oracle when generating objects.Go
Improve Web Application Performance ... A good post with tips to improve the performance of your web app.Go
Microformat .NET ... A generic microformat parser. I thought this could use some attention from the .NET community!Go
MVC Storefront Part 6: Catalog Completion and Initial UI ... This is a long one - 20 minutes to be precise. I usually try to edit things pretty liberally, but I asked Jon Galloway to help me out with CSS and there was so much good stuff in there I decided to keep it all :). I also finish off my test data Spike, and talk about recent feedback with respect to the "Repository Pattern" I'm using.Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 4 ... In the fourth part of this series, Keyvan talks about the unit testing concepts related to the MVC pattern and how Microsoft has adapted these concepts for its ASP.NET MVC framework. He shows these principles and the process that should be followed to unit test an ASP.NET MVC application.Go
ASP.NET MVC Screencast: Model-based client-side validation ... A very sweet and simple way to get validation into an MVC app, just by specifying rules as attributes on model objects (e.g. [ValidateEmail]). Client-side validation happens automatically...Go
.NET Links of the Week for April 30th 2008 ... Links of great .NET resources I found in the past week or so.Go
Writing Unit test cases : Visual studio 2008 ... One of the great improvements of Visual Studio 2008 brought to developers is the built in support for unit testing. With Unit Testing support, it is very easy for developer to create, execute and repeat unit test cases.Go
How to Display Integrated Digg.com Comments on Your Website ... I recently implemented "integrated Digg.com comments" on my website using the Digg API and ASP.NET. This is an overview of how I did it, and how you can do it. Hope it's of use to somebody. Thanks.Go
BlogEngine Vulnerability Exposed ... Description of security hole in BlogEngine. Users need to upgrade to 1.3.1 or download the patch in the meantime.Go
Useful Datagrid Tips ... There are some frequent queries that are being asked in most of the forums and UG's regarding datagrid. I have compiled a list of useful tips from my previous posts and posted it here.Go
ASP.NET Tips: Printing an IP Address ... Getting the IP Address out of a System.Net.IPAddress object.Go
Delicious tagged ASP.NET Links
47 ASP.NET MVC Resources to Rock Your Development - Craig ShoemakerGo
CodeProject: .NET Page Life Cycle. Free source code and programming helpGo
Implementing Generic CachingGo
Dimebrain: Five recommendations for starting a startup with ASP.NETGo
Matt Berseth: AjaxControlToolkit TabContainer Theme GalleryGo
7 free online editors for your asp.net site (part 2)Go
IvonnaGo
SQL ViewStateGo
ASP.net MVC RoutingGo
ProgTalk - How to create your own Auto Suggest textbox without any AJAX frameworks.Go
IIS 7.0 Server-Side : IconHandler 2.0: file icons in your ASP.NET applicationsGo
ASP.NET.4GuysFromRolla.com: Examining ASP.NET's Membership, Roles, and Profile - Part 10Go
Scott Gu Blog Links
April 28th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC, Silverlight ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I've done myself in the past. ASP.NET Displaying the Number of Active Users on an ASP.NET Site : Scott Mitchell continues his excellent series on ASP.NET's membership, roles, and profile support.  In this article he discusses how to use ASP.NET's Membership features to estimate and display the number of active users currently visiting a site. ASP.NET Dynamic Data Update : The ASP.NET team last week released an update of the new ASP.NET Dynamic Data feature.  This update adds several new features including cleaner URL support using the same URL routing feature that ASP.NET MVC uses, as well as better confirmation, foreign-key, and template support.  ASP.NET Testing with Ivonna : Travis Illig blogs about a new testing framework named Ivonna that enables unit testing of ASP.NET web forms. ASP.NET AJAX ASP.NET AJAX UI Templates : Nikhil Kothari from the ASP.NET team has a cool post that shows off a prototype he has been working on that enables clean client-side AJAX templating of UI.  ASP.NET AJAX Control Toolkit TabContainer Theme Gallery : Matt Berseth has another of his excellent posts - this one shows off a bunch of cool themes you can use to style the TabContainer control in the ASP.NET AJAX Control Toolkit. Reducing Page Load Times with UpdatePanels and Timers : Paul Glavich posts of a cool trick you can use with tab controls to asynchronously load their content in the background in order to improve perceived page load time. Why do ASP.NET AJAX page methods have to be static? Dave Ward has a useful article that talks about the page methods feature in ASP.NET AJAX, and explains why they are static methods. JQuery Intellisense in VS 2008 : Brad Vincent posts about using the VS 2008 Web Development Hot-Fix we released in February to get a nice JavaScript intellisense experience in Visual Studio 2008 when using the JQuery AJAX library. ASP.NET MVC Inversion of Control, ASP.NET MVC and Unit Testing : Fredrik Kalseth has a cool article that talks about the concepts behind inversion of control (IOC) and how you can use this with ASP.NET MVC to better isolate dependencies and enable better unit testing of your code. Stephen Walther's ASP.NET MVC Talk: Stephen Walther delivered a many-hour ASP.NET MVC post conference talk at ASP.NET Connections last week.  You can download his slides + demos for free.  Also check out his previous posts on Unit Tests with Visual Studio 2008 and TDD with Rhino Mocks . MVC Contrib Project Update : Eric Hexter blogs about some of the latest updates to the open source MvcContrib project to work with the latest ASP.NET MVC interim source release . Testing Action Results with ASP.NET MVC : Jeremy Skinner blogs about some cool extension method helpers he has added to MvcContrib to enable pretty sweet testing of Controller actions. MVC Membership Starter Kit - 1.2 Release : Troy Goode has posted an update to his excellent MVC Membership Starter Kit.  This version works with the interim ASP.NET MVC source release. Silverlight Defining Silverlight DataGrid Columns at Runtime : Scott Morrison from the Silverlight team has a cool blog post that talks about how to define Silverlight DataGrid Columns via code at runtime.  Visit my Silverlight links page for more DataGrid posts. Silverlight HTTP Networking Stack (Part 1 ), (Part 2 ), (Part 3 ): Karen Corby from the Silverlight team has a great three part blog series that talks about the new Silverlight 2 networking stack and how cross domain security works with it. Pushing Data to a Silverlight Client with Sockets (Part 1) and (Part 2) : Dan Wahlin demonstrates how to implement a "GameStream" socket server and connect to it from a Silverlight client using Silverlight 2's built-in network sockets support.  Silverlight - the Song : Spike Xavier and Dan WaGo
Slides from my ASP.NET Connections Orlando Talks ... Last week I presented at the ASP.NET Connections Conference in Orlando.  I gave a general session talk on Monday, and then two breakout talks later that day.  You can download my slides+samples below: General Session The slides for my keynote can be downloaded here .  In the talk I demonstrated how to debug the .NET Framework source code.  You can learn how to set this up with VS 2008 here .  I also demonstrated building a site using the new ASP.NET Dynamic Data support - which you can learn more about here .  I also demonstrated using the new ASP.NET MVC Framework - which you can learn more about here . I also showed off the new Hard Rock Memorabilia site built with Silverlight 2.  You can try out the Hard Rock application yourself here .  You can learn more about Silverlight from my links page here . Building .NET Applications with Silverlight The slides + demos for Silverlight breakout talk can be downloaded here . You can learn more about Silverlight from my links page here .  In particular, I recommend reading my tutorial posts here and here . ASP.NET MVC The slides + demos for my ASP.NET MVC talk can be downloaded here . You can learn more about the latest ASP.NET MVC source refresh here .  Stephen Walther also just posted a really good set of slides + demos from his post conference tutorial on ASP.NET MVC here . Hope this helps, ScottGo
ASP.NET MVC Source Refresh Preview ... We recently opened up a new ASP.NET CodePlex Project that we will be using to provide previews (with buildable source code) for several upcoming ASP.NET features and releases. Last month we used it to publish the first drop of the ASP.NET MVC source code .  This first drop included the source for the ASP.NET MVC Preview 2 release that we shipped at MIX, along with Visual Studio project files to enable you to patch and build it yourself. A few hours ago we published a refresh of the ASP.NET MVC source code on the site.  This source refresh is not an official new ASP.NET MVC preview release - instead it is an interim drop that provides a look at the current state of the source tree.  We will ship the official "ASP.NET MVC Preview 3" release in a few weeks after we finish up some more work (more features and tweaks to existing ones, better VS tool integration, VS express edition support, documentation, etc).  If you are someone who wants a hassle-free installation of ASP.NET MVC to use that ships with documentation and full tool support you'll probably want to wait for this official preview release.  If you are someone who wants a chance to see an early "preview of the preview" and have the opportunity to start using and giving feedback on some of the features immediately, today's source refresh is probably interesting to look at. Improvements with this ASP.NET MVC Source Refresh This week's update (which you can download here ) includes a number of improvements to ASP.NET MVC.  Some of these include: In addition to posting the source code for the ASP.NET MVC framework, we are also posting the source code for the unit tests that we use to test it.  These tests are implemented using MSTest and the open source Moq mocking framework.  A VS 2008 project file for the unit tests is included to make it easy to build and run them locally within your VS 2008 IDE. Significantly easier support for testing Controller classes.  You can now unit test common Controller scenarios without having to mock any objects (more details on how this works below). Several nice feature additions and usability improvements to the URL routing system (more details below). Creating a New ASP.NET MVC Project You can build your own copy of the ASP.NET MVC assemblies by downloading the MVC source and compiling it locally, or alternatively you can download a VS Template package to get a pre-built version of them along with a Visual Studio project template that you can use to quickly build a new ASP.NET MVC Project that uses the latest bits. After you install the ASP.NET MVC source refresh .VSI template, a new "ASP.NET MVC Application" project template will show up under the "My Templates" section of your "New Project" dialog: This new "My Templates" version of the MVC project template lives side-by-side with the previous ASP.NET MVC Preview 2 release (which you can see above it in the main project templates section of the dialog).  This allows you to safely create new projects and and use both the latest source version and the last official preview version on the same machine. When you create a new project using this updated ASP.NET MVC Project template you'll by default get a project that looks like below: This new project solution contains one Controller ("HomeController") under the "\Controllers" directory and two View templates ("About" and "Index") under the "\Views\Home" sub-directory.  Both view templates are based on a common master page for the site ("Site.master"), all of whose styles are defined within a "Site.css" file under the "\Content" directory. When you run the application the built-in web-server will automatically start up and you'll see the site's "Home" content: Clicking the "About us" tab will then display the "About" content: The "HomeController" class in the project is responsible for handling both of the URLs above and has two action methods like below: The default "Site.master" templatGo
April 11th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC, Visual Studio, Silverlight ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I've done myself in the past. ASP.NET More ASP.NET Security Tutorials : The last three of Scott Mitchell's excellent ASP.NET security tutorials .  His final three articles cover how to select user accounts, recover and change passwords, and unlock and approve user accounts. Building a VS 2008 Styled Grid with the ListView and DataPager Controls : Matt Berseth has a great article that talks about techniques you can use with the new ASP.NET 3.5 ListView control to create a nicely styled Grid UI - while preserving total control over the HTML and CSS used.  Also read his follow-up post here that talks about how to achieve the same UI with the GridView control. 50 Useful CSS Tips and Tricks: A useful page that provides a nice listing of various CSS tips, tricks and tools you can use for common web scenarios. Using a DataPager with the GridView Control - Implementing IPageableItemContainer : Matt Berseth has a cool article that shows how to use the new IPageableItemContainer interface to implement paging support with the new ASP.NET 3.5 DataPager control. ASP.NET AJAX Accessible UpdatePanel : Bertrand Le Roy from the ASP.NET team has an article that describes how to make the ASP.NET AJAX's UpdatePanel control accessible for screen-readers. ASP.NET AJAX Meets Virtual Earth : Alessandro Gallo, author of the excellent ASP.NET AJAX in Action book, has a nice series of articles that talks about using ASP.NET AJAX with Virtual Earth to implement mapping on your site. Faster Page Loading by Moving ASP.NET AJAX Scripts after visible content : Omar Al Zabir (the co-founder of www.PageFlakes.com ) has a great article that describes a nice technique you can use to improve the perceived loading performance of an ASP.NET AJAX page.  I also highly recommend reading Omar's great Building a Web 2.0 Portal with ASP.NET 3.5 book to learn some of his other suggestions and techniques. 3 Tips for Working with ASP.NET AJAX's TabContainer Control : Matt Berseth continues his great articles on ASP.NET AJAX with some tips on working with the TabContainer control in the ASP.NET AJAX Control Toolkit. Building ASP.NET AJAX Components: Mike Ormond has written an excellent 8-part series that covers building re-usable ASP.NET AJAX components that work on both the client and server. ASP.NET MVC An Introduction to ASP.NET MVC using VB : Bill Burrows from www.MyVBprof.com has put together a great set of online videos that introduce ASP.NET MVC using Visual Basic.  Also make sure to check out his video series on LINQ to XML using VB and LINQ to SQL using VB . ASP.NET MVC: Membership Starter Kit : Troy Goode has a built an awesome membership starter kit for ASP.NET MVC that provides registration and login pages for users to authenticate on your site, as well as a set of administration functionality that allows admins to create/manage users and roles.  Download it here . ASP.NET MVC: Action Filter for Handling Errors : Troy Goode has another good post that provides some ASP.NET MVC action filters for catching and handling runtime errors. How to Enable Pretty URLs with ASP.NET MVC and IIS6: James Geurts posts a useful article that describes how to enable extension-less URLs with ASP.NET MVC on IIS6 (note: you do not need to configure anything special with ASP.NET MVC on IIS7 to enable extension-less URL support). Visual Studio PowerCommands for Visual Studio 2008 : A free set of useful extensions for VS 2008 that add a bunch of cool features to the IDE. Coding Productivity: Macros, Shortcuts and Snippets : Kirill Osenkov has a nice blog post that shows of how to use Visual Studio's macro feature to custom record useful time-savers. Silverlight Dave Campbell's Excellent Silverlight Link Series : Dave Campbell posts a regular series of links to new Silverlight articles and conteGo
ASP.NET Dynamic Data Preview Available ... A few months ago we released an ASP.NET 3.5 Extensions Preview that contained a bunch of new features that will be shipping later this year (including ASP.NET AJAX Improvements, ASP.NET MVC, ASP.NET Silverlight Support, and ASP.NET Dynamic Data). The ASP.NET Dynamic Data support within that preview provided a first look at a cool new feature that enables you to quickly build data driven web-sites that work against a LINQ to SQL or LINQ to Entities object model.  ASP.NET Dynamic Data allows you to automatically render fully functional data entry and reporting pages that are dynamically constructed from your ORM data model meta-data.  In addition to supporting a dynamic rendering mode, it also allows you to optionally override and customize any of the view templates using any HTML or code you want (given you full control of the experience). ASP.NET Dynamic Data Preview Today we released an updated ASP.NET Dynamic Data Preview.  You can learn more about it and download it here . This new dynamic data preview now works with the standard built-in ASP.NET data controls (GridView, ListView, FormView, DetailsView, etc).  The dynamic data support enables these controls to automatically handle foreign-key relationships.  For example, on a gridview you'll now get automatic friendly name display of foreign key column values and automatic drop-down list selection support of these values when in edit mode: The new dynamic data support also provides automatic UI validation support (both client-side and server-side) based on the constraints you set on your data model classes.  For example, if a column in the database is limited to 50 characters in size, and is marked as non-nullable, appropriate UI control validators will automatically be applied by ASP.NET dynamic data to enforce this constraint in the UI pages as well.  If you change the constraints within your LINQ to SQL or LINQ to Entities data model classes, the UI will automatically pick up these changes and enforce the new constraints on the next web request. In addition to standard data model metadata, you can also declare custom metadata to further control validation and the default display of UI of objects.  You will be able to use all of the above features with both LINQ to SQL and LINQ to Entities. Visual Studio Dynamic Data Project Wizard In addition to the core ASP.NET dynamic data runtime support, the VS web tools team today also shipped a first preview of a new dynamic data project wizard that enables you to quickly get a data driven web-site started.  The wizard allows you to select a database, and then the tables, views and sprocs within it that you want to build a LINQ to SQL data model around: After creating a data model, the wizard allows you to easily choose dynamic data driven template pages to build UI around it: You can then choose what type of inserting/editing/updating UI is supported on each page: And when you click finish it will setup a project with your data model classes and data UI pages setup to run.  You can learn more about the wizard and watch it in action in a blog post and screencast here . How to Get Started You can learn more about this new dynamic data preview and download and run it locally here . You can watch David Ebbo's dynamic data presentation at MIX 08 to learn more about how it works.  Also check out Scott Hunter's screen-cast here , and Brad Millington's screen cast here .  David also has a post here that talks about the changes made between the December preview and today's preview release. You can ask questions and submit feedback via the www.asp.net forums here . Hope this helps, ScottGo
Tip/Trick: Creating and Using Silverlight and WPF User Controls ... One of the fundamental design goals of Silverlight and WPF is to enable developers to be able to easily encapsulate UI functionality into re-usable controls. You can implement new custom controls by deriving a class from one of the existing Control classes (either a Control base class or from a control like TextBox, Button, etc).  Alternatively you can create re-usable User Controls - which make it easy to use a XAML markup file to compose a control's UI (and which makes them super easy to build). In Part 6 of my Digg.com tutorial blog series I showed how to create a new user control using VS 2008's "Add New Item" project item dialog and by then defining UI within it.  This approach works great when you know up front that you want to encapsulate UI in a user control.  You can also use the same technique with Expression Blend. Taking Existing UI and Encapsulating it as a User Control Sometimes you don't always know you want to encapsulate some UI functionality as a re-usable user control until after you've already started defining it on a parent page or control. For example, we might be working on a form where we want to enable a user to enter shipping and billing information.  We might begin by creating some UI to encapsulate the address information.  To-do this we could add a <border> control to the page, nest a grid layout panel inside it (with 2 columns and 4 rows), and then place labels and textbox controls within it: After carefully laying it all out, we might realize "hey - we are going to use the exact same UI for the billing address as well, maybe we should create a re-usable address user control so that we can avoid repeating ourselves".  We could use the "add new item" project template approach to create a blank new user control and then copy/paste the above UI contents into it.  An even faster trick that we can use within Blend, though, is to just select the controls we want to encapsulate as a user control in the designer, and then "right click" and choose the "Make Control" menu option: When we select the "Make Control" menu item, Blend will prompt us for the name of a new user control to create: We'll name it "AddressUserControl" and hit ok. This will cause Blend to create a new user control that contains the content we selected: When we do a re-build of the project and go back to the original page, we'll see the same UI as before - except that the address UI is now encapsulated inside the AddressUserControl: We could name this first AddressUserControl "ShippingAddress" and then add a second instance of the user control to the page to record the billing address (we'll name this second control instance "BillingAddress"): And now if we want to change the look of our addresses, we can do it in a single place and have it apply for both the shipping and billing information. Data Binding Address Objects to our AddressUserControl Now that we have some user controls that encapsulate our Address UI, let's create an Address data model class that we can use to bind them against.  We'll define the class like below (taking advantage of the new automatic properties language feature): Within the code-behind file of our Page.xaml file we can then instantiate two instances of our Address object - one for the shipping address and one for the billing address (for the purposes of this sample we'll populate them with dummy data).  We'll then programmatically bind the Address objects to our AddressUserControls on the page.  We'll do that by setting the "DataContext" property on each user control to the appropriate shipping or billing address data model instance: Our last step will be to declaratively add {Binding} statements within our AddressUserControl.xaml file that will setup two-way databinding relationships between the "Text" properties of the TextBox controls within the user control and the properties on the Address data model object that we attached to the user control: WGo
Unit Testing with Silverlight ... One of the important capabilities we shipped with the Beta1 release of Silverlight 2 was a unit test harness that enables you to perform both API-level and UI-level unit testing.  This testing harness is cross browser and cross platform, and can be used to quickly run and verify automated unit tests: In addition to shipping this unit test harness for Silverlight, we also shipped the source to ~2,000 unit tests built with it that provide automated coverage for the Silverlight control source that we also shipped under a permissive license (you can take the control source, modify it, run the unit tests to verify the behavior, then re-ship the controls however you want). Learning How to Unit Test Silverlight Jeff Wilcox (who developed the Silverlight unit test framework and harness) has a great blog post that talks about how to add a Silverlight Unit Test project to a solution here . You can download the chat application that he shows testing from this expression blend blog post tutorial I did last month.  You can also watch this cool video post that Jeff created where he walks through the unit test framework and test cases we've shipped. As Jeff shows in his post, you can now add a "Silverlight Test Project" to your Visual Studio solution which encapsulates unit tests for an application you are working on: You can then add unit test classes to the test project that test APIs or simulate UI action within the Silverlight controls (simulate button clicks, etc). You can then run the test project and execute the tests within it to verify and report their status. Jeff's test framework automatically provides a browser based test harness and reporting system (which means you can run it on any browser/OS combination that Silverlight runs on): Jeff's test framework supports quickly re-setting controls after each test (and avoids needing to re-launch a new browser instance for each test cases - which makes it really fast). You can quickly rip through hundreds or thousands of automated tests in seconds: Green results mean the tests passed.  Red results flag that a test case failed and log the assertion failure and/or runtime exceptions that occurred. Summary If you've ever struggled to try and come up with a strategy for doing automated unit testing or TDD with AJAX applications, I think you'll find Silverlight provides some much nicer test options.  Using Visual Studio you can also separate your tests into a separate project in your solution, and you do not need to embed the tests within your Silverlight application in order for them to run. In addition to supporting the above unit test harness and framework, we are also going to support UI automation APIs with the final release of Silverlight 2.  These will enable accessibility scenarios (allowing screen readers to work with Silverlight and enable Section 508 compliance of Silverlight applications).  These UI automation APIs will also enable UI testing scenarios where you can build end to end browser UI automation that simulates real mouse and keyboard interactions and enables automated end to end experience testing.  The combination should enable you to build much more solid and maintainable RIA solutions. Hope this helps, Scott P.S. For more tutorial posts and links on Silverlight 2, check out my new "Silverlight Tips, Tricks, Tutorials and Links" page.Go
March 28th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC, Visual Studio, Silverlight, .NET ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET Three New ASP.NET Security Tutorials Now Available : Scott Mitchell continues his great ASP.NET security tutorials . These three new ones cover creating and managing roles, assigning roles to users, and implementing role based authorization.  You can also find more security articles by reading posts on my blog tagged with security . .NET Libraries to Digg, Flickr, Facebook, YouTube, Twitter, and other Web 2.0 APIs : Scott Hanselman's latest "weekly source code" review looks at .NET APIs that you can use to call popular web 2.0 services. Hangs and how to Solve Them (Part 1) and (Part 2) : Tom has some useful posts that talk about deadlocks and request queuing in ASP.NET, and how to detect and debug what might be causing them. ASP.NET AJAX Building ASP.NET AJAX Controls (Part 1) , (Part 2) , and (Part 3) : Mike Ormond has started a nice blog post series that talks about how to build ASP.NET AJAX Controls.  Make sure to check out Part 2 - Components and Part 3 - Properties and Events as well. New ASP.NET AJAX "How Do I?" Videos : Joe Stagner has published a number of new ASP.NET AJAX "How Do I?" videos.  Learn about the re-order control , retrieving values from server-side AJAX controls , two techniques for triggering updates to update panels , and using the cascading drop down control . Real-Time Progress Bar with ASP.NET AJAX: SingingEels shows a technique for displaying real-time progress notifications using AJAX as a long-lived activity runs on the server. Using JQuery to Consume ASP.NET AJAX JSON Web Services : Dave Ward has a nice post that describes how to use the JQuery AJAX library on the client to call an ASP.NET Web Service on the server that is JSON enabled (using ASP.NET AJAX on the server).  ASP.NET MVC Kigg - Building a Digg Clone with ASP.NET MVC : Kazi Manzur Rashid published an excellent Digg-clone sample built with ASP.NET MVC last February.  He recently updated the code to work with ASP.NET MVC Preview 2 (full details here ).  You can download the latest version of his source code here . ASP.NET MVC In-Depth: The Life of an ASP.NET Request : Stephen Walther has a great post that details the exact steps that occur when an ASP.NET MVC request executes.  ASP.NET MVC Action Filters - Caching and Compression : Kazi Manzur Rashid has another great post that shows how to use the new ActionFilterAttribute support in ASP.NET MVC to implement output caching and compression attributes. Read this quickstart article to learn more about how Action Filters work, or watch Scott Hanselman's video that covers them. Defining Routes using Regular Expressions with ASP.NET MVC : Someone asked me the other day how to use regular expressions to define route rules with ASP.NET MVC.  Turns out Fredrik Kalseth already has a nice sample that shows how to-do this. Testing with the ASP.NET MVC Framework : Simone Chiaretta has a great article that discusses how to test controllers using ASP.NET MVC Preview 2.  Note: the next ASP.NET MVC preview release will include a number of refactorings that will simplify controller testing considerably (and avoid the need to mock anything for common scenarios). Test-Driven Development with Visual Studio 2008 Unit Tests : Stephen Walther has a really nice post that describe how the unit testing features now built-in VS 2008 Professional work (using an ASP.NET MVC project).  Also check out Stephen's excellent Introduction to Rhino Mocks blog post that describes how to use the open source Rhino Mocks framework with VS unit test projects. Visual Studio VS 2008 Web Deployment Hot-Fix Roll-Up Now Available for non-English Languages: Last month we shipped a hot-fix release that fixes a number of bugs, adds a few features, and improves performance for web development scenarios in VS 200Go
New Log Reporting, Database Management, and other cool admin modules for IIS 7 ... One of the core priorities we focused on when building IIS 7 was to enable a rich .NET extensibility model that provides developers with the hooks to easily plug-in and extend the web server.  These extensibility hooks are provided in the web-server pipeline (enabling scenarios like the new IIS7 Bit Rate Throttler ), within the configuration system (enabling developers to create new web.config schema settings), within the health monitoring system (enabling developers to add custom trace events), and within the admin tool (enabling developers to plug-in new admin UI modules). We added these extensibility hooks so that anyone can easily extend and enhance the web server using .NET.  We also selfishly wanted them so that we can ship regular feature packs that add additional features to the core web server. IIS 7 Admin Pack Preview 1 Released Last week the IIS team shipped the first technical preview of some really cool administration modules that I think web developers will find super useful.  This preview adds several new features to the IIS7 Admin Tool: Database Manager : Built-in SQL Server database management, including the ability to create, delete, and edit tables and indexes, create/edit SPROCs and execute custom queries.  Because it is integrated in the IIS administration tool it all works over HTTP/SSL - which means you can use the module to remotely manage your hosted applications (even with low-cost shared hosting accounts), without having to expose your database directly on the Internet. Log Reports : Built-in report visualization with charting support for log files data.  Full range selection and custom chart creation is supported, as well as the ability to print or save reports.  Like the database manager you can use this module remotely over HTTP/SSL - which means it works in remote shared hosting scenarios. Configuration Editor: This is a power module that provides complete control over editing all web.config settings within the admin tool.  You can configure it to track the changes you make using the UI and have it auto-generate configuration change scripts that you can then save and tweak to re-run later in an automated way. Request Filtering UI: This admin module provides more control over the new request filtering feature in IIS7.  Check out Carlos' blog post here for details on how to use it. .NET Authorization: This admin module provides a custom authorization rules editor which allows you to more easily manage the ASP.NET <authorization> configuration section. FastCGI UI: This admin module provides more support for editing all the new <fastCGI> settings (for when you use FastCGI modules with IIS7 like PHP). Below are some screen-shots and simple walkthroughs of the Log Reporting and Database Manager administration UI modules: Log Reporting Admin Module Have you ever deployed a web application onto a server and wondered how much load it is getting?, what the average response time from the server is?, or whether many server errors are occurring (and if so on what URLs)?  All of these settings are carefully logged by IIS in a text based log file.  Today most people use command-line tools like the IIS Log Parser utility to query and analyze these files. The IIS 7 Admin Pack and the new "IIS Reports" admin module now enable you to also query and chart your reports graphically within the IIS admin tool: Out of the box the "IIS Reports" admin module comes with a bunch of pre-built logparser-based reports that you can easily run on your sites and applications: Below is a simple graphical report we could pull up that looks at the HTTP status codes being returned by my "TestSite" application (note how we are using the "bar graph" visualization option): Reports can optionally be filtered using a date range.  You can also push the print or save buttons within the report page to generate a printer or a local saved version of the report. The IIS7 Admin ToGo
ASP.NET MVC Source Code Now Available ... Last month I blogged about our ASP.NET MVC Roadmap . Two weeks ago we shipped the ASP.NET Preview 2 Release . Phil Haack from the ASP.NET team published a good blog post about the release here . Scott Hanselman has created a bunch of great ASP.NET MVC tutorial videos that you can watch to learn more about it here . One of the things I mentioned in my MVC roadmap post was that we would be publishing the source code for the ASP.NET MVC Framework, and enable it to be easily built, debugged, and patched (so that you can work around any bugs you encounter without having to wait for the next preview refresh release). Today we opened up a new ASP.NET CodePlex project that we'll be using to share buildable source for multiple upcoming ASP.NET releases. You can now directly download buildable source and project files for the ASP.NET MVC Preview 2 release here . Building the ASP.NET MVC Framework You can download a .zip file containing the source code for the ASP.NET MVC Framework for the release page here . When you extract the .zip file you can drill into its "MVC" sub-folder to find a VS 2008 solution file for the project: Double-clicking it will open the MVC project containing the MVC source within VS 2008: When you do a build it will compile the project and output a System.Web.Mvc.dll assembly under a \bin directory at the top of the .zip directory. You can then copy this assembly into a project or application and use it. Note: the license doesn't enable you to redistribute your custom binary version of ASP.NET MVC (we want to avoid having multiple incompatible ASP.NET MVC versions floating around and colliding with each other). But it does enable you to make fixes to the code, rebuild it, and avoid getting blocked by an interim bug you can't work around. Next Steps Our plans are to release regular drops of the source code going forward. We'll release source updates every time we do official preview drops. We will also release interim source refreshes in between the preview drops if you want to be able to track and build the source more frequently. We are also hoping to ship our unit test suite for ASP.NET MVC in the future as well (right now we use an internal mocking framework within our tests, and we are still doing some work to refactor this dependency before shipping them as well). Hope this helps, ScottGo
IIS 7.0 Bit Rate Throttling Module Released ... Video on the web is now one of those common scenarios that every user takes for granted, and increasingly every major site is incorporating in some form (product videos, training videos, richer advertising scenarios, user generated content, customer testimonials, etc). One of the challenges when adding video to a site, though, is delivering it in a way that doesn't cost a fortune. Network bandwidth costs a lot of money, and the cost of high quality video usage can quickly add up. The blog post below provides a quick overview of some of the options you can use to reduce the cost of delivering video, and discusses a new free download - the IIS 7.0 Bit Rate Throttling Module - that was released a few days ago and which enables you to easily save money when serving video from an IIS web server using any video technology (including Silverlight, Windows Media Player and even Flash). Option 1: Using a Video Hosting Service One approach you can take to reduce video bandwidth costs is to use a video hosting service like YouTube or the free Microsoft Silverlight Streaming Service . This allows you to use someone else's network to deliver the video content, and avoid having to pay the bandwidth costs yourself. If you aren't familiar with the Silverlight Streaming service, it allows you to upload up to 10GB of videos and download 5 Terabytes/month of video content (at up to a 1.4 Mbps bit-rate) for free. You can build any custom Silverlight client player application you want to embed the video within it. This means it doesn't require a specific video player look and feel, nor a service logo/watermark to play the video. This allows you to fully integrate the video into your site and use whatever UI you want to host it. Option 2: Hosting Video on Your Own Servers Sometimes using a video hosting service doesn't make sense (for example: you want to use custom authentication to grant/deny user's access, you want to play really long video segments, or you want to serve up custom ads in your videos). Instead you might want to serve the video up from your own servers and have complete control over it. There are typically two options you can use to deliver the video from your servers: using a streaming approach or a progressive video download approach: Streaming Server Scenario In a streaming scenario a client (like Silverlight, Windows Media Player, Flash or Real Networks) connects to a streaming server. The streaming server then sends down the video stream to watch, and typically enables a user to dynamically skip ahead/behind, pause or stop the video stream. When the user closes the browser or navigates away from the page the video stream automatically stops transmitting. Windows Media Services (WMS) is a free streaming server download available for Windows, and can stream video to both Windows Media Player and cross-platform Silverlight browser clients. It is generally regarded as the most server scalable and cost effective way to enable video streaming on the web, and handles both on-demand file streaming scenarios (for example: streaming a .wmv file) as well as live stream scenarios (for example: a sporting event like the Olympics that is happening live in real time). Windows Media Services can be used on any version of Windows Server - including the new Windows Server 2008 Web Server edition (which only costs $469, enables up to 4 processors and 32GB of RAM, and supports IIS, ASP.NET, SharePoint, and Windows Media Services). Progressive Download Scenario In a progressive download scenario a client (like Flash or Silverlight) downloads a video directly off of a web-server, and begins playing it once enough video is downloaded for it to play smoothly. The benefit of using a progressive download approach is that it is super easy to setup on a web-server. Just copy/ftp a video up to a web-server, obtain a URL to it, and you can wire it up to a video client player. It doesn't require any custom web-server configuratGo
March 14th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC and .NET ... I'm slowly recovering from keynoting at MIX last week, and have been digging my way out of backlogged email the last few days.  I'm going to try and finish catching up on blog comments this weekend - apologies for the delay in getting back to some of your questions. To kick-start my blogging again I thought I'd post a new link-listing series .  Today's post is mostly focused on ASP.NET and web related links.  I'm going to be doing more Silverlight and WPF posts soon. ASP.NET Tag Cloud Filters with ASP.NET 3.5's LinqDataSource and ListView Controls : Matt Berseth has a cool post that shows off using LINQ to SQL and ASP.NET 3.5 to build a tag-cloud navigation UI. Five New ASP.NET Security Tutorials Now Available : Scott Mitchell continues his great ASP.NET security tutorials .  These 5 new ones (all in both VB and C#) cover using the ASP.NET membership system. Building a Vista Style Folder Browser with ASP.NET 3.5 and a Custom Hierarchical DataSource Control: Matt Berseth continues his great posts with a nice one that shows how to build a custom HierarchicalDataSourceControl to implement file browsing functionality using ASP.NET. ASP.NET AJAX New ASP.NET AJAX Control Toolkit Release: David Anson blogs about a new ASP.NET AJAX Control Toolkit release that the team made right before MIX.  This release includes a number of patches (including a bunch from the community) with bug fixes and improvements in a bunch of areas. LinkedIn Style Theme for the ASP.NET AJAX Tab Container Control: Matt Berseth posts some cool new themes you can use with the ASP.NET AJAX Control Toolkit's tab control. ASP.NET AJAX In-Depth: Object Inheritance : Stephen Walther, author of the recently published ASP.NET 3.5 Unleashed book , posts an incredibly in-depth article about how object inheritance is handled with ASP.NET AJAX. ASP.NET AJAX In-Depth: Creating JavaScript Properties: Stephen Walther continues his series with an in-depth article discussing how JavaScript Properties are handled with ASP.NET AJAX. ASP.NET AJAX In-Depth: Application Events : Yes another Stephen Walther article discussing how application events are handled with ASP.NET AJAX. ASP.NET AJAX Localization Slides and Code: Joel Rumerman has a nice post with samples + slides about how the localization features in ASP.NET AJAX work. JScript Intellisense: working with Ext JS : The VS web tools team enabled JQuery intellisense last month with the VS 2008 Web Development hot fix .  In this more recent post they talk about enabling intellisense support for Ext JS (another popular JavaScript framework).  VS 2008 Intellisense support for Prototype is coming in the next few weeks. JavaScript Intellisense for the Virtual Earth Map Control: Marc Schweigert is driving a project to add great VS 2008 JavaScript intellisense support for the Virtual Earth Map Control.  Check out his video and visit his codeplex project to learn more. ASP.NET MVC ASP.NET MVC Preview 2: Last week at MIX the ASP.NET team shipped a second preview release of the ASP.NET MVC framework.  This release has a number of improvements in it (see my earlier MVC roadmap post that covers some of them).  Watch the Scott Hanselman videos on the http://www.asp.net/mvc page, as well as the quickstart samples to learn more. Thoughts on ASP.NET MVC Preview 2 and Beyond : Phil Haack from the ASP.NET team has a great post where he talks about the ASP.NET MVC Preview 2 release, as well as some of the features and work that will show up in the next preview drop.  One of the major focuses in Preview 3 will be improvements to the testing workflow of controllers. Cheesy Northwind Sample Code: Scott Hanselman has posted a sample application that shows building a simple data driven application using the ASP.NET MVC Framework and the Northwind sample database. Securing Your Controller Actions : Rob Conery shows how to use the new ASP.NET MVC ActionFilterAttribute feature to apply declarative secuGo
My Presentations in Arizona this Tuesday ... Update: You can now download the slides + demos I used during my talks. Click here for the Silverlight Talk . Click here for the MVC Talk . This week I'm visiting Scottsdale Arizona and will be presenting at a free user group event during the day. I'm presenting two sessions myself: 1) Developing Applications using Silverlight 2 : This will be a drill-down into the new Silverlight 2 Beta1 release, and how you can build applications with it using VS 2008 and Expression Blend. You'll leave this session with a good understanding of the basics of Silverlight programming and how to start building applications with it. 2) Developing Applications using ASP.NET MVC : This session will be a drill-down into the new ASP.NET Model-View-Controller framework option (which last week was updated . You'll leave this session with a good understanding of what it is, how it works, and how to start building ASP.NET web applications with it. In addition to my sessions above, there will also be great sessions at the event from Microsoft employees on "Consuming Web Services with Microsoft Silverlight", "Encoding Video for Microsoft Silverlight", and "Serving Applications with Microsoft Silverlight Streaming". You can sign up and attend the sessions for free. Click here for more details on the events, and click here to register online to attend. Hope to see some of you there, ScottGo
First Look at Using Expression Blend with Silverlight 2 ... Last week I did a First Look at Silverlight 2 post that talked about the upcoming Silverlight 2 Beta1 release. In the post I linked to some end-to-end tutorials I've written that walk through some of the fundamental programming concepts behind Silverlight and WPF, and demonstrate how to use them to build a "Digg Search Client" application using Silverlight: Part 1: Creating "Hello World" with Silverlight 2 and VS 2008 Part 2: Using Layout Management Part 3: Using Networking to Retrieve Data and Populate a DataGrid Part 4: Using Style Elements to Better Encapsulate Look and Feel Part 5: Using the ListBox and DataBinding to Display List Data Part 6: Using User Controls to Implement Master/Details Scenarios Part 7: Using Templates to Customize Control Look and Feel Part 8: Creating a Digg Desktop Version of our Application using WPF In this first set of Silverlight tutorials I didn't use a visual design tool to build the UI, and instead focused on showing the underlying XAML UI markup (which I think helps to explain the core programming concepts better). Now that we've finished covering the basics - let's explore some of the tools we can use to be even more productive. Expression Blend Support for Silverlight In addition to releasing the upcoming Beta1 of Silverlight 2, we are also going to ship Visual Studio 2008 and Expression Studio tool support for targeting it. These tools will offer a ton of power for building RIA solutions, and are designed to enable developers and designers to easily work on projects together. In today's post I'm going to introduce some of the features in the upcoming Expression Blend 2.5 March preview. After demonstrating some of the basics of how Blend works, we are going to use it to build a cross-platform, cross-browser Silverlight IM chat client: The above screen-shot shows what the application looks like at runtime on a Mac. Below is a screen-shot of what it looks like at design-time within Expression Blend: We'll use Expression Blend to graphically construct all of the UI for the application, as well as use it to cleanly data-bind the UI to .NET classes that represent our chat session and chat messages. <Download Code> Click here to download a completed version of this sample. </Download Code> All of the controls we'll use to build the chat application are built into Beta1 of Silverlight 2. Disclaimer: I am not a designer (nor am I cool) Let me say up front that I am a developer and not a designer. I'm also not very cool. While I understand the techniques to create UI, I sometimes choose bad colors and fonts when putting it together (only after I did all the screen-shots for this post did a co-worker helpfully point out that there is actually a site dedicated to banning some of the fonts and colors I used . Ouch). For those of you with artistic skill out there - please be gentle with me and focus your attention on the features and techniques I demonstrate below, rather than on the font and color choices I use. :-) Getting Started: Creating a new Silverlight 2 Project Expression Blend and Visual Studio 2008 share the same solution/project file format, which means that you can create a new Silverlight project in VS 2008 and then open it in Expression Blend, or you can create a new Silverlight project in Expression Blend and open it in VS. You can also have both Expression Blend and VS 2008 open and editing the same project as the same time. Since in my previous Silverlight tutorial series I already showed how to create a new Silverlight project using VS 2008, let's use this post to show how to create a new Silverlight application using Expression Blend. To do this, simply choose File->New Project in Expression Blend, select the "Silverlight 2 Application" icon, and click ok: This will create a new (VS-compatible) solution file and Silverlight application project: Blend includes a full WYSIWYG designer for Silverlight 2 appliGo
ASP.net.com Community Links
Creating Data Bound Templated Control ... Data bound controls are most popular amongst developers because of their verticality. Controls such as GridView and DataList are popular not just because they provide rich features out of the box but because they allow great deal of customization. To that end templates go a long way in providing a customized look and feel. The concept of templates can be extended to custom controls also. With templates in place you can customize the way your data is presented to the user. This lesson is going to illustrate how this can be done.Go
How To Use Tree Menu Based On User Credentials ... This is a simple tutorial using Master Pages and a Tree Menu control with Visual Studio 2005. The Tree Menu is dynamically generated, allowing the developer to show a different menu based on the user's role.Go
Lazy Loading the ASP.NET AJAX TabContainer Control ... This article gives an introduction to the ASP.NET AJAX Control Toolkit and a few of the controls. It also takes a look in depth at the TabContainer control and shows how to use it to load tabs on demand -- lazy loading.Go
Unit Testing Membership and Role Providers ... Unit Testing allows the developer to create solid applications that will last the changes in the future. There are several articles on GridViewGuy that covers the concepts and benefits of Unit Testing. In this article we are going to go one step further and create Unit Tests for our Membership and Role providers.Go
The Making of Blogo.NET ... This article explains in detail how I developed Blogo.NET, a N-tiered blog application based upon the .NET 3.5 Framework.Go
ASP.NET Validation Controls – Important Points, Tips and Tricks ... ASP.NET validation controls provide an easy-to-use but powerful mechanism of ensuring that data is entered correctly on the forms. There are 6 validation controls included in the ASP.NET 2.0 and ASP.NET 3.5 versions. In this article, let us see some tips and tricks that can be applied to the validation controls.Go
How to call Server-Side function from Client-Side Code Using PageMethods in ASP.NET AJAX ... You cannot call server-side code ‘directly’ from client-side code. However, there are some workarounds. To call server-side code from Javascript, you will need to use AJAX, and the easiest way out is to use the ASP.NET AJAX Extensions. In this article, we will be using PageMethods to call server-side functions using Javascript.Go
How to Create Your Own Auto Suggest Textbox Without Any AJAX Frameworks ... We will use basic Javascript and .NET to create a feature to allow auto suggests as a user types.Go
Using Design Time Attributes ... Developing a nice custom control is just one part of the story. You can enhance the experience of other developers using your control by providing proper designer support. A set of attributes often called as Design Time Attributes allow you to accomplish this.Go
Dissecting LINQ to SQL ... Where LINQ to SQL shines as compared to other ORM tools in the market is the fact that it abstracts away the database structure behind our business objects, it also supports a query language called LINQ. The article talks about LINQ to SQL execution plans and how it manages its object state.Go
CodeProject.com ASP Links
Schemaless C#-XML data binding with VTD-XML ... Agile, efficient XML data binding without schemaGo
Client Side Validation For The CheckBoxes Inside The GridView ... This article describes how to count selected CheckBoxes inside a GridView controlGo
Selecting / Deselecting All The CheckBoxes Inside The GridView ... This article describes how to select & unselect all the CheckBoxes inside the GridView controlGo
Query string encryption for ASP.NET ... Clear text query strings are a potential security threat for your web application. Thus, query strings should be always encrypted.Go
An extensible DotNetNuke Google Sitemap Generator ... Building a DotNetNuke Sitemap Generator using the ASP.NET Provider modelGo
XML(SOAP) Message to Object Mapper ... A message manager to map XML response messages to javascript objectsGo
GridView Rows Navigation Using The Arrow (Up/Down) Keys. ... This article describes how to navigate GridView rows with the help of the arrow (up/down) keys using JavaScript.Go
Navigational Workflows Unleashed In WWF/ASP.NET 3.5 ... Case-study on the internals of a Navigational Workflow engine for a fictional dating website called “World Wide Dating.”Go
An introduction to LINQ for db4o ... A demo web application for demonstrating the power of LINQ for db4o.Go
Dynamic UpdateProgress Control ... Hide sections of the page when an UpdateProgress control is activatedGo
Triggering AJAX UpdatePanel from a Button Click or DropDownList Selection Change in Code-Behind ... This article shows how to make a Button click or DropDownList selection change trigger an update to an AJAX UpdatePanel with all code written in code-behindGo
Silverlight2 Lightbox ... A Silverlight2 lightbox controlGo
The Tortoise and the Long Hair: A fabel ... A method for unit testing views in the .net MVC frameworkGo
MSAgent Style Critters for your Web Pages ... MSAgent Style Critters for your Web PagesGo
DotNetSlackers.com Links
Performing CRUD and Grouping Operations with the LinqDataSource Control ... Build fully-editable Create, Read, Update, and Delete (CRUD) database front-ends easily and discover how to group and aggregate data using the new LinqDataSource control in ASP.NET.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
New Lounge Front-end (now with ASP.NET MVC and NHaml) ... Since taking over The Lounge I have been slowly refactoring it to my liking. Not that there was much wrong with it, but like most developers I am pretty opinionated in how I think something should be built. Most of what I have done has been in an effort to make a total rewrite of the front-end easier. The biggest change was refactoring the front-end and models to move as much logic as possible to the models and wrap tests around those models. I consider this a good practice and since I knew I wanted... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 4 ... Fourth part of my new article series entitled Building a Simple Blog Engine with ASP.NET MVC and LINQ has been published on ASP Alliance. In the fourth part of this series, Keyvan talks about the unit testing concepts related to the MVC pattern and how Microsoft has adapted these concepts for its ASP.NET MVC framework. He shows these principles and the process that should be followed to unit test an ASP.NET MVC application. ... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Custom httpModules eBook from WROX ... WROX , one of the .NET community's best friends over the years, has started a new line of eBooks called WROX BLOX. I like the idea of publishing in an eBook format, because you can buy just the part of the book you really want and it give authors the...(read more)... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 4 ... In the fourth part of this series, Keyvan talks about the unit testing concepts related to the MVC pattern and how Microsoft has adapted these concepts for its ASP.NET MVC framework. He shows these principles and the process that should be followed to unit test an ASP.NET MVC application. Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
RadEditor... on msdn2.microsoft.com ... It has been some time this was in the making... and as of the beginning of this week RadEditor is the editor one uses to submit community content in MSDN. Here is a hasty screenshot I made for you: To my best knowledge, this is the fifth Microsoft team that adopts the RadEditor, yet I believe it is the first team to use it on a public Microsoft site (besides, such an important one). The other teams using the editor are doing internal MS content, and since I have not explicitly asked for permission to list their names here, I will refrain from doing that, however tempted I feel. While this is certainly a good proof of RadEditor's qualities, and of Telerik products in a broader sense, it is also a challenge to live up to the expectations. And even if you won't jump yet on the msdn site to submit your community posts, it is still you - the Telerik community - who will benefit from the fact the editor is there. Now we will need to address reported problems even faster than before :) Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Navigational Workflows Unleashed In WWF/ASP.NET 3.5 ... Case-study on the internals of a Navigational Workflow engine for a fictional dating website called World Wide Dating.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Phone TextBox Control with built-in Phone Validator - ASP.NET Custom Control ... Discussing the creation of custom Phone TextBox and its built-in PhoneValidator that validates a group of textboxes which represents three sections of a phone number. It inherits the BaseValidator and uses some new cool ASP.NET AJAX 3.5 features.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
April 28th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC, Silverlight ... Here is the latest in my link-listing series.  Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I've done myself in the past. ASP.NET Displaying the Number of Active Users on an ASP.NET Site: Scott Mitchell continues his excellent series on ASP.NET's membership, roles, and profile support.  In this article he discusses how to use ASP.NET's Membership features to estimate and display the number of... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
.NET Web Product Roadmap (ASP.NET, Silverlight, IIS7) - ScottGu`s Blog ... Scott mentions in this blog entry planned updates for IIS 7. In addition "We will also shortly begin sharing details of a new web application deployment framework for IIS that enables you to easily automate the deployment of web applications on either a single server or across a web farm of machines. .NET Web Product Roadmap (ASP.NET, Silverlight, IIS7) - ScottGu's Blog... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Telerik Announces Milestone Q1 2008 Release of .NET Components and Reporting Tool ... Telerik announced the landmark release of its Q1 2008 RadControls for ASP.NET AJAX and WinForms, and Telerik Reporting. The new release represents a final touch in Telerik's goal to offer a comprehensive and mature toolset of next-generation web and desktop components.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
The Tortoise and the Long Hair: A fabel ... A method for unit testing views in the .net MVC framework... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
DevConnections Spring Slides and Demos ... Last week I gave three presentations at the DevConnections spring show in Orlando. I received a lot of great feedback from attendees which I definitely appreciate, especially since I was feeling a little bit bad about having run out of time in my first two talks (and overcompensating a bit on my last one, which ended a few minutes early). I definitely try to err on the side of too much content, with the idea being that if I can't fit it all in, at least the slides and demos are there for attendees to reference, and I'm happy to answer emails with questions about any of the material. What's New in ASP.NET 3.5 Slides and Demos My first talk was on What's New in ASP.NET 3.5, and it was well-attended for a Tuesday 8am talk. I did make it through everything that's actually new in ASP.NET 3.5 and VS 2008 that I had prepared - the only things I had left that I couldn't get to were actually things that are still pre-release, like Silverlight 2 and ASP.NET MVC which I very briefly showed. There was a lot of interest in LINQ as well, and there were some good questions about LINQ-to-SQL and how to fit LINQ into existing N-Tier architectures. The recurring theme of "Are DataSets dead?" was interesting as well, and I'm sure some of the other speakers had similar discussions (I hope some of the attendees interested in the topic went to some of the LINQ-specific talks). The main content for this talk was the ListView and DataPager, along with some simple LINQDataSource stuff and LINQ demos using LINQPad. I also showed off some VS2008 new features like nested master pages and JavaScript debugging and Intellisense. Pragmatic ASP.NET Tips, Tricks, and Tools Slides and Demos The second talk was a tips and tricks talk, which drew from my own experience as well as a variety of blog posts and other similar talks which I tried to credit in the slide deck. One attendee came up to me at the attendee party Tuesday night, while I was standing with three other speakers, and gave me a nice ego boost (while simultaneously embarrassing me). He exclaimed that he was extremely grateful for my tips and tricks talk because it had made the conference worthwhile for him, and that "it was good to see a speaker who brought some real technical content to their presentation" or something close to that. This, with three other very good speakers standing there... I thanked him and introduced him to the other speakers and suggested he check out their excellent talks on Wednesday. At any rate, I apologize again for running out of time with this one. I know I crammed way too much material in for a 75 minute talk, and next time perhaps I'll consider giving a 2-part talk. Many attendees came to this one and then also went to my third talk, and since I had a few minutes left after finishing that one I actually completed the tips and tricks presentation then, for about 20-30 people who had asked for it. Improve User Experience with Asynchronous Processing Slides and Demos My third and final talk for Tuesday was on asynchronous processing in ASP.NET. I basically covered three scenarios and did so with a minimum of tangents and user discussion, allowing me to get through the material a bit quicker than expected (plus I really didn't want to go over 3 times in one day). The first scenario was async fetching of files by the browser (increasing the number of files the browser can fetch simultaneously). The second one discussed async on the server, within ASP.NET requests, and showed a couple of different techniques for achieving this with web services and web requests. This is an important technique for both scalability and performance. The third scenario demonstrated how to defer loading of long-running user controls to the client by rendering the page quickly with empty DIVs which populate themselves using AJAX callbacks. This was the meant to be the high point of the presentation and shows an extremely cool way to achieve great usability. I didn't get a standing ovation or anytGo
ASP.Net C# MessageBox ... This article explains how to create a messagebox class to use in web applications... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
ASP.NET.com Links
Please don't go (work for MS or Google) ... Um, kids, Joel needs employees. So don't go to MS or Google , please? Seriously, Joel? When was the last *important* thing you've built that didn't rely on some knowledge that came out of one of those two huge companies? The nice thing about being an architecture astronaut, is that every once in a while, you solve a real problem while trying to solve a different one. If MS and gogole didn't take on al these huge failing projects, how would the world learn about things like: Making huge teams scalable (or how *not* to) Creating very scalable architectures Identity WS Standards and Security Parallelism, synchronization Next generation languages and tools better tooling for existing languages Domain specific languages for solving complex and small problems lots more "little" solutions to many problems People who work there don't work on hopeless projects, they go there to solve huge technological challenges that advance our software industry directly or indirectly by letting us know what the limits are in given contexts: A team of X size becomes a big problem if you manage it wrong (see "Vista Start menu Fiasco ") Agile can work on larger teams (as long as you split them to smaller teams!) while people do other things as well Integrating winforms in the browser can lead to really bad things , but alternatives will be found How do you support X millions of transactions per minute ?Go
Adding GeoRSS to GeoTwitter ... As many of you know, at least the 2 people that read my blog. I am writing a new web application called geotwitter for fun. Link to the series In a few words, provides a geo location to you updates in twitter. There are many features that are not implemented in GeoTwitter that other applications have. Tonight I implemented GeoRSS , for more information you can read about my GeoRSS posts here. GeoRSS will allow you to export all the people and analyze them with any map viewer. For the people that asked me when is GeoTwitter opening, I may add that is far from finished. I may next week put the alpha version at http://geotwitter.net for people to submit feedback and request features. GeoRSS looks like RSS with geospatial information. You can look at the location of any twitter. Cheers AlGo
IIS 7.0 Shared configuration. ... One of my favorite features in IIS 7.0 is shared configuration. It makes setting up and maintaining a web-farm a piece of cake. Here are some articles I found on the topic. Shared configuration http://learn.iis.net/page.aspx/264/shared-configuration/ Introduction http://learn.iis.net/page.aspx/211/shared-configuration/ Configuring a Web Farm Using IIS Shared Configuration http://learn.iis.net/page.aspx/453/configuring-a-web-farm-using-iis-shared-configuration/...(read more )Go
The Risk ... Last night I had a conversation with some new friends here in the Beautiful Australia and I would like to share something with you guys to reflect upon: "Those people you see, on the National Geographic or Discovery Chanel, who try to reach the top of the Everest, are they crazy or what ?" Now, picture this. For many decades, many men and women have tried... and there, they lost their lives. As a matter of fact, most of these people were not even able to return to their loved ones. Despite this tragic statistic, more and more people tried ... risking... knowing that they probably will die during this journey, leaving family, children, wives behind. So, why they still did/do this ? Because it was worth it doing it. In the very risk, a transformation happens in you, something is born inside you . No other experience can give you this. It only can be developed in the risk. That's the beauty of the risk. So, here we are, talking about the idea of "live your live to the most" , no regrets, no looking back. Then another question arise: "Can you remember when did you feel most alive?" For some, it was when they managed to speak a second language for first time, for others was when they first did bungie-jumping in New Zealand or Switzerland, for others was when their first child was born. Now, if you remember "your special moment" , I bet a shiver will run through your spine and your heartbeat increase. If I ask you to describe this feeling, you will be talking about this moment, proud of yourself and about how cool was it. I can almost tell a pattern where people will : Talk about a scenario in which the risk pushed themselves out of their comfort zone and; The outcome of the risk is not the main goal, instead the journey is what they remember most and; They finish the story with a big smile and sparkling eyes. So, there it goes. Think again about that first question I mentioned. Now, my idea is that the beauty of the risk doesn't lie in the final result - it lies in who you become in the process . Confident. Engaged. Alive. I risk to say more: this is not something you do every summer - it becomes a habit, and it can be contagious. It gives you a new approach to life. After doing it, your life is just not the same anymore, otherwise you will feel stagnant, bored. So, just like that famous question:"when was the last time you did something for the first time?" See you all later!Go
Side Effecting Functions are Code Smells ... I know the title might catch a few people off guard, but let me explain. Side effecting functions, for the most part, are code smells. This is a very important concept in Domain Driven Design (DDD) that's often overlooked. For those who are deep in DDD, this should sound rather familiar. And in the end, I think Spec# and some Design by Contract (DbC) constructs can mitigate this, or you can go the functional route as well. What Is A Side Effect? When you think of the word side effect in most languages, you tend to think of any unintended consequence. Instead, what we mean by it is having any effect on the system from an outside force. What do I mean by that? Well, think of these scenarios, reading and writing to a database, reading or writing to the console, or even modifying the state of your current object. Haskell and other functional languages take a pretty dim view of side effects, hence why they are not allowed, unless through monads. F# also takes this stance, as "variables" are immutable unless otherwise specified. Why Is It A Smell? Well, let's look at it this way. Most of our operations call other operations which call even more operations. This deep nesting is then created. From this deep nesting, it becomes quite difficult to predict the behaviors and consequences of calling all of those nested operations. You, the developer might not have intended for all of those operations to occur because A modified B modified C modified D. Without any safe form of abstraction, it's pretty hard to test as well. Imagine that any mock objects that you create would have to suddenly know in 5 levels deep that it is modified in some function. Not necessarily the best thing to do. Also, when it comes to multi-threaded processing, this becomes even more of an issue. If multiple threads have a reference to the same mutable object, and one thread changes something on the reference, then all other threads were just side effected. This may not be something that you'd want to do. Then again, if working on shared memory applications, that might be. But, for the most part, the unpredictability of it can be a bad thing. Let's take a quick example of a side effecting an object like implementation of a 3D Point. We're going to go ahead and allow ourselves to add another Point to the system. public class Point3D { public double X { get; set; } public double Y { get; set; } public double Z { get; set; } public void Add(Point3D other) { X += other.X; Y += other.Y; Z += other.Z; } } What's wrong with the above sample is that I just side effected the X, Y and Z. Why is this bad? Well, like I said, most objects like these are fire and forget. Anyone who had a reference to this Point now has a side effected one, that they might not have wanted. Instead, I should probably focus on retrieving a new one at this point, since this is pretty much a value object. What Can You Do About It? Operations that return results without side effects are considered to be pure functions. These pure functions when called any number of times will return the same result given the same parameters time and time again. Pure functions are much easier to unit test and overall a pretty low risk. There are several approaches to being able to fix the above samples. First, you can keep your modifiers and queries separated. Make sure you keep the methods that make changes to your object separate from those that return your domain data. Perform those queries and associated calculations in methods that don't change your object state in any way. So, think of a method that calculates price and then another method that actually sets the price on the particular object. Secondly, you could also just not modify the object at all. Instead, you could return a value object that is created as an answer to a calculation or a query. Since value objects are immutable, you can feel free to hand them Go
Microsoft SharePoint Administration Toolkit ... The SharePoint product team has released the first version of the Microsoft SharePoint Administration Toolkit which is supported on MOSS and WSS. I was surprised that it didn't have that many initial tools- but the ones it does have are super sweet. I think the feature that is going to be welcomed most by SharePoint admins is the ability to move a site collection to a new content database. There are promises of future and regular releases so I can't wait to see what they add next. Get all the details at the SharePoint team's blog: http://blogs.msdn.com/sharepoint/archive/2008/04/30/announcing-the-first-release-of-the-microsoft-sharepoint-administration-toolkit.aspx Some tools I'd personally like to see in future releases (and to stay with the site collection theme here): Manage multiple site collection themes - all or those selected at once (would just be nice to do this from CA instead of having to go to each site collection) Manage quota templates for multiple site collections - all or those selected at once - Dan LewisGo
Can you small wht the code is craking? ... D'Arcy posted a link to a new MSDN contest called Crack the Code . Basically use your uber sluething developer skillz to... oh I don't know. I guess it's a guess the numbers game or something. They post clues and you "crack" them with your amazing developer knowledge. Justice will probably struggle with filling out the registration form but if you can get past that, you're golden. Hey, a $4000 Future Shop gift card isn't bad but the contest doesn't seem to work for me. For example, it told me I already solved puzzle #2 but won't let me into puzzle #3 nor did it give me the unlock code. And I actually don't remember solving puzzle #2 so I must have been sleeping during that period in my life. Nice. However this error was the best. During the course of trying the quiz out, I'm not sure if this is someone's idea of a joke or just plain bad English? I believe this dialog belongs in the Interface Hall of Shame .Go
Invalid SharePoint URL Character Cheat Sheet ... A few days ago I posted some code to clean out invalid characters in SharePoint URLs . Someone suggested using the SPEncode.IsLegalCharInUrl method to do this. While this might be easy if you're in SharePoint land, I don't like having a dependency on SharePoint assemblies for this sort of thing and want it in my own validation code (besides, the hoops SPEncode.IsLegalCharInUrl goes through, you can't unit test it, trust me). After some digging I determined the list of valid and invalid characters. Only the first 128 characters in the ASCII character set are processed for validation so anything beyond that is considered invalid. It's fairly simple, pretty much everything from "@" through to "z" is valid (with a few exceptions). Here's the list as I couldn't find it posted anywhere and thought it would be useful as a cheat sheet. Valid? Character Hex Value No [NULL] 0 No ☺ 1 No ☻ 2 No ♥ 3 No ♦ 4 No ♣ 5 No ♠ 6 No   7 No [BS] 8 No [TAB] 9 No [CR] A No ♂ B No ♀ C No [LF] D No ♫ E No ☼ F No ► 10 No ◄ 11 No ↕ 12 No ‼ 13 No ¶ 14 No § 15 No ▬ 16 No ↨ 17 No ↑ 18 No ↓ 19 No → 1A No ← 1B No ∟ 1C No ↔ 1D No ▲ 1E No ▼ 1F Yes [SPC] 20 Yes ! 21 No " 22 No # 23 Yes $ 24 No % 25 No & 26 Yes ' 27 Yes ( 28 Yes ) 29 No * 2A Yes + 2B Yes , 2C Yes - 2D Yes . 2E Yes / 2F Yes 0 30 Yes 1 31 Yes 2 32 Yes 3 33 Yes 4 34 Yes 5 35 Yes 6 36 Yes 7 37 Yes 8 38 Yes 9 39 No : 3A Yes ; 3B No < 3C Yes = 3D No > 3E No ? 3F Yes @ 40 Yes A 41 Yes B 42 Yes C 43 Yes D 44 Yes E 45 Yes F 46 Yes G 47 Yes H 48 Yes I 49 Yes J 4A Yes K 4B Yes L 4C Yes M 4D Yes N 4E Yes O 4F Yes P 50 Yes Q 51 Yes R 52 Yes S 53 Yes T 54 Yes U 55 Yes V 56 Yes W 57 Yes X 58 Yes Y 59 Yes Z 5A Yes [ 5B No \ 5C Yes ] 5D Yes ^ 5E Yes _ 5F Yes ` 60 Yes a 61 Yes b 62 Yes c 63 Yes d 64 Yes e 65 Yes f 66 Yes g 67 Yes h 68 Yes i 69 Yes j 6A Yes k 6B Yes l 6C Yes m 6D Yes n 6E Yes o 6F Yes p 70 Yes q 71 Yes r 72 Yes s 73 Yes t 74 Yes u 75 Yes v 76 Yes w 77 Yes x 78 Yes y 79 Yes z 7A No { 7B No | 7C No } 7D No ~ 7E No ⌂ 7FGo
Software Architecture ... Software architecture has become one of the hottest topic in last year or so. I also moved into software architecture role at the start of last year. It is very different world but very interesting as you get to deal with the problems first up and come up with a solution that is always best for business and not necessarily always best technical solution. Here are couple of really good articles which highlight some of the challenges that are faced with architects The Hidden Roles of Software Architects Thoughts on being a Solution ArchitectGo
Locating the active item in Solution Explorer ... Scott Hanselman tweeted a link to Daniel Cazzulino's blog post about automatically synchronizing the Visual Studio Solution Explorer with the active item open in the editor. It's a great tip, but I personally have never been a fan of the Track Active Item option - I find that it slows down the IDE, causes distracting visuals, and often just isn't the behavior I want. I do, however, often want a way to manually sync up the Solution Explorer with my currently open item. Fortunately, it's very easy to accomplish this with a very simple macro. The idea is very simple - just turn on the Track Active Item option that Daniel mentions, and turn it off again. It's a two-liner: Sub SyncSolutionExplorer() DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer") DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer") End Sub You can wire up that macro to a toolbar button and/or a keyboard hotkey, and (as ScottHa would say) bam, you're golden.Go










have suggestions for the site?
snappy@alligatortags.com