CodeStock 2008 Developer's Conference

CodeStock's mission is to bring the best and brightest code experts to East Tennessee for a one day conference open to all developers. This is not a trade show with slick salesman giving prepared demos - this is a gathering of real programmers learning about the latest in technology from each other. Sign up now to learn how you can join us for CodeStock 2008!

Speakers and Agenda

We have lined up 30 sessions, a keynote address by respected author and MVP Jeff Prosise, and a place to hang out with speakers and attendees in open spaces style. Check out the list of amazing sessions by awesome speakers. I will be speaking on ASP.NET Dynamic Data, catch it here.

Registration

Registration is open! You can register for CodeStock 2008 now, and reserve your seat at the greatest developer's conference Knoxville has ever seen!


 
Categories: .NET | .NET 3.5 | ADO.NET | ASP.NET Dynamic Data | Community

June 17, 2008
@ 08:19 AM

Tonight – June 17, 2008 Central-Penn.NET:

Computer Aid, Inc. (CAI), 470 Friendship Road, Harrisburg (3rd floor)

5:30 - 6:00: Content Management and Workflow with SharePoint (Andy Heller)
Microsoft Sharepoint is a platform for information.  One core component that is gaining traction among users is content management and workflow.  We will take a view at how content management and workflow in SharePoint can be relevant to the developer community.

6:00 - 6:30: Pizza and business meeting

6:30 - 7:30: SharePoint and Applications:  Workflow Designer (Alejandro Rosado)

The Microsoft Office SharePoint Designer 2007 provides tools to automate business processes and build efficient applications on top of the Microsoft SharePoint platform. Specifically, we will look at the Workflow Designer and see how to create custom event notifications and other collaboration tasks.

7:30: Q/A and cleanup

I will be attending this meeting, see you then!


 Tomorrow - June 18, 2008 .NET VALLEY:

Session 1 : 6:00 PM


Register

What’s next for SBS?
Presented By: Michael J. Murphy
Tags: IT Professional | Small Business Server
Session Length: 60 minutes
Session Summary:
SBS 2003 is 5 years old. When can you expect SBS 2008? What should you know about the move to 64x only? What versions will be available? Have you heard about the mid-size server solution Windows Essential Business Server? What technology gap will this technology fill? How can I take advantage of it? If you want answers to these and other questions join us for a discussion of the upcoming release of SBS 2008 and EBS.
Session 2 : 7:15 PM


Register

Providing Your LINQ to SQL
Presented By: Jason N. Gaylord
Tags: Application Development | LINQ | SQL
Session Length: 60 minutes
Session Summary:
One of the issues many developers have is generating a solid data layer for their applications. Microsoft realized this and developed LINQ (Language Integrated Query). LINQ can be used to provide the data layer for nearly anything including XML, Objects, and SQL Server. During this talk you'll see how to use LINQ to SQL, build Lambda expressions, and provide a complete data layer with doing very little work.
 
Categories: .NET | ADO.NET | Community | IT Pro | SharePoint

Thanks to everyone who came to the launch, especially those folks who stayed for the last session of the day when Lindsay and I presented. We were the last session in the afternoon and by then everyone is just darn tired after a full day of sessions and excitement!

Below I've compiled a list of some questions from attendees that I think were great questions worth sharing:

Question: What type of applications are best suited Sync Services

Answer: Here's some programs that would fit nicely - field service, CRM apps, anything for sales folks, trade show management & leads, or any desktop app where you do not or can not have constant connectivity. 

Question: Is it really that easy to share your project with designers, even a desktop app using xaml?

Answer: Why yes it is!  You saw the demo after all!

Question: Can you use Microsoft Access with Sync Services to create a local database cache?

Answer: No, you cannot.

Question: Is Sync Services available for file systems?

Answer: Yes (link below)

Question: Is it possible to add an amination to a xaml form in Visual Studio 2008 or must you use Expression Blend?

Answer: Yes, you can use VS2008 but I'll warn you - the storyboards are much easier w/Expression Blend, as you'd need to hand craft the XAML in VS08, there's no storyboard control. (see link below)

Resources:

Sync Services Whitepaper

Sync Services for File Systems

XAML for Storyboards


 
March 14, 2008
@ 09:14 AM

Wheck out all the great webcasts available!  There's a ton, and definitely something for every developer!

(Hat tip: material below copied from the MSDN Webcasts blog)

Zain Naboulsi Presents Microsoft Visual Studio 2008 Overview Webcast Series

Microsoft Developer Evangelist Zain Naboulsi presents a series of webcasts providing an overview of Visual Studio 2008. Zain’s webcasts are always highly informative and very entertaining -- some of the most popular developer webcasts that we have. Here is a list of Zain’s webcasts through April which include developing in Visual Studio 2008 with Windows applications, WPF, Office System, WCF, Workflow Foundation, Linq and Click Once.

MSDN Webcast: Overview of New Tools in Visual Studio 2008 (Level 200)

Join us as we take a look at the new tools that come with the Microsoft Visual Studio 2008 development system and explain how they can impact your world. Often, we do not have time to explore just what a great tool Visual Studio 2008 is. Much like the Microsoft Office products, we tend to only use a small percentage of what is available. In this session, we look at some of the key tools and describe why they are important to you.

3/13/2008 1:00 PM - 2:30 PM Pacific Time (US & Canada) | Duration: 90 Minutes

MSDN Webcast: Overview of New Features for Windows Applications (Level 200)

Are you a Windows application developer? Then this session is for you! Here we take a fresh look at how the functionality in the Microsoft Visual Studio 2008 development system empowers Windows developers and helps them create better applications.

3/14/2008 1:00 PM - 2:30 PM Pacific Time | Duration:90 Minutes

MSDN Webcast: Windows Presentation Foundation Tools in Visual Studio 2008 (Level 200)

What is the big deal with Windows Presentation Foundation (WPF) anyway? Here we take a brief look at why WPF is cool and how Microsoft Visual Studio 2008 makes writing WPF apps even cooler. So grab the beverage of your choice and let's hang out with WPF.

4/4/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: 2007 Office System Interoperability with Visual Studio 2008 (Level 200)

Like the 2007 Microsoft Office system? Like Microsoft Visual Studio 2008? Well, just like chocolate and peanut butter, we blend the two together to show you the creamy richness of Microsoft Visual Studio Tools for Office (VSTO). You have heard about it and seen it in grainy videos (just like Bigfoot), but now you can experience it all for yourself. Come join the fun!

4/10/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: Windows Communication Foundation Tools in Visual Studio 2008 (Level 200)

What is the big deal with Windows Communication Foundation (WCF) anyway?  Here we take a brief look at why WCF is cool and how Microsoft Visual Studio 2008 makes writing WCF applications even cooler. Let's sit by the virtual seashore and bask in the glow of great WCF tools!

4/14/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: Workflow Foundation Tools in Visual Studio 2008 (Level 200)

What is the big deal with Windows Workflow Foundation (WF) anyway? Here we take a brief look at why WF is cool and how Microsoft Visual Studio 2008 makes writing WF applications even cooler. So put down that copy of MSDN Magazine for a little while and let's see some real excitement with workflow!

4/15/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: LINQ Features in Visual Studio 2008 (Level 200)

Think you have heard all there is to know about Microsoft .NET Language-Integrated Query (LINQ)? Think again! In this webcast, we dazzle and amaze you with our staggering array of wondrous tools to make your LINQ experience a memorable one!

4/16/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: Database Features in Visual Studio 2008 (Level 200)

Like working with data? The Microsoft Visual Studio 2008 development system comes with many new and improved data tools. Who could say no to those cute little controls? Join this webcast for the ultimate database tools experience that you can have without a laser light show!

4/17/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: ClickOnce with Visual Studio 2008 (Level 200)

Does ClickOnce mystify you? In this presentation, learn to publish Windows-based applications to a Web server or network file share for simplified installation. Let's talk about ClickOnce and how it can make your life easier!

4/18/2008 1:00 PM - 2:30 PM Pacific Time (US & Canada)| Duration: 90 Minutes

Zain’s Visual Studio 2008 Webcast Archive:

MSDN Webcast: Overview of New Classes in the .NET Framework 3.5 (Level 200)

With the release of the new Microsoft .NET Framework 3.5 there are a lot of new features to learn. In this session, we take a high-level look at the myriad new classes and show what some of them can do for you today.

MSDN Webcast: Overview of New Designers in Visual Studio 2008 (Level 200)

In this session, we take a deeper look at some of the key new features in the Microsoft Visual Studio 2008 development system. In this lesson, we look at the many new designers that come with the product. Designers are the key to Rapid Application Development and here we illustrate how to accelerate your coding efforts.

MSDN Webcast: Overview of New Features in Visual Studio 2008 (Level 200)

In this webcast, we discuss some of the key new features that make the Microsoft Visual Studio 2008 development system great! Join this high-level overview of the product as we focus on the philosophy behind the new features and demonstrate how they compare to Microsoft Visual Studio 2005.

More Visual Studio 2008 Webcasts: http://www.microsoft.com/events/series/msdnvs2008.aspx?tab=webcasts

Visual Studio 2008 Virtual Labs: http://www.microsoft.com/events/series/msdnvs2008.aspx?tab=virtuallabs

Visual Studio 2008 Developer Center Home: http://msdn2.microsoft.com/en-us/vs2008/default.aspx


 
February 12, 2008
@ 10:11 PM

I have a particular machine that has had some issues when trying to use a few VS 2008 features.  If you come across this post searching for answers hopefully it will save you some time.  Hopefully this post will save me some time too, because my chronic amnesia tends to have me forget all but the last 30 seconds of my life.  :) 

The fix first:  For both issues here, I needed to uninstall all VS 2008 add-on components (like EF, EF tools, Ajax, .NET 3.5 preview, etc...) VS 2008 itself, then .NET Framework 3.5.  Then I reinstalled VS 2008, which reinstalled the framework.  After that I could install the later components/add ons.

The "whys" next: I had at least the last VS 2008 Beta on this machine, and it seems that both problems are tied to it.  I did follow all instructions for uninstalling and reinstalling VS 2008 as is posted at ScottGu's blog which I'll repost here:

"Installation Suggestions

People often ask me for suggestions on how best to upgrade from previous betas of Visual Studio 2008.  In general I'd recommend uninstalling the Beta2 bits explicitly.  As part of this you should uninstall Visual Studio 2008 Beta2, .NET Framework Beta2, as well as the Visual Studio Web Authoring Component (these are all separate installs and need to be uninstalled separately).  I then usually recommend rebooting the machine after uninstalling just to make sure everything is clean before you kick off the new install.  You can then install the final release of VS 2008 and .NET 3.5 on the machine.

Once installed, I usually recommend explicitly running the Tools->Import and Export Settings menu option, choosing the "Reset Settings" option, and then re-pick your preferred profile.  This helps ensure that older settings from the Beta2 release are no longer around (and sometimes seems to help with performance).

Note that VS 2008 runs side-by-side with VS 2005 - so it is totally fine to have both on the same machine (you will not have any problems with them on the same box).  "

The errors:

1) Visual Studio 2008 Designer error: "method not found Boolean system.web.ui.design.viewrendering.get_visible()"

Upon opening an .aspx page and trying to use either the full Design tab or the Split tab, I would get this error inside a small gray box for each control instead of that control's design surface rendering.  After some searching, I came upon this bug report on MS Connect, which had two options - 1) uninstall all things related to VS 2008 and resinstall, (and what's more fun than that?) or 2) Wait for Vista SP1 or install what version of SP1 beta/ctp is available now, which will require you to un/reinstall later anyway.  The workarounds at the connect site work, or if you can wait, then Vista SP1 should fix this issue.

2) Entity Framework error: "Package VC++  Resource Editor Package has failed to load properly" would display whenever I would try to either add a new ADO.NET Entity Data Model via the wizard or whenever I would open and try to edit .edmx files.

I got nowhere searching for this error.  This error has some similar issues related to it, but not quite for this problem.  I had taken the issue to some email lists and forums with no response, or nothing helpful (but thanks, anyway).  Perhaps the VC++ is used in C# and VB.NET Apps for the purpose of editing resource or designer files, which I am going to assume are needed at least on some level with EF tools.  However, when I disabled this package, no other resource or designer intensive parts of VS bombed. 


 
Categories: .NET | ADO.NET | Visual Studio | Visual Studio 2008

That's this Saturday folks!

Where: Harrisburg University (downtown Harrisburg, Pa)

When: 8:00am-4:00pm

What's the scoop:  There are several sessions you can attend, and you are should to register for the event.

I have two talks: Exception Management and Using the ObjectDataSource/Data Source Controls in Web Applications.  I'll be posting the slides and samples after the code camp.


 
Categories: .NET | ADO.NET | Community | Software Development

September 6, 2007
@ 07:16 PM

This site's been around for a while now but I keep getting asked where to get good videos so here it is:  ASP.NET How To Series

Some of the topics you can view there:

  • Beginner series
  • ASP.NET Ajax
  • Visual Studio Team System
  • Visual Studio Add-Ins
  • First Look Videos (LINQy-licious)
  • Migrating to ASP.NET
  • More, more more... go check it out already!

 
Categories: .NET | ADO.NET | Visual Studio | ASP.NET

It's going to be "Data Controls Day" at the Central Penn .NET user group this month on March 20th.  I will be presenting on the SqlDataSource for the first session and the ObjectDataSource for the last session.

These have been great topics that have been generating lots of interest at my home group .NET Valley.

Hope to see you there.

 


 
Categories: .NET | ADO.NET | Community

March 15, 2007
@ 09:50 PM

As a supplement to my talks at the Central Penn .NET User's group and the .NET Valley User's group this month, I am providing some information on using the ObjectDataSource control.

ObjectDataSource Summary:

The ObjectDataSource is made for use in n-Tier applications, and you will want to create at least a DAL (data access layer) and you will most likely have a BLL (business logic layer) as well.  The ObjectDataSource provides a nice layer of abstraction between the UI and the data storage, whereas the SqlDataSource has a standard client/server architecture with direct access between it and the data store. 

The ObjectDataSource also provides caching, paging, sorting, data binding and many other handy and useful features.

A Few Notes: 

Build your BAL/DLL first, then start mapping the object's methods and properties to the ObjectDataSource.  This will make your custom objects more applicable to other apps, which is a good thing when building large systems with reusable components.

Use a Data Mapper pattern. In short, this entails creating an entity class that map its properties to the fields in database tables, and another class for managing/transporting the entity class between the ObjectDataSource and the data access layer/data store.  When you use the Data Mapper pattern you will set the DataObjectTypeName property of the ObjectDataSource to the entity class and pass the entity class as an argument to your Insert/Update/Delete methods.  It's easier and more maintainable than having to pass several dozen arguments (aka, each field as an argument) to your Insert or Update methods. 

You can also use just a data manager class with methods that map to CRUD operations.

Or, you can use the ObjectDataSource with a strongly typed DataSet.

Tips/Tricks/Gotchas:

While you will use the DataObjectType name to assign your entity class to the ObjectDataSource, you will use the TypeName property to assign your manager class or to bind to a strongly typed dataset.

Match the field names of your bound controls to your custom object property names. The ObjectDataSource uses Reflection to figure out the mapping between the names so they need to be named the same.

The ObjectDataSource cannot call remote objects directly (BAL/DLL objects on another machine). You'll need to create a wrapper locally and use remoting, web services or the like to make the connection.

For one way inserts, such as a data entry web page, consider not even using the ObjectDataSource. You can just as easily create the ADO.NET code yourself.  Also, the configuration wizard will not allow you to move to the next step without choosing a select method.

Use caching! Appropriately, of course.  Static data such as product, employee, states, countries, etc... are great types of data to be cached.  The ObjectDataSource takes advantage of caching just as much as the next control.

Moving from the SqlDataSource? It's fairly easy in most cases. 

  1. Add your custom class/strongly typed DataSet to your project. 
  2. Open your .aspx page and delete the SqlDataSource control
  3. Add the ObjectDataSource control to the page and use the Configure smart tag to connect to your custom class/DataSet
  4. Reset the DataSourceId property of the bound control(s) such as the GridView or Repeater.
  5. If it asks about Refreshing, say No - unless you need to, but you probably don't.
  6. Your mileage may vary depending on the exact circumstances but I've found it easily in most situations to quickly make the switch.

ObjectDataSource Resources:

MSDN Documentation on ObjectDS
Code Project's Comprehensive Guide to the ObjectDataSource
Manuel Abadia's great 3 Part series
ASP.NET's ObjectDataSource Tutorial


 
Categories: .NET | ADO.NET

To go along with my presentation Using the SqlDataSource Control at the .NET Valley's User group this month, and also at Central Penn .NET's meeting next month, I am posting some supplementary content about the SqlDataSource control.  Many of these points are also mentioned in the presentation.

Best Practices:

  • Use stored procedures with parameters rather than inline SQL statements. 
    • Stored Procs will help avoid SQL injection attacks
    • It's easier to maintain, since all SQL is in one place
    • It's better for performance, since the SQL statements can be precompiled and cached on the SQL server
  • Set the DataSource mode property to DataReader
    • DataReaders are faster than DataSets, and if you have the choice and don't require paging or other extended functionality, then go on and use a DataReader.
  • Cache the results - when caching is appropriate!
    • Set EnableCaching to true when you have static data or data that doesn't change frequently, such as geographic areas, products listings and the like.  However, if you have volitle or frequently changing data, don't cache! You'll end up wasting more resources on managing caching than anything else.
  • The SqlDataSource is great for client server web apps.  But you'll want to consider moving to the ObjectDataSource for n-Tier apps or apps that have multiple layers (business logic, data access, etc...)
  • Limit the amount of data you are retrieving to only data that you need.  Don't use SELECT * FROM TABLE, no matter if it's inline or in a stored procedure. Use a WHERE clause when you can as well. Less is more.
  • Add code to the Updating, Inserting and Deleting events to validate user input.

Tips & Tricks

If you need to get to the underlying DataTable you can use this code (VB and C#):

Dim tbl As Data.DataTable =CType(sqlDS.Select (DataSourceSelectArguments.Empty), Data.DataView).ToTable

DataView view = (DataView) sqlDS.Select(DataSourceSelectArguments.Empty);
DataTable tbl = view.ToTable();

First you need to access the DataView by converting the sqlDataSource object, then you can call the .ToTable() method and place that in a DataTable variable.

DataSourceId vs. DataSource

Use the DataSourceID property when you are data binding in the .aspx web form.  If you are doing most of the work in the code behind, and need perhaps to switch data sources, use the DataSource property.  The DataSourceId refers to the ID attribute of the DataSource Control you want to use.  The DataSource property refers to the DataSource object you want to use. You can only set one or the other. 

ProviderName

Don't forget you can use the SqlDataSource control with non MS SQL Server data sources.  Set the ProviderName="A Valid Provider" (valid provider names here). The default provider name is Microsoft SQL Server so you don't need to set it for SQL or SQL Express.

Resources

Securing Web Apps that Use the SqlDataSource at MSDN
Step by Step SqlDataSource at C# Corner
Overview of SqlDataSource at MSDN
SqlDataSource QuickStarts at ASP.NET
Walkthrough of SqlDataSource at VBdotNetHeaven
Thoughts on Declarative DataSources by Fritz Onion

Keep in mind that Best Practices are just that - generally the best way to do things.  But not always. Your mileage may vary depending on the demands of your application. 

Slides Here(92.44 KB)


 
Categories: ADO.NET