| Comments

the update for visual studio on windows vista is now available.  dubbed "VS2005 SP1 Update for Vista" is available for download on the microsoft.com downloads site.

here's the kb article with the release notes: KB929470

here's the download of the bits: VS2005 SP1 Update for Vista

note: you must first have VS2005 SP1 installed to run this.

| Comments

thanks to all who attended my on creating mash-ups with php on windows and using microsoft web api's.  whew, that was a mouthful.  anyway, i said i'd post the sample code i used, so here it is (at the end of this post).  in the zip file there is an index.php file describing the APIs used.  I stripped out my personal application id's from some of the services, so you'll have to obtain your own.

there are plenty of other sessions going on the site so i'd encourage you to take a look at them and register.  also, the previous sessions are available on-demand for your viewing as well.  whenever you complete one, please be sure to complete the evaluation for a chance to win some more swag and give the organizers valuable feedback.

to recap, here are some of the things we used/demonstrated:

  • flickr
  • virtual earth
  • live.com search
  • microsoft ajax on php

there is, of course, more things you can do than mapping, etc. but with limited time i wanted to show some of the more simple ones.  be sure to check out for more APIs you can use (for example, the Amazon services are a cool one).

also, the tool i was using to write PHP within visual studio was from .  it's a great little add-in.

at we'll be showing some other mashup technologies (http://www.visitmix.com/about/) from microsoft, so if you aren't registered, consider going to ...it will be a great time and conference...and each attendee will get windows vista ultimate as well!

File: PHP Mash-up Samples

| Comments

do you ever wonder how some of the extensions or send down their javascript code that it handles?  have you ever sat back and said, "wait a minute, i'm not adding any scripts here"?  well, if you haven't, then move along, there is nothing to see here.

but if you have, read along.  i know i have as i think i've always taken for granted the feature of how this is being accomplished in both the ajax tools as well as some things that asp.net 2.0 uses as well...so let's see what's going on here.

if you have no idea what i'm talking about, basically load up an page and look at the source, you'll see something like this:

<script src="/ScriptResource/ScriptResource.axd?d=cOVC9K4WK3DoOci8poj2gEx1D9Jpq5e-
CDzM9iI5MnC_Np0FZ18zKVPkePoP4dKJialk3-zN1Xx4RObWPIm4zQ151W6jZBuzAtVU4VaRyxM1&amp;
t=633051597837658400" type="text/javascript"></script>


keep adding some controls, toolkit controls, etc. and you'll see more web resource references pushing down javascript.  if you use a tool like fiddler or web development helper, you'll see that this request results in javascript being pushed down to the browser.  so how do you do this in your own assemblies?

first, why would you want to do this?  well, good question -- i don't think you'd want to do this for everything, but i think it is a good idea for reusable components...and i think we'll see this trend more and more from component vendors -- it reduces the installation woes for some of the client-side script deployment.

anyhow, i'm babbling...here's the goods.

first, have your javascript file (my example here has a single function SayHello() that throws an alert('hello world')) as a part of your class library for your control/component.  change the build action from "content" to "embedded resource" in the properties of the .js file.  what this will do is essentially, well, make it an embedded resource.

sshot-11

after that go into your class file that would render your control/component or wherever you'll want the embedded script to "reside."  the easiest thing here is to add this to your code:

   1:  [assembly: System.Web.UI.WebResource("ScriptResourceClass.HelloWorld.js", "text/javascript")]
   2:   
   3:  namespace ScriptResourceClass
   4:  {
   5:      public class Class1
   6:      {
   7:          public string SayHelloServer()
   8:          {
   9:              return "Hello World from server";
  10:          }
  11:      }
  12:  }


once that is there (you may have to add a reference to System.Web.dll) then you are ready to go.  now consuming (or should i say exposing) this is VERY simple using asp.net ajax and the wonderful do-all-the-heavy-lifting-management-for-me scriptmanager component.  in our page where we want to consume this and add a script reference to the scriptmanager like this:

   1:  <asp:ScriptManager ID="ScriptManager1" runat="server">
   2:      <Scripts>
   3:          <asp:ScriptReference Assembly="ScriptResourceClass" 
   4:          Name="ScriptResourceClass.HelloWorld.js" IgnoreScriptPath="true" />
   5:      </Scripts>
   6:  </asp:ScriptManager>


when rendered you'll see some line that looks like this:

<script src="/ScriptResource/WebResource.axd?d=jiqWbcneAVORXcafmWglIA2&amp;t=632968784944906146" 
type="text/javascript"></script>


i'm not going to pretend that i know what/how the webresource.axd url is generated and formatted, but i trust it is something super cool and important.  note you aren't limited to using scripts for embedded resource...you can just as easily put a dependent image into this format and have your control reference it in the image path using WebResource("name") and then it will get it from the embedded resource.  once this webresource.axd url is there, now my SayHello() function from *script* works fine when called from anywhere.

so what if you don't use asp.net ajax?  well, shame on you then.  but seriously, you can still accomplish this, but you just have to write a bit more code in your control rendering to retrieve the resource and ensure it is registered on the page.  you can use something like the Page.ClientScript.GetWebResourceUrl function.

| Comments

i've been participating in some online learning offerings that microsoft has going on with regard to web development.  i've been doing some of the PHP webcasts recently, but there are a bunch of other topics to choose from such as:

  • Expression Web tutorial
  • ASPNET Configuration and health monitoring
  • Interop with PHP and Windows
  • Using the Microsoft AJAX library in PHP
  • Mash-it-up with PHP
  • Discover "Orcas"
  • ASP.NET for STRUTS developers

check those sessions out and register here.

| Comments

i was just sitting on a plane with simon back from redmond where i was doing some mobility developer "stuff" and simon was at some top secret, could-tell-you-but-i'd-have-to-kill-you type things.  we were chatting about, well, you know geek stuff.  i was droning on about some vista stuff and he was talking about the smart stuff he works on.

it reminded me about their (them being interface, who simon is one of the 'fellows' -- well if he isn't they should institute some plan) ajax training.  he put together some great content on asp.net ajax in a self-paced DVD format and even had it updated for the v1 RTW version.  so it is a complete training offering on DVD for $99 (well $102 including shipping).  take a look if you are in the market for the training...it's nominal cost for some good, self-paced learnings on asp.net ajax and some of the controls.