Tech Blog

Jay's Technical blog

Correction...

31 May 2007
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

[I can't believe I'm writing this post and taking on (somewhat) who I'm taking on... But this needs to be said publicly.]

If you haven't read all the buzz... go here and read Sam's thoughts on Martin's Microsoft article.  While your at it read the crappy stuff (IMO) that MS is doing to Jamie.

Ok, I think that's all the link outs.  Before I go any further I have to say that there are some things being said that I absolutely agree... MS Legal has been scaring me more and more by their tactics.  By no means am I ignoring what they are doing...

That said I saw something in Sam's comments that I have to take issue with...

All of my peers on theruntime.com and the "Agile .NET" community have already moved onto Castle/Windsor, NUNit, NAnt, MonoRail, Spring.NET, NHibernate, etc instead of Microsoft solutions. Its virtually over already.

In case you don't see what's so wrong about this... I figure that Sam is referring to his fellow CodeBetter agilists Jeremy, Scott, Jeffrey, etc., but it also could mean that he's speaking for all of us.  He's not.  I love ASP.NET even though it is considered "a leaky abstraction" by some... mainly because one can't do TDD with it (a practice that has NEVER given me personally the ROI... although I'm about to try again with MBUnit... so don't flame me).

Honestly while I understand the whole MVC pattern and why everyone is all gaga... it's not always necessary to go to that extreme.  My understanding has been that MVC is great for web sites that have high traffic... what does that mean?  Honestly I have to say that I don't know what that really means.

Let me put up something in regards to the superior MVC architecture.  The last company I worked for (TechData which was oftentimes called the "evil corporation") is (or at least was) the second or third largest e-commerce site in the world... it just happens to be b2b (which is why you probably never heard of it).  What did we use for this?  ASP.NET and remoting... and by ASP.NET I don't mean monorails or any other MVC-based architecture.  Am I saying their architecture is/was perfect?  By no means!  I could probably give a number of the DailyWTF entries based on examples from this site (and this is probably true of a number of high volume sites unless the architects were able to predict the usage accurately).

I've looked at Spring and it mainly fits into my thoughts on IOC (I know it does more, but I never got passed the IOC).  I still feel that IOC's are overkill unless you are trying to do TDD (then it makes perfect sense because it alleviates some of the pains of testing). 

I actually have a little more with Castle's ActiveRecord used with NHIbernate (I would never use NHibernate without some kind of wrapper as I really don't want to write that much code/XML... I'd rather use something like SubSonic any day).

I have used Nant... I won't say anything good or bad about it.  I see it's power, but have also felt the pain of editing long build scripts....

-------------------------------

I know I'll probably be labeled a Mort (for the tirade above) even though I've just entered my 15th year in the field as a professional developer.  I have seen all kinds of things... I've tried all kinds of program techniques too... I weigh new techniques/technologies based on ROI.  If it buys me something (faster dev time, better code in the same amount of time, better performance, etc.) then I'm all over it, if it doesn't seem to have the cost-benefit or has too many issues to do in a sane fashion I'll skip it...

As far as OSS stuff goes, I use Open Source tools, but am cautious about the licenses on the libraries I use... which is really the issue... It's GPL versus commercial... (and not free versus commercial). There's danger with GPL something that MS is trying to avoid... It's understandable for them to be that way within their own products.  In Jamie's case I really wish they would come up with an arrangement that consoles the lawyers and let's him continue on... he's really helping MS out (which is really the big point they are missing). 

Sometimes I wonder if the hoopla is that MS can't/won't say something like... "we've been watching the whole ROR... and we like it... we like it enough to copy and attempt to improve it (in our MS Proprietary way)."

If there's anything to remember... when Sam seems to speak for everyone at CodeBetter, he's not really speaking for everyone... sorry if I stepped on some toes with this post.  I've just been frustrated with the "this is the best way to do this... believe me" attitudes that seem to float around in the blogosphere (or the view that if it OSS then it is therefore better)

[tags: Microsoft, Dev Philosophy]


Day of Ajax on June 20, 2007... Free MS Training in Tampa!

24 May 2007
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

As you may or may not be aware, I spoke at the Orlando CodeCamp a couple months ago.  After which I went to the "meet and greet" where Joe Healy and I talked about a bunch of stuff.  Most notably was this idea I had about doing an Ajax conference.  The end result was Day of Ajax on June 20th at the MS Offices in Tampa.

Joe Healy, Jim Zimmerman, and I will all be presenting. 

Joe will do an intro to MS Ajax and will follow up later with a talk on Orcas' JavaScript integration.

Jim will do his talk on writing MS Ajax components (extenders, behaviors, controls, etc.)

I'm down for "best practices" which is a title I hate, but there's not a better title (I think that Ajax desciplines in some respects are too new to have "best practices" attached to them).  As an I'm also going to slip in a couple mini demos/talks to show off some less demoed features in MS Ajax.

You can sign up here.

[tags: MS Ajax Extension, ASP.NET, training, Ajax]


Safari: A Modern Browser

08 May 2007
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Ok, this is one of my ranting posts.  It's been a bit since I ragged on Safari.  The main reason I feel the need to do so is:

1) the assinine Mac commercials that make out like the Mac and its software are superior to anything else

2) an article I read on Ajaxian months ago where developers were invited to comment on Safari... after about a dozen or so developers (who think like me) had commented... then the Mac-faithful descended and glowingly declared that Safari was at least on par...

[Despite the rant, if you got a solution I would love to hear it]

So I just finished working on a new Ajax Behavior called LayoutSpanBehavior (in MS Ajax).  It simply lets you define a group of divs/spans/table cells as able to work together to render text to the screen.  The moment one HTML Element overflows then the next one takes over.  The way they operate together is pretty cool... So nothing needs to be contiguous and you can create some freaky looking layouts if you want (and the browser figures out where to break up the text).

My initial version uses the "watch/unwatch" on HTML statements (Mozilla-based) and the onpropertychanged event (IE) to monitor the innerHTML, and innerText properties of all the elements for changes and then takes the new text and lays it out across all the elements in your layout (it's very cool!)

So since my client is a Mac guy I decided I had better try this in Safari <sigh />.

Where do I begin... Ok, neither the watch/unwatch nor the onpropertychanged events exist, and there is no alternative that I can find (since Apple in their infinite wisdom doesn't publish a javascript reference to their browser... they refer you to a JavaScript 1.2 reference and then tell you that they implement parts of JavaScript 1.3.  I just want to know what I can do in your %^&**&^ (simulated swearing) browser, so I can work around the issues.

To solve this I create a new method on all the elements called set_text.  This works, but I'd rather let the user be able to work without having to remember anything (and if Safari is not necessary then you are set).

Now if that weren't bad enough.  My original examples used a table with the CSS table-layout set to fixed, and an L shaped text region (with an extra cell marked with the text IMG to simulate an image here).  All cells have heights and widths applied to them (which means that they should hold the supplied height/width regardless of the actual content). 

The moment text gets written to the upper left hand cell, the "IMG" cell shifts and it occupies about half the space of the left upper hand cell (BTW, the "IMG" cell should the the right upper hand).  When I turn on borders it shows that the position where everything should be... but Safari insists on rendering this strangely. 

I ended up switching to a div-based example (but the original layout is still in the original example and will continue to be when this gets released... it's available in the source for the codeplex DTAjax project).

But let's go back to the Table problem.  If I were a betting man I would say the problem is the table-layout style (which is, BTW, required by IE and Mozilla).  Even if this were the case there is no reason for Safari to render something this poorly.  This is not alternate formatting... this is incorrect.  Tables have been around for a while now... So why does Safari rend this way when no other browser does?

Easy... When the Apple Engineers started with Konqueror (which uses the Mozilla render engine), they decided that for some reason they didn't like the rendering engine for Tables... so they rewrote it (and now it's better because Apple built it).

Now, mind you, Safari has a number of nice debugging features (none of which are on the top of favorite web-based debugging tools...), but the standards of the browser are poor... actually I would say that Safari is on par at least with the 5.0 browsers (that would be Mozilla FireFox 0.5-0.8 and IE 5/5.5).  I come up with 5.0 because it's better than any of the 4.0 browsers (just barely).

That said, IE 5/5.5 was a long time ago... we are now 2 iterations of browser beyond this.  And, we are not talking about emerging technology here.  When IE 2 was going head to head with NS 2, IE was really just a version behind... IE3 and NS3 were a lot closer together (feature-wise NS was still ahead, but the browsers were closer in what they were enabling).

Raise your hands if who would like to build web apps that support NS4 and the more recent browsers?  No one?!!?  What's wrong with you?  NS4 is/was a widely used browser!  How about IE4?  (I see a few of you)...

<My final shot across the bow /> Hey Apple!  The name of the object is XMLHttp!  It's an industry standard at this point.  Why don't you support the XML part of that equation?

[tags: Safari, Mac, Mac Love, Safari Love, Ajax, Browser Rendering]


I can't wait until Orcas' Javascript Intellisense &amp;quot;arrives&amp;quot;

06 May 2007
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Ok, so I have been building some stuff with Orcas' JavaScript editor (in beta 1) and I'm sorry to say I'm going back to Aptana Javascript IDE for now.

I have read much of the info on it and from working with it it is nearly there, but either the way I'm writing my code doesn't get translated proeprly (Aptana isn't perfect either, but it gets closer).

I have intellisense in my JS files which is nice, but when I do something like this:

myClass = function()
{
   // Constructor code
}

myClass.prototype = {
  method1 : function() {
     // No intellisense here
  }
}

Maybe, I shouldn't constuct classes like this, but Aptana recognizes this syntax and has no problems with it... I haven't tried to write any code in my web pages yet after using this syntax (I believe it's fine)...

BTW, before Scott Gu or anyone else jumps in to comment.  I know that Orcas' editor will get there.  It's just not there for me.

Another issue I have with it is if I try to type this:

x = 0;

What shows up is:

XMLDOM = 0;

if I type:

var x = 0;

then it works... but I'm not 100% thrilled that I can't use "x" as a variable.  I know I should probably report this in a beta forum, but I hate newsgroups (I'm sorry). 

Beyond all this I really like it, but the above is annoying enough that I gotta use something else.

[tags: ASP.NET, MS Ajax Extensions, javascript, clientscript]


CodeCamp Tampa 2007: Ajax Challenge help us create the challenge...

06 May 2007
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

So I've had this cool idea, and I wanted to use it for my upcoming Day of Ajax, but we decided that there was already a full schedule, so we are postponing it until CodeCamp Tampa 2007.  BTW, the we = "Jim Zimmerman and I" (but we would be happy to include others).

Anyway, here's the basic concept : Jim and I will form a team of developers to try to accomplish some task with Ajax.  It may be 2 competing teams or it may be 1 team, but regardless the task has to be a challenge, but not so much of a challenge that it can't be done in a few hours.  My thought is that at the end of the day we will unveil our creation(s).

If we form 2 teams then we need to somehow vary the rules for each team.  Here's an idea that Jim came up with: one team must use free tools and the other (only) uses commercial tools. 

If we go with the competing team challenge, Jim and I will both want to use SubSonic for DAL (if there's a DB involved). BTW, V2 just shipped... 

Maybe Jim and I can try to whip up some controls (and it could be a control challenge)...   Honestly, I just want something fun.  Jim and I are really good with this Ajax stuff (in fact his book just got published), and I want to be able to put together a practical how we did it, etc.

[tags: Tampa CodeCamp, Ajax, ASP.NET]