| Comments

Ok I’ve seen all the announcements and read all the buzz.  I know some folks on the team as well and had heard all their raving about their offering.  It wasn’t until today where I really realized what was going on.  In fact I was thinking about titling this post: WordPress installed and configured in under 5 minutes, but it’s much more than just that.

Introducing: Web Platform Installer 2.

The team at Microsoft has been working hard to make getting your web platform (server and client) up and running quickly and taking any pain out of the process.  In one click you can have Visual Studio and Silverlight Tools installed, IIS7 configured, Smooth Streaming enabled, etc.

But it’s much more than just that.  You see the team partnered with the community and popular Open Source projects to provide much more than just Microsoft offerings.  Earlier today I wanted to check out WordPress templates in more detail and wanted them on my own server.  Let me set the stage for you.  My server is Windows 2003, IIS6, and has no SQL Server installed.  That’s it…a bare web vanilla front end.  I fired up WebPI (as it is affectionately known) and look what you see:

Web Platform Installer Applications

That’s right, WordPress as an offering.  No, not some hacked “run as .NET” version of WordPress.  The real deal from the WordPress project site…Microsoft hosts nothing but a simple manifest describing the project.  I selected WordPress and the tool knew what was missing from my environment: MySQL, PHP, FastCGI, etc. 

WordPress Install dependencies

I clicked “install” and literally in about less than 10 minutes I was running WordPress.  I’m not saying “installed” or downloaded.  In fact most of the time of that 10 minutes was from downloading the various bits.  When the “You’re finished” message came up, I had a working WordPress site, configured to MySQL, configured with a content database, etc.  I had to do nothing to configure my MySQL settings, I had to do nothing to my get PHP running on my site…WebPI did it all for me.  It was totally friction free.

It’s not just WordPress either.  Drupal, Umbraco, DasBlog, Subtext, ScrewTurn Wiki, etc.  And you can put your app there as well.  It really is a great resource not only for server components but also for client web platform stuff like I mentioned previously for Visual Studio and Silverlight developer tools.

Great job to this team and you all should definitely check it out.  They really did a good job.  My server didn’t get screwed up at all and everything “just worked.”  I think this installs WordPress faster than WordPress instructions! :-)

| Comments

recently i came across a feed entitled '.aspx considered harmful' and natural i paused.  for those who don't know .aspx is a known file extension for web pages generally using asp.net technology.  i think the title was a little misleading but it did the job -- got me to read it :-)

john had made a suggestion in conversation that a blog engine (must have been the topic of conversation) shouldn't produce urls that end in .aspx.  basically, in a nutshell john is pointing out that technology changes and while you might be .aspx one day you might be .php the next.  valid point.  where i think his argument breaks down for me is in the two reasons he points out why this is 'harmful': futureproofing and style.


let me take on futureproofing first.  john's assertion is:

"The technology that produces the name, never mind the version of that technology, is a variable that need not, and should not, be exposed. If links are pointing to foo.asp, and your upgraded blog engine produces foo.aspx, you broke those links. That’s unnecessary and avoidable."

for me that is a pretty big leap.  aside from the fact it puts a lot of weight on the technology implementers to forever future-proof their technologies (web ones being in question here).  i'm definitely not disagreeing that you need to do your best effort to future-proof information...that is what makes internet information so valuable...it's longevity.  i disagree with the assertion that file extensions are the cause of problems -- it is more like sloppy editors.  the point here is to respect the permalink.  i'm in the camp of 'who cares' when it comes to file extensions.  if an author of content is moving from one platform to another, it is their responsibility to respect the permalink to the information.  i may have bookmarks, etc. that i rely on.  don't 404 me bro!  john does point out that the new asp.net mvc pattern can help things like this for eliminating .aspx in the url.  i guess i'd be quick to point out that it doesn't solve the problem at all posed in the futureproofing note.  so now i have 'clean' urls...great, what if i now move to a framework that doesn't support mvc/rest-esque url patterns?  i'm just as screwed.  i'll say it again, respect the permalink

i'll take an example from one of my colleagues.  dave bost hosted his blog on an asp.net technology for a long time.  he built up a lot of those harmful .aspx things over time.  when dave decided to learn some new technologies, he decided to move to a php-based blog engine.  wow, those dangerous .aspx are going to leave some nasty end trails moving to php.  or not.  you see, this would be more of a move from an older microsoft technology to a newer one.  this is moving from microsoft to non-microsoft.  what would he do?  dave knew he had to respect the archive he had.  so users who may have bookmarked a url to http://davebost.com/blog/archive/2007/06/14/Gadgets-and-Snipping-Tool.aspx will not have lost the information.  see dave.  see dave respect the permalink.  thanks dave.  if you click that link above you'll notice that you'll end up at http://davebost.com/blog/2007/06/14/gadgets-and-snipping-tool which is the current url.  having .aspx wasn't harmful because the author of the content was responsible to ensure that permalink wasn't lost.  now i'm not saying it was drop-dead simple, in fact i don't know how dave decided to do it, but he did.  his readers (and search engine archives) will not be lost because he moved to a different technology.  it didn't matter what the endpoint extension of the url was.  didn't matter at all.


on the context of style, john writes:

"Names without extensions are cleaner and simpler. Why does that matter? I guess if you think of URLs as constructs generated by machines for machines, then it doesn’t, because machines don’t care about style. But I believe that even when they’re machine-generated, URLs are for people too. We read, cite, and exchange them. Their structure and content conveys meaning in ways that warrant thoughtful analysis. Elements that don’t convey meaning, and that detract from clarity, should be omitted."

again, here i'll disagree (of course, or what is the point on writing this post).  whenever i see comments like these i always slow down and defer to the mother-in-law factor.  you see, we in technology have a tendency to think that things must make sense.  users generally don't care.  they want things to work.  when they bookmark things they want them to be there.  when they search, they want to find.  etc.  with regard to style, i think it seems a bit nitpicky.  for me content is king.  why should i care what the url is as long as the content i'm looking for/reading/consuming somehow is valid to me.  does it make it less valid because the url looks technical?  look at facebook.  my profile page is http://www.facebook.com/profile.php?id=584375671.  sure, that url does nothing to tell me what profile i'm about to see.  it would be cool, i guess, to see http://www.facebook.com/profile/timheuer, but i don't really care.  you see i can easily ensure my content says view my facebook profile.  there, do you see the url muck?  no, you see a hyperlink to something that i've described.  and when you click it you know what you are getting...so who cares about the url?

john's note about 'elements that don't convey meaning, and that detract from clarity, should be omitted' is something i disagree with.  to *something* they have meaning.  look at yahoo.  this url http://news.yahoo.com/s/ap/20080118/ap_on_go_pr_wh/economy_stimulus goes to an article about president bush and some tax stuff.  should the url have been http://news.yahoo.com/Bush-wants-fast-tax-aid-to-boost-economy?  who knows.  i'm sure there is a content management system behind their solution that is at 'fault' for creating the url.  whatever the reason, i don't care -- the content is king.  i can see somewhat john's point that we can't always blame technology like i just did.  sure a content management system should be able to let me name whatever i want.  but i guess that is a technologist thinking again and not my mother-in-law...she just wants to read the article.

another piece of evidence to this is a commenter on john's blog:

"If I see a file of the form http://example.com/path/to/file.rss I expect the result to be an RSS feed." source

wow!?  i think i'm going to ask my dad tonight if he knows what .rss is.  that is a technologist thinking if i ever saw one.  another commenter notes that urls are brands:

"Absolutely. URLs are brands, permanently on display for every webpage. The user wants to know what the page is about, not what technology you’ve used to put it together." source

i agree with the first statement here.  it is why i blog on timheuer.com and not blogs.msdn.com -- this is my brand.  i would argue 'root brand' is important here.  the user wants to know *where* they are reading the information.  they will remember their own context of the content.  i'll take the yahoo link above as an example.  having news.yahoo.com is critical because it is their brand and reminds me of where it is.  but i won't take the time to really record the rest of the url.  i'll either bookmark it for later if it is interesting or in passing i'll mention to someone 'i read an article on yahoo about bush and tax aid, you should search for it.'  that is how we talk now.  'just google it' is a common phrase.  we use things like tinyurl, shrinkster, etc. to shorten urls for us to make them easier to send. 

urls aren't the only place where this is.  would john suggest that we do away with .exe, .app? 

you see to me, the technology isn't harmful.  the style of implementing human readable urls isn't harmful (or sometimes isn't even helpful), but respecting the permalink is critical...no matter what technology is used.  it matters not what the address bar says, but rather that i can find it when i search for it and when i save a reference to it.

| Comments

while i'm off galavanting in the aspen trees, some of my counterparts are up in san francisco attending zendcon, a php conference.

some updates on some news that microsoft is announcing at zendcon...

    • FastCGI for PHP -- this was a collaborative project between zend and microsoft to build a better fastcgi implementation for windows.  announced today will be that zend will be redistributing FastCGI in Zend Core.  additionally, zend will make sure that FastCGI is supported in the server core installation option for windows server 2008!
    • zend and microsoft partnered again to provide a component for the zend framework for php developers/apps to make use of supporting information cards for identity integration.
    • finally, microsoft is making available a first preview build of a sql server 2005 driver for php.  this is designed to enable php developers to have a reliable and scalable driver for sql server.

so php developers, what do you think?

| Comments

i saw a post over in russell myers' land seemingly acknowledging the confusion that might be out there of hosting .  he noted my previous post about the topic.  in his note though, russell mentions:

...it seems entirely possible to take a Silverlight application and integrate it on an existing Apache server to create a Silverlight experience within PHP or any other language that can embed the XAML content.

he's right on here, in fact, i'm not sure even samples will do it justice, but i tried anyway :-).  take for example another quick swag sample using flickr.  how can i use flickr services via php, get some images and display them in a silverlight application?  simple.

first, let me stress again 2 things: i'm not a php developer (so be kind on my code) and i'm not saying this is the end-all-be-all of samples...just merely making a point.

in this example my goal is to have a form that accepts user input, which in turn does a tag search on flickr for some images using their REST api's via PHP.  those images are then referenced in a silverlight control that creates a simple little control displaying the image and then for completely gratuitous reasons adds a web 2.0 reflection on the bottom of them :-).

here's what we are doing...first, the php application.  now, in my sample here that i'll provide a link to (btw, i'm using a free host that appears to be having issues, so unless someone can point me to a free, reliable PHP host that is what i'm stuck with) we are using flickr's REST apis.  i'm using a pre-packaged PHP library for flickr called phpFlickr oddly enough.

step one is creating the php interaction (did i already say i wasn't a php developer?).  here's my basic code:

<?phprequire_once("phpFlickr/phpFlickr.php"); $flickr = new phpFlickr("YOUR API KEY HERE"); $i = 0; $tagName = $_POST["flickrTag"];if ($tagName == "") { $tagName = "silverlight"; } $photos = $flickr->photos_search(array("tags"=>$tagName, "tag_mode"=>"any", "per_page"=>"6", "page"=>"1")); ?><script type="text/javascript"> <?foreach($photos["photo"] as $photo) { $purl = $flickr->buildPhotoUrl($photo, "Square"); echo "photoArray.push(\"$purl\");"; } ?></script>

so we are essentially calling out to flickr and getting a search result back.  now when you look at the foreach loop here's where you'll see the silverlight 'integration' part 1.  in another javascript file i have declared a global javascript array called photoArray.  in my loop here, i'm essentially building out the URL to the flickr photo and then jamming that into the array object.

once the content i need to manipulate for silverlight is in my javascript (or .NET code for v1.1) objects, they are on the client.  read: no more server stuff... so really in this sample and others, PHP is simply providing some data, whether directly itself emitting XAML that will be consumed (as in this screencast), or providing data for the client to iterate through and create XAML elements on the fly in my sample here.  in my example, with this new photoArray i'm instantiating a simple little control i had added (this is the ThumbnailImage.xaml file in the download) -- essentially a pre-build glob of XAML representing my end result. 

i iterate through the array and create those elements:

for (var i=0; i < photoArray.length; i++) { var rimg = this.control.content.createFromXaml(xamlFrag, true); this.root.children.add(rimg); new PhpFlickr.Thumbnail(this.control, rimg, photoArray[i], left, top); left += 80; }

the PhpFlickr.Thumbnail object is a javascript prototype class that sets the canvas' inner elements to the image reference.  you can learn about creating these little user controls for silverlight here (v1) and here (v1.1):

PhpFlickr.Thumbnail = function(control, target, imageSource, x, y) { this.target = target; this.thumb_image = target.findName("Thumbnail"); this.thumb_reflex = target.findName("ThumbnailReflect"); this.thumb_image.Source = imageSource; this.thumb_reflex.Source = imageSource; this.target["Canvas.Top"] = y; this.target["Canvas.Left"] = x; }

the end result of this sample looks something like this:

so as you can see, very little php code happening here...and that is kind of the point!  yes, silverlight can be served up via any web server, and yes, silverlight can be used with any technology.  again, my sample may not resonate to "get it" for you, but hopefully you will see the point that the interaction is on the client.  so if you have php web services, great, silverlight can use them.  if you want php to dynamically generate xaml and deliver it to the silverlight control, yes that can be done.

the sample is online here (again, shared/free host so don't hate me if it isn't up/working), and the sample code is below at the end of this post.  i hope this helps clear some things up again, if not, please let me know.

Sample Code: SilverPhp.zip

| Comments

okay, now in a session for php developers -- or maybe rails developers...don't know yet.

this session is from simon minnee from silverstripe, a cms solution provider.  simon quickly adds this disclaimer:

this presentation is not intended to be a language war.  he admits that he is a novice with regard to Rails versus what he's presenting, etc.  de admits, in fact, that his understanding is naive.  he says "i just thought the title would be edgy.  forgive me."

hmm...clever simon, clever -- got me in the door.

he talks about their choice using PHP over Rails:

gets the job doneproductive framework with lots of cool stuff
language people love to hatevery trendy
variety of hosting optionsharder to host
good NZ gov't acceptancetoo new for gov't

simon talks first about the use of the PHP5 __call() method...essentially enabling the creation of 'magic methods' that are implicitly defined.  i'm not really getting this as i can't read the code from afar and he's covering it pretty fast.  apparently the decks are available at http://silverstripe.com/rails-envy

now we're talking aggregation -- adding versioning to DataObject (as an example -- admittedly criminally oversimplified).

okay, 20 minutes later and he's done with his talk...um, wow.  no envy elimination here.  simon mentioned some stuff with defineMethods functions that i think if i had a deeper understanding of the benefits...i'm not sure this session did a service to other merits of PHP5.