Smartphone Thoughts

DEVELOPER - .NET, Smartphone, Rock n' Roll in Online Show

Andy Sjostrom - Fri Aug 08, 2003 1:23 am
Post subject: .NET, Smartphone, Rock n' Roll in Online Show
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.

<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.</rave>

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 - Fri Aug 08, 2003 6:27 am
Post subject:
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. Sad I wish they wouldn't tease us like this. Wink
Hooked - Fri Aug 08, 2003 9:27 am
Post subject:
I don't want a demo. I want a beta!
Jason Dunn - Fri Aug 08, 2003 3:51 pm
Post subject:
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... Rolling Eyes

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 - Fri Aug 08, 2003 7:18 pm
Post subject:
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 - Fri Aug 08, 2003 8:20 pm
Post subject:
Quote:
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! Razz Seriously though, thanks for the kind words.
Neil - Fri Aug 08, 2003 8:25 pm
Post subject:
Quote:
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 - Sun Aug 10, 2003 7:28 am
Post subject:
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 - Sun Aug 10, 2003 10:02 am
Post subject:
jctune wrote:

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.

jctune wrote:

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 - Sun Aug 10, 2003 11:24 am
Post subject:
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 - Mon Aug 11, 2003 7:55 am
Post subject:
Thanks for the reponses guys - now I just have to decide if I'm ready to re-learn how to code or not!
Neil - Mon Aug 11, 2003 9:01 am
Post subject:
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 - Mon Aug 11, 2003 10:31 am
Post subject:
Quote:
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 - Mon Aug 11, 2003 11:07 am
Post subject:
Neil wrote:
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? Shocked 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. Laughing

Shakespeare had it right about what to do with lawyers. Twisted Evil
brntcrsp - Fri Aug 15, 2003 5:03 am
Post subject:
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 Smile 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 - Wed Sep 10, 2003 11:19 am
Post subject:
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:
Code:
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:

Code:
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'):
Code:
StringCollection testCollection = new StringCollection();


But if I put in the whole class, it works just fine:
Code:
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 - Wed Sep 10, 2003 11:34 am
Post subject:
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 - Wed Sep 10, 2003 1:12 pm
Post subject:
Robert,

Thanks for the quick response - here goes:

From my Weather app (to duplicate the app from the presentation)
Code:
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 - Wed Sep 10, 2003 1:51 pm
Post subject:
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
Code:
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.
All times are GMT - 6 Hours
Powered by phpBB 2.0.21 © 2001 phpBB Group