Noah Subrin's DEV Blog
Technology for Business minds
SQL Saturday #14
Yesterday, I had the good fortune to be able to deliver a presentation at the SQL Saturday #13 Community Event at the Microsoft Campus in Alpharetta. SQL Saturday is a community event for Microsoft SQL Server professionals. Several well known speakers presented including Joe Celko, Kevin Kline, and Andy Warren. A great amount of effort and preparation went into delivering this event, which had approximately 200 people in attendance. Hats off to all of the leadership team at Atlanta MDF for making this happen, as well as all of the sponsors, and Microsoft for providing the facility. There was a tremendous amount of give aways, and I think everyone went away satisfied.

My presentation, "Building Effective T-SQL Solutions" was based on five articles I have published on the SQL Server World Wide User Group web site . I discussed the following topics in my presentation which is available for download here:

  1. How to Set Compatibility Mode Using T-SQL
  2. How to Determine Membership in Windows Groups Using T-SQL
  3. Creating a Data Driven Web site using MySQL and VS 2008
  4. Importing a .csv file into SQLExpress using Bulk Insert
  5. Creating a Non-Sequential Order Number System
All in all, it was a great success.

MORE >>
Posted by Noah Subrin at 4/26/2009 7:35 AM | View Comments (0) | Add Comment | Trackbacks (0)
Orlando Code Camp
This Saturday is the fourth annual Orlando Code Camp. I will be delivering my presentation on 'Developing A Biometric Application''.
Biometrics are automated methods of authenticating or verifying an individual based on physical or behavioral characteristics. In this session, we will build a Biometric software application using a fingerprint reader, Visual Studio 2008, Windows Forms, and a third party SDK.

At the time of this post there are over 540 people registered for the event. It is an all day event of free training, so I encourage everyone to attend. There are over 40 speakers, 60 sessions, and 11 tracks.

I look forward to seeing you there!

MORE >>
Posted by Noah Subrin at 3/26/2009 4:59 AM | View Comments (0) | Add Comment | Trackbacks (0)
Presentation at the Atlanta Code Camp
It's that time of year again - time for the fifth annual  Atlanta Code Camp.
For those of you who have not been to a code camp, it is similar to developer conference, with many speakers and various tracks, except that it is free to attend. Lunch is provided, and most attendees also leave with a good bit of swag. In these challenging economic times, you can't beat that.

This year's Atlanta Code Camp is being held at Georgia Gwinnett College off of Collins Hill road in the Lawrenceville-Suwanee area.

I will be delivering a presentation on how to build a biometric application based on Visual Studio 2008, Windows Forms, SQL Server 2005, and a third party SDK.

I hope to see you there. Spread the word, these events typically "sell out" quickly because registration is capped due to space limitations at the facility.


MORE >>
Posted by Noah Subrin at 2/28/2009 4:29 PM | View Comments (0) | Add Comment | Trackbacks (0)
How to set Compatibility Mode for a Database Using T-SQL
I participated in a database server migration from SQL Server 2000 to SQL Server 2005 and noticed some query performance issues that came up during testing. When a database is upgraded from SQL 2000 to SQL Server 2005 using backup\restore or sp_attach, the database retains its current compatibility level. Read my article on the SQL Server World Wide User Group web site as I explain how to set compatibility mode for a single database using T-SQL and how this may affect query performance.

MORE >>
Posted by Noah Subrin at 11/5/2008 6:20 AM | View Comments (0) | Add Comment | Trackbacks (0)
Building Effective Web Applications with ASP .Net 3.5 - Week 2
Last week I delivered part two of a six part series of webcasts for a course I created for my employer, titled "Building Effective Web Applications with ASP .Net 3.5". Each session lasts two hours. Week 2 we focused on LINQ (Language Integrated Query). LINQ is a general purpose query facility to query relational data, XML data, objects/collections that allows us to query any of these data shapes in a consistent manner. LINQ query syntax resembles SQL except that the 'from' clause is in the beginning of the query, which allows the compiler to infer the type of the object.

Here are some of the benefits of using LINQ:
  1. You may not need to build an entire DAL (data access layer)
  2. It is much easier to query XML – don’t have to use Xpath
  3. We can work with data in a consistent way – whether it is SQL Server data, XML data, ADO .Net dataset, an object collection, or data in memory
  4. Offers compile time checking, autocompletion, and Intellisense

There are new features in C# that support LINQ including:
  1. Automatic properties
  2. Initializers
  3. Type Inference
  4. Anonymous types
Automatic properties provide us with a shorthand method for defining a new property. The C# compiler generates to get and set. Initializers reduce the amount of work it takes to create a new instance of a class.
Local variable type inference allow the C# or VB .Net compiler to determine the type of a variable at compile time
Anonymous types allow us to create an object type on the fly.

One of the coolest features in LINQ using VB.Net is XML literals. If you have ever had the experience of creating an XML document using the DOM (Document Object Model) you know that it may be cumbersome to build. It also is difficult to query using XPath. XML literals allow us to copy an paste code into LINQ and the compiler builds the syntax to make this happen. Read on here to read a description of XML literals and how it's done in VB9. In C#, we have to build an add-in to provide this same functionality. The following link describes how to build the Paste XML as XElement addin.

My slide deck can be downloaded here. Let me know what you think!



MORE >>
Posted by Noah Subrin at 11/5/2008 6:02 AM | View Comments (0) | Add Comment | Trackbacks (0)
Building Effective Web Applications with ASP .Net 3.5 - Week 1
This week I began a 6 part series of webcasts for a course I created for my employer, titled "Building Effective Web Applications with ASP .Net 3.5". Each session lasts two hours. Week 1 we focused on laying out the course and how to get started with ASP .Net 3.5.

Here are the course objectives:
  • Become familiar with new features in ASP .Net 3.5
  • Build database driven apps using LINQ
  • Leverage ASP .Net AJAX on both the client and server side
  • Learn about state management and caching
  • Secure your ASP .Net websites
  • Create an end to end web app
Week 1's agenda presented the following topics:
  • Tools We Will Use
  • ASP .Net 3.5 Overview
  • Project Setup/Configuration
  • WebForms Overview
  • Server Controls
  • User Controls
  • Master Pages
  • Debugging and Tracing
  • New Features in ASP .Net 3.5
My slide deck can be downloaded here:

Let me know what you think!





MORE >>
Posted by Noah Subrin at 10/26/2008 10:06 AM | View Comments (0) | Add Comment | Trackbacks (0)
ASP .Net Service Pack 1
If you are not aware, Visual Studio Service Pack 1 and the .Net Framework Service Pack 1 were released a few months ago. In addition to bug fixes, a lot of new functionality is contained in this release. A partial list of new features includes the following:

VS 2008 SP1:

    * Improved WPF designers
    * SQL Server 2008 support
    * ADO.NET Entity Designer
    * Visual Basic and Visual C++ components and tools (including an MFC-based Office 2007 style ‘Ribbon’)
    * Visual Studio Team System Team Foundation Server (TFS) addresses customer feedback on version control usability and performance, email integration with work item tracking and full support for hosting on SQL Server 2008
    * Richer JavaScript support, enhanced AJAX and data tools, and Web site deployment improvements

The .NET Framework 3.5 SP1:

* Performance increases between 20-45% for WPF-based applications – without having to change any code
    * WCF improvements that give developers more control over the way they access data and services
    * Streamlined installation experience for client applications
    * Improvements in the area of data platform, such as the ADO.NET Entity Framework, ADO.NET Data Services and support for SQL Server 2008’s new features

Additional details and a link to download SP1 can be found in this MSDN article.





MORE >>
Posted by Noah Subrin at 10/11/2008 6:17 AM | View Comments (0) | Add Comment | Trackbacks (0)
How to determine membership in Windows Groups using T-SQL
I lead a recent server\database migration from SQL Server 2000 to SQL Server 2005. Several of my team were supposed to be added to a Windows group that was to have been granted access to the new SQL Server. We tested their access and they were not able to authenticate to the new SQL Server . Read my feature article on the SQL Server World Wide User Group website as I explain how I determined whether they were in fact members of a particular group.

MORE >>
Posted by Noah Subrin at 8/4/2008 7:14 PM | View Comments (0) | Add Comment | Trackbacks (0)
32 Bit ActiveX on a 64 bit Windows Server
I currently am working on a server migration. We are moving my customer's web site and database platform into an Enterprise computing center. The Production environment will eventually be running on an HP Superdome. As part of the migration, we moved both the web and database servers from a 32 bit platform to Windows Server 2003 Service Pack 2, running on Itanium 64 hardware. We also are migrating our RDBMS from SQL Server 2000 to SQL Server 2005. We have done a lot of work so far, including rewriting many ETL scripts, but we still have much work to do. One interesting problem, I just resolved involved hosting Office Web Components (OWC) 2003.

Our customer uses Office Web Components 2003 for basic charting functions. In our current environment (Windows 2003 Server 32 bit mode)  the customer's web content runs without issues. We ported the web pages over and when instantiating the OWC Charts objects, we received the infamous "Cannot Create ActiveX Object error".  I did a lot of research, tried registering the control using regvsr32.exe, assigning the dll full permissions to the 'everyone' windows group to no avail.

Finally I realized that OWC is a 32 bit ActiveX object. Our IIS 6.0 environment was configured for 64 bits. I researched the feasiblity of using a different 64 bit ActiveX control, but that would include a lot of time spent on evaluation, testing, recommendation, and procuring funding - not to mention rewriting all of the code that uses our OWC Chart objects. The approach I ended up taking was to configure IIS to run in 32 bit mode. I also had to install the 32 bit version of ASP .Net in the framework directory. This process is discussed in the following Microsoft Knowlege Base Article:http://support.microsoft.com/kb/894435

I performed both steps described in the section "ASP.NET 2.0, 32-bit version". This includes running a script to enable IIS 32 bit mode, and installing the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root.

MORE >>
Posted by Noah Subrin at 7/28/2008 8:19 PM | View Comments (0) | Add Comment | Trackbacks (0)
SRA University SilverLight Course Week 5 - A Look at Animation
I presented Week 5 material this week from my 6 part SRA-University course on SilverLight development. We began by reviewing the downloader control and an MSDN on-demand web cast that showed how to refactor redundant XAML code using a web service, the downloader control, and the CreateFromXAML function. The CreateFromXAML method takes a string of XAML and returns a SilverLight object. In the webcast, the design scenario is a page that displays sales for 6 technical books over the course of a year. The sales are displayed as bar graphs on a web page, and the months and height of the rectangles are animated as sales are shown for each month using SilverLight animation. Instead of hard coding all of the data, such as the number of books, a two dimensional array is loaded, which for the sake of the demo, simulates a web service call. The code and video for this particular sample can be downloaded from the SilverLight .Net site.

We then proceeded to discuss Chapter 9 of the course text, SilverLight 1.0 Unleashed by Adam Nathan. The chapter begins by performing animation by hand, using only JavaScript and the SetInterval/SetTimer and ClearInterval functions. We then discussed animation using the SilverLight object model. We are able to perform DoubleAnimation, PointAnimation, and ColorAnimation. With DoubleAnimation, we are able to animate Width, Height, Opacity, ScaleX, ScaleY, Angle and other properties that use the double data type.

Animation using the SilverLight object model requires the following:
1) EventTrigger - which represents a trigger that applies a set of actions (animation storyboards) in response to an event.
2) StoryBoard - controls animations with a timeline, and provides object and property targeting information for its child animations
3) Begin StoryBoard object - a trigger action that begins a StoryBoard and distributes its animations to their targeted objects and properties.

Standard animation only varies a specific property from one value to another. More complex animations are performed using keyframe animation. There are alternative interpolation methods using keyframes such as the following:

1) Linear interpolation - With linear interpolation, the animation progresses at a constant rate of the segment duration.

2) Discrete interpolation - With discrete interpolation, the animation function jumps from one value to the next without interpolation.

3) Splined interpolation - Splined interpolation can be used to achieve more realistic timing effects. Because animations are so often used to imitate effects that occur in the real world, developers might need fine control of the acceleration and deceleration of objects, and close manipulation of timing segments. Spline key frames enable you to animate with splined interpolation.

Next week we are going to wrap up this semester with a discussion of SilverLight audio and video capabilities. Week 5 course content can be downloaded here. See you next week!

MORE >>
Posted by Noah Subrin at 6/13/2008 7:24 AM | View Comments (0) | Add Comment | Trackbacks (0)