Published: Thursday, September 29, 2016 1:27:53 AM
Silverlight 2.0 provides a new and exciting framework for building rich applications using C#, VB.NET or other languages that are capable of running on multiple operating systems and in multiple browsers. Scott Guthrie recently posted a great set of tutorials on Silverlight 2.0 that are an excellent resource for getting started building Silverlight 2.0 applications.
Scott recently approved converting the tutorials into video so I've been busy the past few days putting together video tutorials that cover Silverlight 2.0 and the Digg.com application Scott wrote about.
Topics covered include:
Part 1: Creating "Hello World" with Silverlight 2 and VS 2008 Tutorial Video Tutorial
Part 2: Using Layout Management Tutorial Video Tutorial
Part 3: Using Networking to Retrieve Data and Populate a DataGrid Tutorial Video Tutorial
Part 4: Using Style Elements to Better Encapsulate Look and Feel Tutorial Video Tutorial
Part 5: Using the ListBox and DataBinding to Display List Data Tutorial Video Tutorial
Part 6: Using User Controls to Implement Master/Details Scenarios Tutorial Video Tutorial
Part 7: Using Templates to Customize Control Look and Feel Tutorial Video Tutorial
Part 8: Creating a Digg Desktop Version of our Application using WPF Tutorial Video Tutorial
2/27/2008.NET 3.5 has a lot of great new features that can significantly enhance developer productivity. I've been spending some time lately working on a little sample application that demonstrates how an N-Layer ASP.NET 3.5 application can be built using LINQ, lambdas and LINQ with stored procedures. The application is for a talk I'll be giving at DevConnections in April discussing how LINQ technologies can be used in an N-Layer architecture. In a blog post comparing different LINQ options I mentioned that I'd be posting the code download as soon as it was ready. The application provides a presentation layer, business layer, data layer and model layer through separate projects as shown next: It also demonstrates how the new ListView control can be used to display data, perform insert, update and delete operations and nest other controls such as the GridView. Databinding on the presentation layer is mainly done using the ObjectDataSource control. All of the queries performed in the application go against an object model created using the Visual Studio 2008 LINQ to SQL Designer. Note: The included Northwind SQL Express database has been modified slightly to add a TimeStamp field into the Customer and Orders tables and contains several custom stored procedures (sprocs aren't required unless using that portion of the application). Adding TimeStamp fields simplifies updates so be aware that if you change the connection string to point to a standard Northwind database you'll get an error since the TimeStamp fields will be missing. 3 Options for Data Access Rather than focusing solely on LINQ, I wanted to show different options for data access that .NET 3.5 offers so that developers can get a feel for what's available in addition to standard LINQ queries that seem to get most of the attention these days. I ended up creating six main data layer classes as shown next: Customer Query Classes: CustomerDBLINQ - Executes customer related queries using inline LINQ CustomerDBLambda - Executes customer related queries using lambda expressions CustomerDBSprocs - Executes customer related queries using stored procedures and LINQ Order Query Classes: OrderDBLINQ - Executes order related queries using inline LINQ OrderDBLambda - Executes order related queries using lambda expressions OrderDBSprocs - Executes order related queries using stored procedures and LINQ I still lean toward using stored procedures due to the security and maintenance benefits they offer in more enterprise environments, but for small queries I actually prefer lambda expressions over LINQ (not sure why...just feels more object oriented I guess). If you currently use stored procedures in your applications and haven't checked out the new LINQ to SQL Designer you'll be impressed with how easy it is to call stored procedures and pass parameters. You never have to see or create another SqlCommand or SqlParameter object again (well...in many cases anyway). Switching Between Data Access Classes By changing a value in web.config you can switch between the different data layer classes and see which option you prefer (LINQ, lambdas or LINQ with sprocs). All of the data access classes perform the same overall tasks, they just use different techniques to do it.
This video is from a talk given by Dan Wahlin at Desert Code Camp in Phoenix, AZ that discussed how Silverlight could be integrated with ASP.NET AJAX to dynamically display albums obtained from an Amazon.com Web Service. The audio in the room wasn't great since no microphone was used so you may need to crank it up a bit.
Slides and code shown in the video can be downloaded below:
In this video "how to" Dan Wahlin walks through the steps required to install and configure Subversion to control your .NET source code revisions. Several commercial options exist for source control of course such as Vault and Microsoft's Visual SourceSafe to name just two. Subversion is an open source project (it's freely available) and has excellent documentation and support available. It's also easy to use through the command-line or through TortoiseSVN.
In the video you'll see how to install Subversion, configure it, install the TCP/IP service, and add new or existing projects into the source control repository. You'll also see how to use TortoiseSVN to create repositories and manipulate files in a Subversion repository. Although the video discusses installing the TCP/IP service for accessing a repository remotely, it doesn't cover how to access the repository through HTTP. You can find more information about that task and how to configure it with Apache here.
Links mentioned in the video are included below:
Subversion Project Site: http://subversion.tigris.org
Rick Strahl's Step-By-Step Subversion Article: http://www.west-wind.com/presentations/subversion/
Subversion Online Book: http://svnbook.red-bean.com/nightly/en/index.html
Visual Studio .NET 2008 provides many new features that will definitely enhance developer productivity. In this video tutorial I provide an introductory look at VS.NET 2008 and show a few features such as multi-targeting, split view, and the LinqDataSource control. In the video you will see how to build an ASP.NET page that retrieves data from a data context object (created with the new LINQ to SQL designer) and binds it to various controls using the LinqDataSource control.
ASP.NET 3.5 introduces a new control called the ListView that allows developers to have 100% control over the HTML markup that is generated while still providing paging, inserting, updating, and deleting support. To me the ListView control is a nice blend between the GridView and Repeater controls with new features added.
In this video I walk through the fundamentals of using the ListView control and show how you can use the new CSS tools in VS.NET 2008 to create a scrollable ListView control with a frozen header. See my previous blog post if you are interested in learning how to freeze GridView control headers in IE and FireFox.
This video tutorial demonstrates the affect the UpdatePanel's UpdateMode and ChildrenAsTriggers properties have on updating a panel's content. The video starts out by discussing the UpdateMode property and shows why you may want to know about it when using multiple UpdatePanel controls on a single page. It then discusses the ChildrenAsTriggers property and shows how you can prevent child controls from updating their parent UpdatePanel control. Examples of nesting UpdatePanel controls to provide a master-details style view of data is also shown.
Based upon the amount of interest in a blog post I did awhile back I decided to put together a quick video demonstrating how the SqlDataSource can be used quickly and easily and how controls can be embedded using templates. Keep in mind that I am not a big fan of using the SqlDataSource in "enterprise" applications but I do find myself using it quite a bit for admin pages where I need to update look-up tables or perform fairly straightforward operations with a minimal amount of code. For N-Tier/N-Layer applications I prefer to use the ObjectDataSource control where appropriate.