CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jay Kimble -- The Dev Theologian

Philosophizing about the .Net religion

July 2007 - Posts

  • Why does Live.com search suck??!!

    Ok, I maybe violating a rule here, but I gotta say it (in fact this post is directed at a particular somebody at MS who has caused me to ponder Google's role in my life). 

    Tonight I'm trying to pull up 1 simple thing.  I want to download the VS 2008 beta 2 on my computer "at work" (which I am remoted into)... manually copying over the VPN will take entirely too long.

    I did a quick search from my home page on my box at work... the home page at work is msn.com... I guess you can see how much I've customized it.  I am using Live.com as a feed reader, so that's my home page on most of my boxes...

    Anyway, VS 2008 beta 2 just released last week and I'm wanting to get it installed as we are planning on using multi-targeting with our existing ASP.NET 2.0 app (but enough of that).

    I typed in "VS 2008 beta2 downloads" hit enter and up appear several 1 month old posts predicting when beta 2 will be available for download.  I add "Orcas" to that... mostly it's the same old posts.  I've tried a number of combinations... everything ends up nowhere.

    So I go to the Evil Anti-Privacy empire (google.com), type in "VS 2008 beta2 download." And guess what the first link is?  You guessed it... the direct page on MSDN for the downloads of the VS 2008 betas 2 bits.

    I'm not one to bite the hand that (sort of) feeds me, but come on!!??  The best search engine for MS' properties should be an MS Search Engine!!

  • MS Ajax JSP Tags v0.10 ... Now with an UpdatePanel

    I just thought I would announce an update to my JSP tags that target the MS Ajax client in JSP apps.

    The big announcement is that I have an UpdatePanel!  I'm not sure any of the other (non-.NET-based) libraries like this have an UpdatePanel.  I know that the ColdFusion one that targets .NET does have an UpdatePanel (but in my mind that's .NET code... but maybe I'm wrong).

    I also have an UpdatePanelProgress tag as well.  The promise is that with the way my UpdatePanel (not the standard MS one) is implemented I should be able to make many (if not all) of the other UpdatePanelProgress controls work.

    Anyway, I'll be bringing up my personal site sometime soon, and I plan on doing a lengthy article on how to build an UpdatePanel.

    One more thing, because I implemented these tags the way that I have it shouldn't be that hard to get them to work in other languages (do I hear ASP.NET 1.1 anyone?)

  • NE Ohio and Pittsburgh Area -- Available to Speak

    So I have a new contract going on right now.  This contract takes me to Canton, Ohio once a month.  I've found that flying into Pittsburgh is actually cheaper for me (and my client), so I'm also in that area (for a short time... I am a Browns fan) as well.

    Anyway, take a map and draw a line from Cleveland, Ohio to Canton, Ohio, and then to Pittsburgh.  If you run a .NET users group in any place near the line I had you draw, I would love to present to your users group.  I love to speak (even though I am way outside my comfort zone) and present and would love to find some speaking engagements in that area of the country.

    If you don't have a users group in your neck of the woods, but its within my range... why not consider starting one?  You can join INETA and the INETA guys will send you speakers occasionally, and I would be willing to speak as well... and I know of someone else on CodeBetter who lives there, and I may have a couple other friends I could kick into gear to speak...

    So why not?  It's a great thing to do.. you'll really upgrade the talent in your area and possibly raise the local rates, and I hear that MS will occasionally reward people for doing this type of thing.

  • Review: InCisif.net - web testing for the rest of us

    [I'll be making another post on this later, but I gotta talk about this one now... It's very cool!]

    Personally I have been looking for a set of testing tools that don't require a superhuman effort.  In particular I want to regression test a Web site's GUI. Since I do a lot of Ajax stuff these days, I have yet to find anything that fits the bill for what I need... Enter In InCisif.net.

    It's a testing suite that comes with browser recording capabilities that creates VB or C# unit testing code.  While most recording utilities do a decent job for traditional web sites, the problems start to arise when you try to test an Ajax site.

    I've looked at another tool similar to this one, but it came with no recording capabilities making the effort superhuman IMO.  You also have to put some mockups into your html code to help the testing suite.  No such issues here.

    You could probably write tests against gmail with this thing (it really doesn't care what the web site was written in and doesn't really have a requirement). 

    Recording Suite

    So here's what it does.  Recording is an overly simplistic description of their tool.  A better description would be a testing studio.  You browse the web site with the internally referenced (IE6 or IE7) web browser within a pane in the main window. 

    In the right hand sidebar see the source of the page as reported by the browser's DOM (so it's not the actual page source, it's the "resulting" source after all the current list of dynamically generated elements were applied to the source code.  You can actually right click elements in the DOM after setting up a sequence of clicks or keyboard presses and perform various actions against elements in the DOM (for instance, you can assert (test) that something exists or can cause a mouseclick on a dynamically generated element).

    Meanwhile in the bottom frame, you see your code as it is being recorded.  Once this is done you can simply copy the code into an InCisif.net test project in Visual Studio (or you can use it with the Vs2008 Test facilities, or with Nunit, or...)

    The test framework

    The author of InCisif.net seems to be very much aware of what is going on in other frameworks.  In fact he's borrowed a couple features from other frameworks like MbUnit's ability to create parameter driven tests, and it appears to be very similar to most xUnit test frameworks.  I can definitely see this tool used to create a set of web tests against a web site and then doing some checks against the database to make sure that records added were added, records updated were updated, etc (the flexibility to scrape data from the browser's html is definitely there). 

    To me it seems like the perfect tool for TAD (test after development)  unit testers (like me), or for apps where you need to scrape something from an HTML page.

  • .NET as an Alternative to JavaScript in the browser talk

    Ok, I think I missed announcing this.  I'm giving a talk on alternatives to writing JavaScript as the clientscript in the browser.

    The talk will center around 2 technologies (and be mostly demo-driven). 

    One of the two technologies, Script#, is available today and gives you a translator from C# to JavaScript.  So you can write C# and have well-written JavaScript produced for you behind the scenes.  The produced JavaScript will look very similar to the original C# code.

    The other technology is a future one, but no less cool (and if you read my blog, you know about it).  Silverlight can be used to manipulate the DOM (Html) Document in the browser.  Nearly everything that you can do with JavaScript you can do with C#, VB, Python, etc. via the Silverlight plugin running in the browser (albeit with a tiny bit of effort).  Come see how to do it!

    Oh, yeah if you missed the Day of Ajax, I'll be repeating my talk on Best Practices with MS Ajax.  I promise to have a better delivery this time (hopefully, I'll be awake... Kabza scheduled me for early morning... I am NOT a morning person)

    [tags: Tampa Bay Code Camp, Silverlight, Script#, ClientScript is yucky]

  • Better Practices with MS Ajax - Slides

    Ok, I finally had the time to post the slides and demo project from my session at the Day of Ajax in Tampa.  Sorry , it took so long.  I had a trip to Ohio and then some issues at home that have kept me a little busier than normal.

    Also, sorry for the technical glitches I encountered at Day of Ajax.  I'm not really sure what caused my machine to lock up (I know I blamed Safari, but that wasn't really the problem... FWIW, it was something that I uninstalled from my machine).  

    [I need to get better at dealing with my nerves when something throws me off my game. Sorry about that... I'm pretty embarassed about the situation...]

  • Review: SQL Assistant

    [I'm way overdue talking about this one... ]

    A couple weeks ago I was contacted by a company (SoftTree) because they have a product which is a competitor to the Redgate's SQL Prompt and RoundedPolygons SQLAssist (see this post by me). 

    Basically It does everything that both tools do, intellisense in your SQL tools and in Visual Studio. Like the original SQLPrompt (does version 3 do this), you can get SQL intellisense in all kinds of places... not just inside the standard SQL tools.

     Like SQLAssist it offers templates so you can type a few keystrokes and get code stubbed out for you. 

    What does it add?
    I was shocked when I tried this thing... First of all if you remember the old SQLPrompt was notoriously slow.  SQL Assistant is is very snappy.  I've noticed an occasional slow down (but the hardware I'm running this on is less than optimal). 

    Ok, so now this thing that blew me away.  It sports SQL vocabularies for T-SQL, PL-SQL (Oracle), DB2, and MySQL (I wish you guys had PGSQL --Postgres).  So if you find yourself using multiple database products this is the tool for you.  Obviously it hooks its way into all the necessary tools for these individual DB products. 

    I was looking at their web site and they have a plugin api that you can use to apply SQL intellisense to your own apps. 

    It's priced between the other 2 products at $149... It's hard to choose between this and Red Gate's package with SQL Prompt and SQL Refactor.

    The truth is I have a new favorite in the arena of SQL intellisense: SQL Assistant.

  • SQLXML: Selecting a column and the rest of the Data as XML

    So I was just tasked with fixing a routine in a trigger that was capturing the before/after data snapshots as XML.  The problem with the original code was that it wouldn't work with bulk updates. 

    So here's a snippet that I came up with to help me see how I could return a resultset from T-SQL (which could be fed into an insert) that contains a single column and then the all of the data as XML.  (NOTE: temp tables are used here simply for the use of example... they are not necessarily the best choice for good T_SQL development)

       1: SELECT *
       2: INTO #i
       3: FROM
       4: (
       5:     SELECT AccountID = 1, UserName = 'Fred'
       6:     union
       7:     SELECT AccountID = 2, UserName = 'Wilma'
       8:     union
       9:     SELECT AccountID = 3, UserName = 'Pebbles'
      10:     union
      11:     SELECT AccountID = 4, UserName = 'Barney'
      12:     union
      13:     SELECT AccountID = 5, UserName = 'Betty'
      14: ) i;
      15:  
      16: SELECT ii.AccountID AS MasterAccount, (SELECT ii.* FOR xml raw) AS xml
      17: FROM #i ii
      18:  
      19: DROP TABLE #i;

    The trick is this snippet -

       1: (SELECT ii.* FOR xml raw) AS xml

    Basically we are selecting all from the table's alias (which is really the individual row) and are putting it into XML...

    The resulting XML for AccountID=1 looks like this:

       1: <row AccountID="1" UserName="Fred"/>

     

    Since I haven't seen an example of this I thought the Google or Windows Live needed an article.

    Posted Jul 05 2007, 10:17 AM by Jay Kimble
    Filed under: , ,
  • Using the MS Ajax JS Client library from JSP pages..

    [In a rush to get this posted I forgot to mention the URL for the project... it's the same as my ASP.NET stuff (check the releases you'll find it).  The URL is http://www.codeplex.com/dtajax/

    In case you missed it (I think everyone either didn't notice it or didn't care... I'm not really sure which), I released my JSP Tag framework for using MS Ajax' Client Library with JSP.  Actually It's a combined release.  It has some of my stuff, some of the MS Ajax library stuff, and some of the Ajax Toolkit stuff (as well as a single control I like to test with which was originally written by Nikhil Kothari).

    So Why Java?
    Honestly, because I needed it.  I have learned the MS Ajax platform at a really low level and I really didn't want to trade off that knowledge to have to start over again. So... I built my own JSP tag framework (well, framework is a stretch).


    How does it work?
    Take a look at the Sample pages and you'll start to get an idea.  Basically you need a ScriptManagerJ tag on your page (there's also an early version of this called ScriptManagerB).  ScriptManagerJ takes some attributes for where the scripts are and it also has some attributes where you tell it what you want to enable.  Under the covers it goes out and figures which scripts are actually needed for the functionality you want.  It's not complicated... just a simple set of ifs determine what files are need to take care of all the dependencies.

    Then its a matter of using one of the other tags to wire up the functionality.  They work just like the ASP.NET extenders, so for instance the ACTktAlwaysVisible tag is the equivalent of the Ajax Control Toolkit's (ACTkt) AlwaysVisible extender.  You simple provide the targetControlID and any other pertinent info and the JavaScript code needed to activate the underlying behavior is wired up for you. 

    Right now all the easier stuff has been wired up.  Stuff like the CascadingDropDown will require a little more effort as there are underlying Server-Side components at work (but never fear, I have a plan already).


    What's coming?
    I don't know... how about an UpdatePanel?  I've got some good ideas on how to build one.  If I can get it working and get it integrated with the MS Ajax client library then that will open up a whole new class of controls.

    With what I am learning/have learned about the Client Library, I may (and I stress may) be able to make all this somewhat available in ASP.NET 1.1 or how about 1.0?  ASP would also be doable...  You see this is just the first step... there are more on the way.

  • My Silverlight conversion...

    So I was preparing to do my Ajax demos (which I need to get online) for the Day Of Ajax during Mix, when the Silverlight announcement hit.  I had been monitoring WPF/e and had noted that it had the potential to be my next platform. 

    Anyway, Healy and Zimmerman, both went nuts over it, so I took some time to assess it.  After a quick search of the docs I discovered that there were no form controls for it.  In other words, it was a way to create a nice looking UI (like Flash) but there were no controls for me to drop on a form and collect data from the user.  To me the business use of this was zero (zilch... nada). 

    So instead of embarrassing myself here on this blog, I sent the email back to Zimmerman and to Healy (and since Healy is a Dev Evangelist and Zimmerman is an MVP... maybe I missed something).  I simply asked them where the controls were.

    Zimmerman responded almost immediately... check out the Blend 2 beta... it has controls.  So after several hours playing with Blend 2, I discovered that low and behold... there are no form controls in Silverlight.  Healy confirmed this as well... the first version is really a lot like Flash, but the 1.1 will have a CLR (and right now it has no form controls).

    So I thought "well, I need to keep my finger on this one, but seriously, I'm unimpressed right now."  As you may be able to guess the name of this post is "My Silverlight conversion" and there was something that happened about a month later that changed everything.  I signed up to watch a WebCast on Silverlight given by Public Sector DevEvangelist

    I admit I lightly watched the webcast... it was on my desktop which has become my "other" machine.  When I heard the words, "now we're going to talk to the browser's DOM directly from Silverlight replacing JavaScript with C#" I was all ears.

    Let me repeat that for those that glossed over and missed it (and in bigger font).

    I heard the words

    "Now we're going to talk to the browser's DOM directly from Silverlight replacing JavaScript with C#. (And then debug it from Visual Studio!)"

    My reaction was "Holy crap!"  I immediately (while watching the demo) fired off an email to Healy and Zimmerman... it was something to the effect that Ajax was dead... long live Silverlight!"  I even posted a question asking when 1.1 was going to ship...

    Healy made me stay focused on MS Ajax for another month... I would have posted last week, but I was on site at a new client (in Ohio...) 

    So now I can say what I've wanted to say for over a month.

    This is HUUUUGGGGEEEEE!!!!!

    Basically we can write C# code into an invisible Silverlight applet and we now can eliminate gobs of Javascript code by using C#/Ruby/VBx/Python/etc. (in the Silverlight applet's "codebehind") instead.  On top of that, this effectively eliminates compatibility issues because your code is running in the applet which only offers methods that are available within Silverlight and the plugin is what does the translation... no more FireFox issues... no more Safari issues.. no more Opera issues... no more Konqueror issues... no more Lynx... uhh... ok, maybe not Lynx, but you get the idea.

    I'm done.  I can't wait until this ships, and then all JavaScript goes away (ok, maybe not ALL jJavaScript, but a large portion of it).

More Posts

This Blog

Syndication

News

CodeBetter.Com Home
Current Threat level
Terror Alert Level