Archives
-
Cool Software for iPhone/iTouch and Windows Mobile Devices
Wow…there’s a lot of great software out there for mobile devices! Over the years I’ve purchased a lot of Windows Mobile programs but I’ve never looked at iPhone software since I didn’t have a compatible device. Over the holiday break I had the chance to play around with an iPod Touch as well as my HTC Touch Pro Windows Mobile phone more. Here’s some software that really impressed me.
-
Update to Silverlight 2 DataGrid Released
Microsoft just released an update to the Silverlight 2 DataGrid that fixes the following issues:
-
Handling Dynamic Storyboards and Animations in Silverlight 2
Animations are a key part of Silverlight 2 that allow your applications to stand out from all of the boring and dull applications floating around on the Web. In previous articles I’ve written about storyboards and animations but as a quick review, Silverlight relies upon a Storyboard element to define several different types of animations such as DoubleAnimation (which animates object properties of type double) and ColorAnimation (which animates color properties). In this article I’ll show you how Silverlight can be used to create animations programmatically and how you can interact with animations defined declaratively in a XAML file using C#.
-
A Glimpse into the World of a Disabled Person
-
Getting Started with the ASP.NET 3.5 Chart Control
I think it’s safe to say that charting is a key part of many applications run on company Intranets. People like to see data visually as opposed to viewing it in rows and columns sometimes (especially higher level managers). While there are many 3rd party solutions available that provide charting solutions, you now have access to a very powerful solution from Microsoft that won’t set you back any $$ at all. Translated…it’s free! Sure, some of you may think that “free” products aren’t good but that’s not the case here. The new Chart control can generate visually stunning 2D and 3D charts without a lot of work on your part. In fact, there are over 25 different chart types that you can select for use in your ASP.NET or Windows Forms applications.
-
Using the Visual State Manager in Silverlight Templates
In a previous post I demonstrated how templates could be used along with styles in Silverlight 2 applications to customize controls. By using templates you can change colors, shapes, sizes and much more on a given control. Here’s an example of a standard Silverlight 2 Button control with a custom template applied:
-
Code from My ASP.NET Connections Talks
-
Silverlight 2 Development Workshop Code
-
Using Styles to Define Silverlight 2 Control Templates
Silverlight 2 allows styles to be defined to prevent duplication of attributes across controls in a XAML file. In a previous post I demonstrated how styles could be defined and used. As a review, here's an example of defining a style named ButtonStyle that targets a Button control:
-
Amazon.com AlbumViewer Application for Silverlight 2 Released
Back in the early days when Silverlight still had the WPF/e code name I put together a sample application that showed how to access album data from Amazon.com to display a 3D carousel. When Silverlight 1 was released I upgraded it which was straightforward since JavaScript was used for just about everything anyway. I’ve had a Silverlight 2 version available for a few months now but had to wait until the official release to make it available (and had some other priorities :-)). The upgrade was quite a bit more involved this time around since I had to convert all of the JavaScript to C#. It still went really smoothly although I’m certain that many improvements can be made.
-
Silverlight Toolkit Overview and Samples
Controls are where it’s at these days in the programming world. By using them you maximize re-use, enhance productivity and avoid building custom functionality. Plus, when you need a control to do something different you can always extend it rather than writing everything from scratch.
-
New .NET Logo
I just came across the new .NET logo and have to say that I like it since it’s cleaner than the old logo and more professional looking. The original logo was 8 years old so it was time for something new anyway. Here it is if you haven’t seen it yet:
-
Adding Style to Silverlight 2 Controls
Silverlight 2 provides a nice set of controls that can be used to capture and display data. While control properties can be set directly on the control in a XAML file using attributes, some properties will be duplicated between controls causing maintenance headaches. The following example demonstrates this problem:
-
Speaking on Silverlight 2 at the Hawaii .NET User Group
-
Silverlight 2 Released Today
Silverlight 2 was released today! Read more about the big announcement at Scott Guthrie’s blog. If you’ve been waiting to get into Silverlight 2 until it was officially released check out the following articles. Spike Xavier and I also put together a little song about Silverlight 2 awhile back which can be heard here.
-
New Song Released: Learning to Fall
This post was published back during elections in 2008 - time flies. Same old problems though.
-
jQuery to be Supported in Visual Studio and ASP.NET MVC
Microsoft just announced that jQuery will be supported in Visual Studio 2008 SP1 and shipped with ASP.NET MVC. Scott Guthrie mentions that an add-on for Visual Studio 2008 SP1 will be made available in a “few weeks” to provide intellisense for jQuery and that ASP.NET MVC will use it for Ajax server-side helper methods. The ASP.NET AJAX Toolkit will also be using jQuery for higher-level controls. -
Get It While It’s Hot! Silverlight 2 Release Candidate Now Available
-
Animating Clipping Paths in Silverlight 2
Clipping paths provide a way to hide sections of an object based on different geometries. You can apply rectangles, ellipses or even create your own custom paths to a target object and hide specific areas from view. I enjoy experimenting with things from time to time and decided to try creating a sports score scroller similar to the one found at the top of http://www.espn.com to see how much could be done with pure XAML. It allows a user to scroll a set of scores left or right by moving their mouse over corresponding arrows.
-
Upcoming Silverlight 2 and ASP.NET AJAX Workshops
-
Another New Player in the Browser Wars? Google’s Chrome Browser Released
-
What If I Don’t Call Dispose() on my LINQ to SQL DataContext Object?
I’ve written a few posts about LINQ to SQL and am generally a big fan of the technology (even with its weaknesses) since it’s very productive. After creating a custom DataContext object using the LINQ to SQL designer (or one created by hand) I always ensure that the object is wrapped in a “using” statement so that the Dispose() method is called:
-
Using LINQ to SQL XML Mapping Files – Step by Step
.NET 3.5’s LINQ to SQL functionality provides a great way to write data access layer code that automatically handles mapping relational data to object properties. Although I generally prefer to use stored procedures when performing insert, update or delete operations against a database (see my previous post on this), I still use LINQ to SQL in projects since it eliminates the time I used to spend creating SqlParameter objects or writing AddWithValue() parameter statements. Overall, LINQ to SQL has made me much more productive as a developer.
-
Introduction to Layout Controls in Silverlight 2
Arranging controls on a user interface in a flexible manner is key to building successful applications. Silverlight 2 provides three main controls that can be used for layout management:
-
Syncing a Windows Mobile Device Emulator with Vista’s Mobile Device Center
I started working on a Windows Mobile application on Vista and couldn’t get the emulator to sync property with the Mobile Device Center. I’d synced device emulators long ago on XP with ActiveSync but just couldn’t get it working like I wanted on Vista. I had the different 6.0 and 6.1 SDKs installed, had the Cellular Emulator working perfectly with the device emulator but couldn’t sync to save my life. I needed to move over a C++ dll that needed to live in the device emulator’s Windows directory. After a lot of searching it turns out that all I had to do was enable DMA in the connection settings for the Mobile Device Center as shown next:
-
ASP.NET - Render Hidden Fields at the Top of a Form with .NET 3.5 SP1
-
Instinct Experiment Over…Back to Windows Mobile
Over the past few weeks I’ve been trying out the Sprint Instinct touch screen phone to see how I liked it. I wrote my initial review here and posted some tips and tricks on using the device here. The poor browsing experience on the Instinct finally led me to take it back to the store yesterday so I’m back to using my PPC-6700 until Sprint releases the HTC Touch Diamond (or Pro) later this year.
-
Sprint Instinct Tips and Tricks
In a previous post I discussed some of the pros and cons of the new Sprint Instinct phone that I recently purchased. I’ve had the phone for a few weeks now and still like it a lot overall. It’s not nearly as flexible as the PPC-6700 phone I had previously when it comes to installing software (a lot of applications like Opera Mini won’t work due to a virtual keyboard issue that Sprint/Samsumg will hopefully fix), but it shines in many areas where my Windows Mobile phone was severely lacking such as visual voice mail, GPS navigation, flexible touch screen interface, business search (with GPS positioning), plus more.
-
Pros and Cons of the Sprint Instinct Phone
There’s been a lot of hype over Apple’s new iPhone 3G coming out on July 11th as well as Sprint’s recently released Instinct phone. I was originally going to switch over to AT&T and get the iPhone but it meant switching my wife over as well since we need to be able to call each other without using plan minutes. After evaluating the cost of switching carriers we decided it wasn’t worth it since we’d have to pay $400 to get out of our Sprint contracts and my wife recently bought the PPC-6800 Windows Mobile phone which wasn’t cheap. We’ve been very happy with Sprint’s network in our area as well.
-
Pushing Data to a Silverlight Client with a WCF Duplex Service – Part II
-
Pushing Data to a Silverlight Client with a WCF Duplex Service - Part I
Silverlight provides several different ways to access data stored in remote locations. Data can be pulled from Web Services and RESTful services and even pushed from servers down to clients using sockets (see my previous articles on sockets here, here and here). Silverlight 2 Beta 2 introduces another way to push data from a server to a client using Windows Communication Foundation (WCF) and HTTP. WCF's support for duplex service contracts makes this possible and opens up unique opportunities for pumping data to Silverlight clients. In this first part of a two part series I'll demonstrate how a WCF push service can be created and cover the steps to get a sample service up and running. The second article will focus on the client and show how to communicate with a WCF duplex service and listen for data that's sent.
-
Creating a Silverlight 2 Client Access Policy Socket Server
Silverlight 2 provides built-in support for sockets which allows servers to push data to Silverlight clients. By using this feature clients can avoid polling the server on a timed basis to ensure that clients are kept up-to-date. If you're new to the socket features built-into Silverlight 2 you'll want to read my previous posts to get additional details about how data can be pushed from a server to a client:
-
New Features in Silverlight 2 Beta 2
Bill Gates and S. Somasegar announced several new features at TechEd for Silverlight Beta 2 that are great additions to the existing functionality. Here's a list of the highlights in Beta 2:
-
Desert Code Camp Is This Saturday (May 31st)
-
A Software Developer Trying to Get In Shape with the Wii Fit??
We interrupt this tech blog for a quick (and pointless) message about trying to get in shape....
-
Why Unit Tests Matter and How They Will Actually Save You Time
Note: The point of the post is to explain why unit tests can actually save you time in the long run even if you or your boss don't currently use or believe in them. It's not my goal to go into some silly religious discussion about why unit tests should or should not be used in a project. There are plenty of forums out there for arguing over various technical concepts and methodologies if you have the time to waste.
-
Free eBook - Best of Simple Talk ASP.NET
-
SQL Server 2005 Configuration Manager - Cannot Connect to WMI Provider Error
I was trying to use the SQL Server 2005 Configuration Manager tool tonight and kept getting a "Cannot connect to WMI provider" error. Very frustrating because the error message didn't give the slightest clue how to fix the problem. After doing a few searches, I came across the following post by Eric Charran that solved the problem. Apparently there are some "mof" files that must not have been installed incorrectly on my system or got corrupted. I would've never figured out the solution in a 1,000 years but fortunately Eric blogged about the following command that fixed the problem instantly:
-
Carl, Richard and Myself on .NET Rocks Talking About Silverlight 2
-
Working with the GridView and the System.Data.Linq.Binary Type
I'm working with a database table that has a RowVersion field defined as a TimeStamp data type. The TimeStamp field is there to add concurrency into the application to ensure a row hasn't changed while a user is trying to update or delete it. When the TimeStamp field value is queried and added into the LINQ to SQL generated object it adds it adds the data as a System.Data.Linq.Binary type as opposed to a byte array.
-
Service Pack 1 Beta Released for Visual Studio 2008 and the .NET Framework 3.5
Microsoft just released the SP1 beta for Visual Studio 2008 and the .NET Framework 3.5 and it includes a huge number of new features and enhancements. Check out Scott Guthrie's blog for details but here's a quick list of what's included:
-
Using LINQ to Perform "WHERE IN (Value1,Value2)" Queries
I recently needed to select a few products from a database where the product ID matched up with a list of IDs. That's easy to do with a normal SQL statement since you can use the "WHERE IN (Value1,Value2)" clause to find what you need. However, I wanted to do it with LINQ in this case.
-
Update To Deep Zoom Composer for Silverlight Released
-
Silverlight - The Song
About 6 months ago my good friend Spike Xavier and I got together on a Saturday to work on a new song since we like to get away from programming now and then and mess around with music for fun. It'd been awhile since we released our last song titled No More DLL Hell and we decided that we needed to write a new song about one of our favorite new application frameworks....Silverlight. After a few hours we came up with some patterns and riffs we liked but we weren't happy with the overall melody. We shelved it, got busy with other work things and didn't do much related to music.
-
Orlando 2008 DevConnections Talks
-
Pushing Data to a Silverlight Client with Sockets: Part II
In Part 1 of this two part series on socket support in Silverlight 2 I discussed how a server could be created to listen for clients using classes in the System.Net.Sockets namespace. In that post the TcpListener class was used to listen for client connections and the client stream was accessed using the TcpClient class's GetStream() method. In this post I'll cover how a Silverlight client can connect to a server using sockets and receive data pushed by the server asynchronously.
-
Pushing Data to a Silverlight Client with Sockets: Part I
Silverlight 2 has built-in support for sockets which creates some interesting possibilities. If you've ever worked on a client-side application that needed to receive up-to-date data then you're probably used to solving the problem by polling. With polling the client contacts the server on a consistent, timed basis to see if any updates are available. ASP.NET AJAX provides a Timer control that makes this process easy and straightforward.
-
Silverlight 2 Networking Options
I've been spending my nights working on a new book covering Silverlight 2 and have been focusing on the new networking features that are available in the System.Net and related namespaces. Silverlight's great at animating objects, performing transformations and collecting data with all of the new controls that are available, but at some point you'll need to retrieve data or send data to a service. There's great support built-in for calling WCF services, ASMX services as well as other services. Support for calling REST APIs is also very good and easy to implement using classes such as WebClient and HttpWebRequest/HttpWebResponse. Asynchronous requests can be issued and handled quite easily once you figure out the pattern (which is quite consistent throughout the different networking classes).
-
Using Silverlight 2 ItemsControl Templates
Building Silverlight 2 applications reminds me of the first time I built an ASP.NET application. There are so many new features and controls that it takes a little time to get up-to-speed with what's available and how it can be used. It's definitely fun but at times you just want to throw the monitor out the window when something doesn't work like you think it should (disclaimer: I've never actually thrown a monitor anywhere...but I'm definitely guilty of wanting to do it). The good news is that the learning curve flattens out pretty quickly once you grasp a few key concepts which probably makes my monitor feel much better. :-)
-
Video: Silverlight Rehab
I just watched a new video called Silverlight Rehab that's pretty dang funny (heard about it through Adam Kinney who's on the Silverlight team). Even my wife laughed which is saying a lot since she doesn't typically appreciate "geek" humor much. I'm not sure who put it together or came up with the idea, but it's definitely creative.
-
Interesting 3rd Party Controls and Demo Applications for ASP.NET and Silverlight
I'm one of those developers that likes to build things myself mainly because the challenge is fun. However, lately I've been taking time to look at some of the 3rd party controls out there mainly because some of the things I've needed to do are already done (and done well) and I'd save time and money by using them. I'm not against re-inventing the wheel if I think I can do it better, but that's impossible for many things especially when companies are throwing multiple developers at a single control or framework. So, here are a few of the 3rd party controls and/or sample applications that I've come across recently that were interesting.
-
Silverlight Mobile Videos Available
-
Code Trip Tour Coming to Phoenix on March 24th
-
Want to Learn How to Use LINQ? Check out LINQPad!
I was catching up with some of the people I follow on Twitter tonight (as a side note, I used to think Twitter was a waste of time but I'm actually finding it useful now days) and noticed that Scott Cate listed a link to a free tool called LINQPad. Wow...I wish I would've known about this tool a few months back when I was working on different LINQ queries for an application. It really simplifies building queries and also happens to be a great way to learn the LINQ syntax as well. It was created by Joseph Albahari for the C# 3.0 in a Nutshell book.
-
Zumobi Application for Windows Mobile Phones
-
Scott Guthrie Speaking at the Scottsdale, AZ Center for the Arts on March 11th
If you're looking to get up-to-speed on the latest and greatest technologies being released by Microsoft look no further than the AZGroups.com event (a FREE event...you simply need to register) on March 11th featuring Microsoft's Scott Guthrie. If you've never heard Scott speak before then you've missed out. Not only is he extremely knowledgeable, but he's also a lot of fun to listen to and watch since he does demo after demo and doesn't PowerPoint you to death.
-
ASP.NET Data Validation and Data Entry Controls
If there's one thing I hate about building Web Forms it's data validation and custom data entry controls (think date pickers, etc.). ASP.NET provides some nice controls to perform validation, and has controls in the ASP.NET AJAX Toolkit that also help, but in many cases you end up writing custom JavaScript or server-side code or may even build custom controls.
-
Building an N-Layer ASP.NET Application with LINQ, Lambdas and Stored Procedures (Updated)
Update: I refactored some of the code and also did a better job ensuring Dispose() is called everywhere so that the DataContext object gets cleaned up properly.
-
SmartWebControls.com Released
Last night we released a new version of the OrgChart.NET ASP.NET server control under a new name of "SmartChartPro". We decided to give the control a new name since it's capable of doing more than just OrgCharts (although that's what most companies use it for). We also released a new company website named SmartWebControls.com based on .NET 3.5 where SmartChartPro and other upcoming controls will now reside.
-
Getting Ready for Silverlight 2.0
Scott Guthrie just released new information about Silverlight 2.0 including 8 tutorials. It's going to be a "happening" client-side development framework once it's all done! Here's a list of the tutorials he released:
-
LINQ to XSD
One of the cool features in VB 9.0 is the ability to work directly with XML in code without having to wrap quotes around everything. If you're a C# developer, that's a feature that we don't have although you can do similar things with LINQ to XML (quotes required though).
-
Testing Email Messages Sent using System.Net.Mail on Windows Vista
I've been developing for months on Windows Vista and had everything I needed at my disposal. Last night, however, I needed to test whether or not email messages were being successfully sent from an ASP.NET application and see what they looked like. I went to look for an SMTP server in Vista Ultimate and quickly found that there isn't one. IIS7 includes email forwarding capabilities, but I wanted a simple SMTP server (or something that could emulate one) so that I could see the email messages that were being sent.
-
LINQ and Lambdas and Sprocs....Oh My!
There's a lot of great stuff in .NET 3.5 and several different ways to work with LINQ technologies such as LINQ to SQL. I'm currently putting together some demonstration code for a talk I'll be giving at DevConnections in Orlando and showing how LINQ, Lambdas and LINQ with stored procedures can be used to do the same thing so that people get a feel for each technique. For shorter queries I generally prefer lambdas since it's more object-oriented feeling compared to LINQ (to me anyway). For more complex queries LINQ is much easier though. Overall, I still prefer stored procedures since you have much more control over security that way and can maintain queries without resorting to C#/VB.NET code changes in some cases. Plus, LINQ makes it really easy to pass parameters to stored procedures without having to create SqlParameter objects (something I've always despised).
-
Simplifying ASP.NET ListView Control Templates
I've been working with the new ListView control in ASP.NET 3.5 combining it with LINQ and Lambda expressions and was finding myself duplicating a lot of code between ItemTemplate and AlternatingItemTemplate templates (I'll be posting the sample application that demonstrates using LINQ, Lambdas and Stored Procedures soon). The AlternatingItemTemplate contained the same code as the ItemTemplate except for a CSS class added to the first <tr> element to change the background color. Here's an example of both templates that were used initially:
-
CS300 Course Samples
Thanks to everyone that attended the CS300 class last week at Interface Technical Training. I had a great time and enjoyed meeting everyone. You can download the on-the-fly demos relating to ADO.NET, events, Web Services and the BackgroundWorker here. The complete set of samples for the course can be download here.
-
Introducing Visual Studio 2008 Course
Thanks to everyone that attended the Visual Studio 2008 course yesterday. It was a lot of fun talking about all of the new stuff available in VS 2008 and .NET 3.5 and hearing the different projects people are working on. As promised, here's the lab code from the course:
-
How Would You Refactor this Code? #1
It's amazing how many different ways there are to accomplish the same task in code. Talk to 2 developers and you'll almost always get two opinions. That's part of what keeps it fun (and potentially why that guy in the other cube is constantly annoying you :-)). In a previous post I wrote, there were several speed enhancement suggestions that were really good so I decided to start a "How Would You Refactor this Code" blog series to get opinions and see different approaches to coding.
-
C# 3.0 Features: Extension Methods
.NET 3.5 is out which means all of the great features available in C# 3.0 are available to use now. Here's a quick list of the main language enhancements available in C# 3.0:
-
New Song: Story of Your Life (Updated)
All code and no play makes me a dull boy I'm told (mainly by my wife) so I've been getting back into song writing and recording a little over the past few months as time permits. I recently finished up a new song called Story of Your Life that was recorded in my home studio (equipment and software used is listed below for anyone interested). My good friend Spike Xavier wrote the lyrics.
-
New Video: Integrating Silverlight and ASP.NET AJAX
I gave a talk at Desert Code Camp toward the end of 2007 that discussed how Microsoft's Silverlight product could be integrated with ASP.NET AJAX to dynamically display albums obtained from an Amazon.com Web Service. It's taken awhile to get the video posted, but it's now available. The audio in the room wasn't great since no microphone was used so you may need to crank it up a bit.
-
Got Code? .NET Framework Library Source Code Released
If you've ever wanted to step into the .NET framework library classes as you're debugging your project then you'll be happy to know that Microsoft has released the .NET Framework library source code. Step in and out of various framework classes, ASP.NET controls, plus more. Read more about it on Scott Guthrie's blog:
-
Bill Gates - The Last Day at Microsoft
My good friend Simon Allardice just sent this link to the Bill Gates farewell video. Funny stuff ! :-)
-
Upcoming .NET Courses in 2008
I've had several people here in the Phoenix area and others I've met at ASP.NET Connections conferences ask when I'll be teaching specific .NET classes in 2008 and my standard reply has been "I'm not sure at this point". We have things scheduled out past June now so here's the information for those who are interested. Most of the classes listed are 5 days aside from the First Look at Visual Studio 2008 (1 day) and ASP.NET AJAX Programming (3 days).