Log in

View Full Version : .NET, Smartphone, Rock n' Roll in Online Show


Andy Sjostrom
08-08-2003, 08:23 AM
<div class='os_post_top_link'><a href='http://www.microsoft.com/downloads/details.aspx?familyid=594fd968-9e18-4560-9530-b6066a88618a&displaylang=en' target='_blank'>http://www.microsoft.com/downloads/details.aspx?familyid=594fd968-9e18-4560-9530-b6066a88618a&displaylang=en</a><br /><br /></div>If you think Smartphones are cool, you should meet some of the guys and gals behind it! Meet Neil Enns and Ori Amiga, Lead Program Managers, in this MSDN TV online broadcast. They demonstrate how to build an online weather application in less than five minutes using Visual Studio .NET 2003, Visual C# and a next generation Smartphone device. Next generation Smartphones will have .NET Compact Framework in ROM which means that developers can use Visual C# or Visual Basic .NET to develop Smartphone applications.<br /><br />&lt;rave>Even if you are not a developer, you should check this out! Neil and Ori rock. I've had the privilege of meeting them in person and they simply rock.&lt;/rave><br /><br />The demo shows how you can, with just two lines of code, create an online Web Services enabled Smartphone application! The application is shown to run both in an emulator and on a real device. Very cool!

Mike Temporale
08-08-2003, 01:27 PM
Very cool. It's nice to see that it's as easy on the Smartphone OS as it is for PPC and the PC.

Too bad the SDK isn't available for a while longer. :( I wish they wouldn't tease us like this. :wink:

Hooked
08-08-2003, 04:27 PM
I don't want a demo. I want a beta!

Jason Dunn
08-08-2003, 10:51 PM
I wonder why Microsoft sometimes makes things harder than they need to be - why bundle a media file in an exe file? It's not like you can compress a WMV file very much... :roll:

UPDATE: They shaved 300 KB off a 27 MB file by bundling it an exe package, and nullified the ability of WMP to stream the data, forcing the user to download it. MSDN! Give your head a shake! :ninja:

kennyg
08-09-2003, 02:18 AM
It was a nice little demo, but it's no where close to any type of real functioning application. The web services piece is the easiest part of any coding now-days. I could have done the same thing in Java years ago, two controls on a form is the farthest thing from reality you can get.

If you noticed, they didn't establish a GPRS or any other type of data connection, or monitor it. That requires access to an API that is barely accessable from the .NET CF (Connection Manager). The .NET CF is still in its infantcy and has a long way to go before it is useable in a wide array of application scenarios.

Kenny.

Neil
08-09-2003, 03:20 AM
Neil and Ori rock. I've had the privilege of meeting them in person and they simply rock.

Geez, Andy. Ori spent the whole day walking around work with a swelled head! :P Seriously though, thanks for the kind words.

Neil
08-09-2003, 03:25 AM
It was a nice little demo, but it's no where close to any type of real functioning application. [...] If you noticed, they didn't establish a GPRS or any other type of data connection, or monitor it.

Hey Kenny,

You're right, it's definitely not a real application. It's tough to try and show a demonstration of building a complete, end-to-end, application in the 15 minutes we had. Still, we hope what we were able to show gets people excited about using the tools. We've done other presentations in the past at TechEd and MDC that show some more in-depth development. One excellent example is of a real-estate application that is written in .NET CF, uses SQLCE for data storage, and SQL Server Notifications for new house listings. It's very nifty, and the tools and techniques are the same as the ones we demo'ed in the MSDN clip.

Regarding GPRS, the nice thing about web services on PPC and SP is that you don't actually have to use connection manager. You just access the web service object and .NET CF will bring up the connection for you as necessary. We didn't show this in the demo since we wanted to illustrate debugging, but if we hadn't been connected to ActiveSync the SP device would have connected via T-Mobile's GPRS with the exact same code. You can give this a whirl today on a PPC device.

jctune
08-10-2003, 02:28 PM
Neil,

I haven't programmed in years - but I've got some ideas for a few smartphone apps bouncing around in my head. A couple of questions for you:

1. Is it safe to say that an application developed for SP2003 using .NET will not be backwards compatible with SP2002?

2. I'm a little fuzzy on this web services thing. I searched the net, and couldn't find an answer to my simple question - are there a lot of publicly available web services? For example, is that temperature service available to anyone to use? If there are a lot, where can I go to get a listing?

Sorry if these questions are a little basic - but I'm trying to understand these things. Thanks for the demo.

Robert Levy
08-10-2003, 05:02 PM
1. Is it safe to say that an application developed for SP2003 using .NET will not be backwards compatible with SP2002?


That is correct. .NET apps will only work on Smartphone 2003 and later.


2. I'm a little fuzzy on this web services thing. I searched the net, and couldn't find an answer to my simple question - are there a lot of publicly available web services? For example, is that temperature service available to anyone to use? If there are a lot, where can I go to get a listing?


There are a lot of them available that you can use - plus its really easy to create your own. The most popular ones are provided by Google, Amazon, and the MapPoint team at Microsoft. A large catalog of others can be found at http://www.salcentral.com

Neil
08-10-2003, 06:24 PM
We grabbed the weather service from www.xmethods.net which lists a bunch of web services. I've never actually seen salcentral, I'll have to check it out!

The specific web service we used was GlobalWeather, available at http://www.capescience.com/webservices/globalweather/.

As Robert replied, .NET apps built for the next generation Smartphone won't work on Smartphone 2002. You need the .NET CF runtimes and whatnot, and we are not going to release them for SP2002.

jctune
08-11-2003, 02:55 PM
Thanks for the reponses guys - now I just have to decide if I'm ready to re-learn how to code or not!

Neil
08-11-2003, 04:01 PM
You'll find that programming .NET is a heck of a lot easier than what you used to use. I'm by no means a developer, and I hadn't written anything of substance in several years. The cool thing about .NET is you don't have to waste a ton of time learning intricacies of a language (like C++), nor do you have to spend ages trying to figure out which random library you need to link with which other random library to make everything work.

The base class libraries are very helpful and do a lot of the work for you. Once you know which library to use (and there are a ton of samples around, check out sites like www.opennetcf.org), it's really fun!

If you want a good book, two of my reports who have never programmed before found the Ugly Man book quite useful (at least that's what we call it!). http://www.wrox.com/books/0764543822.shtml

Neil
08-11-2003, 05:31 PM
MSDN! Give your head a shake!

So I sent your rant to the folks at MSDN *grin*. The reason the .wmv is wrapped up in a .exe is two-fold:

1) It allows us to include a EULA that the user sees after download
2) It's the only format supported by the microsoft.com download center

Both of these requirements come from MS Legal.

Jason Dunn
08-11-2003, 06:07 PM
1) It allows us to include a EULA that the user sees after download
2) It's the only format supported by the microsoft.com download center

Both of these requirements come from MS Legal.

A EULA? For a video file? 8O Why doesn't customer convenience play a factor here? Betcha' it would if I sued Microsoft if a sprained my wrist while trying to execute a video file. :lol:

Shakespeare had it right about what to do with lawyers. :twisted:

brntcrsp
08-15-2003, 12:03 PM
I wanted to thank Neil and Ori for their presentation. With the release of the Smartphone SDK I whipped out the same demo in about as long as it took them (you guys said your machine was pokey, bah!). My only realy trouble was to discover the web service you guys used. Thankfully the WS wizard screenshot was clear enough to read :) Now all that remains is to get my hands on a next-gen device...

Thanks guys!

PS - I think it's great to have real interaction with the teams on new products like this. Helps kindle a belief in the community.

PPS - funny that neil is a smartphone pupil

jctune
09-10-2003, 06:19 PM
So I got my copy of Visual Studio and have been playing around a bit. Of course my first attempt was to duplicate Ori and Neil's demonstration.

While doing this, I ran into a problem that I have since duplicated in another circumstance, so I wanted to see if anyone knows what's going on. In the demo, after adding the proper web reference, they initialize a new temperature service object with the following statement:
WS.TemperatureService myService = new TemperatureService(); (I may be a little off, but it's close).

When I try to build with this statement, I get the following error:

The type or namespace 'WS' could not be found (are you missing a using directive or an assembly reference)

I've been able to get around this error by copying the full class reference for TemperatureService (something like [appname].net.xmethods.service.TemperatureService instead of WS.TemperatureService).

I've since duplicated this when playing around with StringCollections. The following code gets me the exact same error (just with 'StringCollection' instead of 'WS'):
StringCollection testCollection = new StringCollection();

But if I put in the whole class, it works just fine:
System.Collections.Specialized.StringCollection testCollection = new System.Collections.Specialized.StringCollection();

I've double and triple checked that I'm including the correct using statements, but I can't figure this out. It's not fatal, but still a bit annoying.

Any ideas?

Robert Levy
09-10-2003, 06:34 PM
Your "using" statements have to go at the top of each file. Please post a copy of these lines from the file in question.

jctune
09-10-2003, 08:12 PM
Robert,

Thanks for the quick response - here goes:

From my Weather app (to duplicate the app from the presentation)
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Web.Services;

I had just noticed that the System.Web.Services reference wasn't there originally, but adding it didn't make a difference.

For my other app, I didn't realize that the using statements had to be in each file. I had created a new file within my solution for a new class, and had not included the using statement in the new file, it worked. Who would have thought it?

Any thoughts on which reference I'm missing in the first example?

brntcrsp
09-10-2003, 08:51 PM
grabbing my code right now.

hrm, well my reference code was automagically generated when I created the reference to the web service. Do you have a "Reference" folder under your project folder? You may want to check the namespace in the reference.cs and see if it matches/inherits from the application namespace.

Additionally, the using using System.Web.Services; falls under the Resource.cs file because the parent does not explicitly need access to those resources.

For your second project, if it inherits from the first file then the using would be inherited as well. I suspect my jargon may be a bit off but I hope the intention is clear.