Wednesday, August 23, 2006

Tee time collusion!

I joined a country club a couple months ago so I wouldn't have to scrounge for coupons, could walk on any time I want, could get a group of guys to play with, etc., etc.

Now, basically on the weekends, you have to call at 7am on Tuesdays and Wednesdays to get a tee time for Saturday and Sundays. I've called at exactly 7am and got "9:56 is open." What the hell? I called at 7 and already 10 people have gotten tee times?

I think next Monday afternoon, I'm going to go down there and look at the tee sheet for the next Saturday and see if any names are already down, because this is BS.

VS.NET 2k5 sucks.

That is all.



Well maybe not.

VS.NET 2k5 is obviously a half baked product that shouldn't have made it out the door.
  • It's really slow. Like it takes forever to open. Forever to open a project.
  • The Report Designer for reporting services 2k5 has a very heinous bug that requires you to hand edit the xml to remove whitespace or VS.NET crashes when you try and preview the report.
  • The new Web Projects are retarded!

I was really comfortable with VS.NET 2k3 (with Resharper of course) and when I started to use VS.NET 2k5, I really felt like it was a step back. There is *nothing* in the new interface that I really like or that I felt was value added. (this is not true for some of the language additions, but the IDE is really poor).

That is all -- for now.

Ajax to Web Services -- Why?

I get an email at least once a month that goes like this:

"I'm calling a web service from javascript and.."

Now, don't get me wrong. Web services are cool. Javascript is cool. AJAX is cool. A request to a SOAP web service using javascript? Probably not your best bet.

Why? SOAP. SOAP is great and all, but without some fancy javascript toolkit, you get to handle all the soap enveloping and namespaces in your javascript -- which isn't fun at all. Also, as most people have figured out, javascript xml methods are different in IE and Mozilla browsers, so you have to deal with that too.

What do I recommend to these other guys?

I always recommend that you make an asp.net (or php or whatever your language of choice is) page and have it do the heavy lifting for you. There's a buch of benefits in doing this:
  • better error handling
  • better debugging
  • better user experience (too much AJAX = slow browser -- see gmail and windows live mail)
  • no cross site scripting issues
  • better configuration (e.g. service urls)
  • easier maintenance
  • looser coupling between your UI and the service (good!)

So, what does the asp.net page return you?

Three (well four) options:

  • Plain text (e.g. "ERROR", "OK", "option1~option2~option3") -- clear out the default HTML on the page first of course
  • XML (change the response type to text/xml and pump out xml) -- again, clear out the default HTML on the page first
  • HTML -- this is especially useful for non-paging, non-sortable grids.
  • JSON (this is a fourth option that I really haven't used, but a colleague is and likes it)

In any case, by calling an intermediate asp.net/php/etc. page that's part of the current solution (or in an unmanaged path in SharePoint), you get a lot of benefit with a small performance hit (but really not as bad as it could be!).

So stop calling SOAP web services from javascript. It's a pain and there are better options out there.