Thursday, December 4, 2008

December 2008 NwaDNUG Meeting

The next NWA .Net User Group meeting will be on December 9 at 5:30 PM. INETA will be sponsoring our main speaker, Kate Gregory, who will be presenting on "The Windows Vista Bridge: How Managed Code Developers Can Easily Access Exciting New Vista Features". John Oswalt from Tyson will also be presenting a brief 15 minute presentation on Rest in WCF prior to Kate's presentation.

Lightning Presentation

Title: Rest in WCF

Description: This session will describe the new REST features available to developer in Windows Communication Foundation (WCF) 3.5.

Main Presentation

Title: The Windows Vista Bridge: How Managed Code Developers Can Easily Access Exciting New Vista Features

Description:Accessing new Windows Vista features is a challenge from managed (.NET) code. The level of interoperability required is out of reach for many developers. The Vista Bridge is a sample library you can use in your own projects today that provides access to new user interface features as well as “behind the scenes” power features. Discover a shortcut to Windows Vista for Microsoft Visual Basic and Visual C# programmers and how you can get involved.

Presenter: Kate Gregory is the Microsoft Regional Director for Toronto, a Visual C++ MVP, the author of over a dozen programming books, and a technical speaker. In 1986, she founded Gregory Consulting with her partner, Brian. Based in rural Ontario, Gregory Consulting provides consulting and development services throughout North America, specializing in software development with leading-edge technologies, integration projects, and technology transfer. They also provide training, mentoring, and technical writing services. Her current specialties include C++ programming, migration to managed code, and Vista development.

Swag:

Microsoft Visual Studio 2008 Standard
6 Office Business Applications for SharePoint - MSPress
Introducing LINQ - MSPress
Programming LINQ - MSPress
Hunting Security Bugs - MSPress
Silverlight 2 – MSPress
Infragistics NetAdvantage for .NET 2008
JetBrains choice of ReSharper, TeamCity or IntelliJ

When:
Date: Dec 9th
5:30 PM - 5:45 PM - Welcome and News, Sign-in and Food
5:45 PM - 6:00 PM - Lighting Presentation
6:00 PM - 6:10 PM - Intermission – Presenter switch over
6:10 PM – 7:30 PM – Main Presentation
7:30 PM – 8:00 PM – Closing and Prize give-a-ways

Where:
The Jones Center
922 East Emma Avenue
Springdale, AR 72764
226 Kansas City Room

NetMeeting URL: http://snipr.com/59eh8

Click here to RSVP on CodeZone!!!!!!!!!!!!

Sunday, July 13, 2008

3 Tips to Get jQuery Working with ASP.NET

Most of the current development at my job is ASP.NET 2.0/C#. We recently were in the final stages of completion on a project were we utilized Microsoft AJAX extensively. Albeit, the pages appeared better to the customers, but the markup was confusing and the data moving through these Update Panels to the server-side code was very large.

We recently began using the glorious JavaScript library called jQuery and are in the process of replacing the Microsoft AJAX with it. Not only has this given us lighter AJAX, but the simple control that jQuery provides makes it a lot easier to transfer code which was previously being done on the server, into little jQuery page manipulations on the client side. One modal popup that I recently converted went from around 44 KB to 300 bytes when it became visible, which is just ridiculous. One facet that I should mention is that we are also now using JSON when moving the data instead of XML; we figured if we are reducing page size to "cut out all the stops".

Below are the links to the tutorials that saved our lives, although I want a mention a few items that appear to be missing or not exactly clear:

1. ASP.NET 2.0 Web Service is missing [System.Web.Script.Services.ScriptService]
- This commented out section is included in ASP.NET 3.5 Web Services but not 2.0 ones!

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {
2. Web Service calls work locally but not on IIS
- You must add the HttpPost line to your Web.Config












3. Serialize your object to JSON and then use json2.js to securely parse on the client
a. Use Microsoft AJAX library to serialize your object to JSON

using System.Web.Script.Serialization;
...
JavaScriptSerializer j = new JavaScriptSerializer();
return j.Serialize(customObject);

b. Use the json2.js parser instead of eval to protect against malicious script

var myObject = JSON.parse(myJSONtext);

Aforementioned links:
A Look Into JQuery Ajax API
3 mistakes to avoid when using jQuery with ASP.NET AJAX/
Using jQuery to Consume ASP.NET JSON Web Services/
HTTP GET and HTTP POST Are Disabled by Default