Vermont Code Camp Content

 

Yesterday was the Vermont .Net User Group’s first Code Camp. They put on one heck of an inaugural event. It was well organized, well attended, the facility (Kalkin Hall at the University of Vermont) was great, and they had great sponsorship. All in all, Julie Lerman and her team did a fantastic job.

Because there was so much interest, presenters were mostly limited to just one presentation, so I condensed my Silverlight for Business presentation so I could include new content for RIA Services. I have uploaded the presentation materials, and they are available here.

Again, many thanks to the event organizers and the sponsors!

Silverlight Research Links Updated

I have updated my collection of Silverlight Research materials that I have been using to back my Silverlight
presentations. The links (now the graphic makes sense, right?) have been categorized into “logical” groups (your mileage may vary) and a section has been added for several books that I consider good references on the topic. Anyway, the content can be found here. Enjoy!

New England VB Professionals Presentation Overview

I had another chance to get in front of a User Group – this time the New England Visual Basic Professionals to discuss Silverlight for Business. I changed up the presentation a bit, removing the discussion of Authentication and Membership and replacing it with a quick discussion/overview of .Net RIA Services. It also was my first opportunity to show some of the new features and tools available in the recently-released Silverlight 3.

I have posted the latest version of the presentation slides, code, and “script.” As usual, the script is an interactive PDF version of the mind-map that I use, and it includes hyperlinks to the references for the pertinent topics covered in the presentation. To use it, start at 1:00 and work through the topics in a clockwise rotation. The content is available here.

I went through a lot of research material getting ready for this presentation, and I will be updating and organizing the Silverlight Research section of my SkyDrive storage area to reflect that over the next couple of days.

Many thanks to NEVB’s Andrew Novick, as well as Dean Serrentino and Teresa DeLuca from the New England ASP.NET Professionals User Group for their help and hospitality.

jQuery IntelliSense Issue

I recently ran into an issue with IntelliSense support for jQuery 1.3.2 in Visual Studio 2008 SP1. Unfortunately, I did not find a whole lot of precise documentation for the solution, which was actually quite simple once I stumbled into it.

Basically, I kept getting the message “Error updating Jscript IntelliSense” … “jquery-1.3.2.js: Object doesn’t support this property or method @ 2139:1”

 My script tag entries were as follows:

<script type=”text/javascript” src=”jquery-1.3.2-vsdoc2.js”/>
<script type=”text/javascript” src=”jquery-1.3.2.js”/>

The root case is that the default download from the jQuery site for the IntelliSense documentation is a “vsdoc2” file, where IntelliSense expects a vsdoc file. Simply renaming the file and changing the script reference fixes the problem.

Note the vsdoc2.js filename

 

Project with Renamed File

My revised script tag entries:
<script type=”text/javascript” src=”jquery-1.3.2-vsdoc.js”/>

<script type=”text/javascript” src=”jquery-1.3.2.js”/>

And now jQuery IntelliSense works as advertised!

New Script Reference with IntelliSense Working

NH.Net User Group Presentation Overview

I have to say that I had an absolute blast presenting at the NH .Net User Group last night. It was a good crowd that seemed genuinely interested in the topic and threw up some good questions. I only angered the “demo gods” once, but was able to dig out and keep to my plan for what I wanted to cover in the presentation. With the 2 hour format, I was actually able to cover more ground than I had elsewhere, stating with a bit of “Hello World” and running all the way through authentication and the HTML Bridge.

I have posted the latest version of the presentation slides, code, and “script.” As usual, the script is an interactive PDF version of the mind-map that I use, and it includes hyperlinks to the references for the pertinent topics covered in the presentation. To use it, start at 1:00 and work through the topics in a clockwise rotation. The content is available here.

My one glitch occurred during the Authentication segment – to date the most fragile piece of the whole event. I got aggressive and uncommented too much out of the web.config too early. The result was that I had set things up for Forms Authentication, with Anonymous access disabled. When I went to add the web service reference from the Silverlight Client project, the tool failed to obtain information about the service (because it was trying to request information from the server anonymously.) Once I commented out the anonymous restriction and recompiled, things were working fine.

Now it is time to set things up for Silverlight 3 – I hope to do something at the upcoming Connecticut Code Camp on June 13, which is likely to be my next presentation opportunity.

Many thanks to the audience and especially to Pat Tormey who runs the NH group.

 

New Hampshire .Net User Group

At the Boston Code Camp last week I got to talking with Pat Tormey who runs the NH .Net User Group and he asked if I could bring my Silverlight talk to their April meeting. After he sat through the presentation he was still interested, so it looks like I’ll be holding off on changing the presentation content to Silverlight 3 for a couple more weeks.

I’m really looking forward to this talk. My introduction to the User Group Communities came through the NH .Net User group, back before my daughter was born and when it was meeting in Tyngsboro, MA. I saw some great presentations there, and I think I owe Sam Gentile an apology or two as I asked him about any potential impact to video playback that could be caused by the unpredictable timing of the .Net framework’s GC collections. I got to see some really good speakers talk about a wide range of topics dating back to the beginnings of .Net. It is a great opportunity to try to give something back to this group.

I’ll be presenting on Wednesday, April 15th at 6:30 PM at the Eaton Richmond Center at Daniel Webster College in Nashua (directions.) There’s usually a gathering at Shorty’s off of Exit 6 (next to the Home Depot) in Nashua following these events.

More from Silverlight at Boston Code Camp

I received a request from one of the attendees at my presentation to pass along some information about an upcoming online Silverlight course being offered as of next week and figured I would pass it along (friendly faces in an audience are priceless.) His request follows:  

 Mr. Garland,
    I have some information on an online Silverlight 2 course that will start in a week. I’m hoping you’ll consider posting this information on your site, since you’re a presenter and blogger on Silverlight 2. I attended your presentation at Code Camp 11.
    The course is offered by Foothill College, a state college in Los Altos Hills, California :

http://www.foothill.edu

    The course is CAST 80, “SELECTED TOPICS IN SOFTWARE APPLICATIONS”. The special topic will be Silverlight (2). On this page, select “Computers & Software Training (CAST)”, then select the “Spring 2009” quarter, and click the Search button :

http://www.foothill.edu/schedule/schedule.php

    Here is more information on this course (listed by its former number CIS 19S). One of the books that will be used is Matthew MacDonald’s “Pro Silverlight 2 in C# 2008”. I have this book, and it’s excellent :

http://www.schrotenboer.com/foothill/cis-019s.htm

    Note that prospective students must first be “accepted” by Foothill before they can register for courses. Luckily, this can be done purely online, given that you answer the questions correctly, as I’ve done. Follow the “Foothill Application for Admission” at the top of the left column :

https://registration.fhda.edu/prod/web/default.jsp?submitButtonName=Enter+Registration+System#

    This course is 4 credits. The cost for outside-of-California students is $128 per credit (quite reasonable). There is also a fixed cost of $42.50 in various fees.

    The class starts April 6th, and lasts 12 weeks. The minimum enrollment for this class to proceed is 20 students (on-campus and online, total) at one week before the course begins. Presently, there are only 10 students enrolled, including myself. I’m hoping that you will post the information in this email so that students with an interest in Silverlight will have the opportunity to take this course.

    I can supply you with the email address of the instructor, Calvin Schrotenboer, if you wish. I appreciate any assistance you can provide in publicizing this course. Thank you very much.

                                             Sincerely,

                                             James Trela

Code Camp Silverlight for Business Review

Yesterday’s Code Camp presentation went relatively well – the Demo Gods only frowned a couple of times. I wanted to take a few moments to review some of the things that went wrong, what I did to overcome them, and also to review some of the questions I was asked to answer.

Question: I have a client who needs to write a Business Application. Is Silverlight the right technology to use?
Answer: Um….yes? Actually, I could not answer this directly. There are too many variables involved. What is the existing technology investment, if any? What are the client’s feelings about that investment? Should it be kept, or does it need to be replaced or rethought? What are the end-user needs, especially in terms of OS platform, ease-of-deployment, occasional or ubiquitous network connectivity, etc? What is the existing skillset for maintaining the code going forward?

There’s a lot that goes into making a decision about adopting a technology for a problem, especially if it is for a client. Silverlight is certainly a good platform for developing interesting applications, including Line of Business applications. I’d invite people to review the “Why Silverlight” portion of my presentation to see if its benefits are applicable to their specific situations.

 

Issue: Visual Studio and IE locked up during the demo. I was running the application, and it got stuck at 45% loading. IE was unresponsive and Visual Studio told me it was busy whenever I tried to do anything.
Cause: Voodoo?
Resolution: I used Task Manager (actually I used Process Explorer) to kill IE. Visual Studio was still locked up. I tried to shut down the Cassini web host, but the tray icon was unresponsive. In the interests of time, my next step involved using Process Monitor to kill Visual Studio and just restarted things from where I left off. That worked…otherwise my next steps would have involved rebooting, and perhaps doing a clean build.

Issue: During the Authentication topic, checking the ASP.Net Authentication Service revealed that it was in a bad state.
Cause: Pilot-error (cut and paste problem in the web.config)
Resolution: When I pasted in the configuration contents for the Authentication and Role services, I neglected to combine these with the pre-existing service configuration for the other web service I was using. The configuration parser got annoyed when it realized that I had two sections with the same name. I just merged the Service and Behavior declarations in and successfully rechecked the ASP.Net Authentication Service.

Issue: During the Authentication topic, when showing server-side role checking, I got an exception when launching the application.
Cause: Pilot-error (cut and paste problem when adding the functionality to the web service code)
Resolution: An astute attendee noticed that when I pasted my new GetProducts method into my web service code, I had left the OperationContract attribute off. I re-added the attribute, recompiled, and was able to show that logging in as different users with different roles returned different data. In gratitude, the user got one of my giveaways on the spot – a copy of O’Reilly’s Programming EF.

Question: I have a shop of ASP.Net/HTML/Javascript developers. Should I go back and tell them that they need to learn Silverlight?
Answer: Um…yes? Again, a lot depends on the specific problem domain. Silverlight has many benefits, and if those benefits seem to apply to the direction your business is going, then it is likely that it would be a good thing to learn. Be careful, however of the old adage “if all you have is a hammer, the whole world looks like a nail.” Sometimes, you really should use a screwdriver. Silverlight is a viable technology, and is being used in many professional scenarios. Unfortunately in answering this I think I gave too many examples of people using the media capabilities of Silverlight (NBC Olympics, CNN Inauguration, etc.) For a showcase of hundreds of actual Silverlight Business applications, please visit the Microsoft Silverlight Showcase and select “Business Applications” from the Category section. Also, Microsoft has put together some compelling data in this application.

 

Silverlight Showcase Business Applications

There were also a couple of questions about LINQ-to-Entity and EF vs LINQ-to-SQL. There are better sources than me for information on that battle.

Another Code Camp

Spring is here (finally!) so it is time to go camping again – or perhaps at least the geek alternative. I’m doing another Code Camp, this time reprising my Silverlight for Business Applications presentation, with a few changes. It will be interesting to do this one considering everything that was just announced for Silverlight 3.0 (all of this is how you do it today, but if you wait until the new framework comes out, it will be a whole lot easier…)

Anyway, I have uploaded the presentation slide deck, materials, and my “script PDF.” The content is available for download here.

Note: I am posting this early, before I do my presentation, and will refine it later on today…I just don’t want to get into one of those “life happens” situations and neglect to push up the content in a timely manner…

Silverlight Demo Content Posted (Pt1)

The first of the New Hampshire Code Camp
Silverlight Demo content has been uploaded. The content includes the simple “Hello World” code, which is just a basic Silverlight page and project, as well as the associated auto-generated Web Project. The second project is the data access demo, which illustrates a data access layer (Linq to SQL), a WCF Service which provides access to the data access layer and returns a shaped version of the data in the DAL, and a Silverlight page which shows the data in a DataGrid.

The Silverlight page in the Data Demo also illustrates the use of the Silverlight Controls’
AutoCompleteBox to do client-side filtering of the retrieved data, as well as a Line Graph from the same library. One thing that has been added since the demo is a “swinging gate” technique to use an AutoResetEvent and a background thread to load the data for the graph, in order to avoid the latency seen in the UI when the graph was being arranged inline with keyboard entry in the AutoComplete box.  The DataDemo relies on the Products table in the AdventureWorks sample database, which can be downloaded here.  As I was using a named instance of SQL Server on my machine, some updates to the connection string may be necessary – the connection string is being kept in the web project’s web.config. file.

Also uploaded are the PowerPoint slide deck and a folder of links and slides which served as reference material used in preparing the presentation. (Near) future uploads will include the use of the ASP.Net Authentication Service from a Silverlight control, and interacting with HTML content (and jQuery) through the HTML bridge. Also in a subsequent upload will be interactive PDFs of the script content I used through the presentation.

To everyone (anyone?) who was waiting for this content, thank you for your patience.

The content is available here.