September 2007 - Posts - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional Android Programming with Mono for Android for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.25 when you buy a copy.

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

September 2007 - Posts

  • College Football for September 29, 2007

    It was definitely Upset Saturday.  The upsets were:

    • Auburn over Florida.
    • Colorado over Oklahoma.
    • Kansas State over Texas.
    • Maryland over Rutgers.
    • South Florida over West Virginia (ok, that was Friday).
    • Georgia Tech over Clemson.

    These upsets all have the same feel to me.  Each of the losing teams had an over-rated feel to them.  The only ones that didn't feel hugely overrated were Florida and Clemson.  The rest were very much over-rated.  I wonder what will happen next weekend at LSU vs. Florida.

  • Windows Server 2008 RC0 and Vista SP1 Beta

    Nice, both builds are out.  Go on out to connect.microsoft.com and get the updated builds, assuming you are a subscriber and authorized to get the downloads.

  • History's Lessons

    One who does not learn history's lessons is destined to repeat them, however, it is hard to learn lessons until they become YOUR history.

  • How to reference a server control from client side Javascript

    Imagine that you have a text control like this:

    <asp:TextBox ID="txtName" runat="server />

    I see all kinds of examples that get the control valuelike this:

    document.forms[0].txtName
    ---or---
    document.getElementByID("txtName")

    While it might work in simple situations, it won't work all of the time.  How about this:

    document.forms[0].<%=txtName.ClientID%>
    ---or---
    document.getElementByID("<%=txtName.ClientID%>")

    by referencing the txtName.ClientID property, you get the client id of the control.  The reason this is important is that if the control is contained within another container, the name is mangled to generate a unique value, which is more than the simple name of the control.

     

  • Programming is NOT like Manufacturing

    I hear this analogy all the time.  I hear this from programmers/developers.  I hear it from customers.  No, No, No.  Developing a successful application is NOT like Manufacturing.  With manufacturing, the entire process is defined well upfront.  With application development, very little is defined upfront.  Application development is more like going through a legal process, such as going to court.  This is because very little is known upfront.  There will be many twists and turns of the application development process, just like going through the court system.

    If programming was so easy, there would not be such a high failure rate on projects.  The next time you hear this idiotic analogy from someone, tell them how wrong they truly are.

  • Visual Studio 2008 - Friday September 21, 2007

     

    Astoria

    I mentioned Astoria in the last post.  This really looks like it is something to look at.  The ability to expose complex data through an http interface is very compelling.  The doc that I pulled off of the site leads me to believe that they will promote the use of objects and entities.  I think that there is a good place for that, however, I openly wonder if they will make this too complicated.  Hopefully, that won't happen. 

  • ASP.NET Podcast Show #101 - ASP.NET AJAX Futures Data - Video and Audio

    Subscribe <-- What everyone should be doing.

    Download WMV <-- The old style way of doing it.

    Download MP4 for Ipod and Zune <-- ditto

    Download MP3 <-- ditto

    Original url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2007/09/21/asp-net-podcast-show-101-asp-net-ajax-futures-data.aspx

    Show Notes:

    Web.config additions:

    <system.web.extensions>

    <scripting>

    <webServices>

    <jsonSerialization>

    <converters>

    <add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>

    <add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/> <add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>

    </converters>

    Web Service Code

    using System;

    using System.Collections;

    using System.ComponentModel;

    using System.Data;

    using System.Linq;

    using System.Web;

    using System.Web.Script.Services;

    using System.Web.Services;

    using System.Web.Services.Protocols;

    using System.Xml.Linq;

    using Microsoft.Web.Preview.Services;

    /// <summary>

    /// Summary description for WebService

    /// </summary>

    [WebService(Namespace = "http://tempuri.org/")]

    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

    [ScriptService]

    public class WebService : DataService

    {

    public WebService()

    {

    //Uncomment the following line if using designed components

    //InitializeComponent();

    }

    [
    WebMethod]public string HelloWorld()

    {

    return "Hello World";

    }

    [WebMethod]

    [DataObjectMethod(DataObjectMethodType.Select)]public DataSet GetValues(int i)

    {

    DataSet ds = new DataSet();

    DataTable dt = new DataTable();

    DataRow dr;

    dt.Columns.Add(new DataColumn("Name"));dt.Columns.Add(new DataColumn("ID", Type.GetType("System.Int32")));

    dr = dt.NewRow();

    if (i % 2 == 0)

    {

    dr["Name"] = "Wally McClure";

    dr["ID"] = 1;

    }

    else

    {

    dr[
    "Name"] = "Paul Glavich";dr["ID"] = 2;

    }

    dt.Rows.Add(dr);

    ds.Tables.Add(dt);

    return (ds);

    }

    }

    JavaScript code:

    function pageLoad() {

    WebService.GetValues(1, OnCompletion);

    }

    function OnCompletion(results)

    {

    var dataOutput = "";

    var divOutput = $get("Output");

    var strReturn = "<br />";

    dataOutput = "Dataset: " + strReturn;

    for(m in results)

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "DataTable: " + strReturn;

    for(m in results.tables[0])

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "Rows: " + strReturn;

    for(m in results.tables[0].rows)

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "Rows[0]: " + strReturn;

    for(m in results.tables[0].rows[0])

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "Rows[0].Name: " + strReturn;

    for(m in results.tables[0].rows[0].Name)

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "Columns: " + strReturn;

    for(m in results.tables[0].columns)

    {

    dataOutput += m + strReturn;

    }

    dataOutput += "Columns[0]: " + strReturn;

    for(m in results.tables[0].columns[0])

    {

    dataOutput += m + strReturn;

    }

    dataOutput +=
    "rows[0].Name: " + results.tables[0].rows[0].Name + strReturn;

    dataOutput += "Columns[0].dataType: " + results.tables[0].columns[0].dataType + strReturn;

    dataOutput += "Columns[1].dataType: " + results.tables[0].columns[1].dataType + strReturn;

    dataOutput += "Columns[1].isKey: " + results.tables[0].columns[1].isKey + strReturn;

    divOutput.innerHTML = dataOutput;

    }

    ASP.NET AJAX Futures Data

  • Visual Studio 2008 - Thursday September 20, 2007

    Astoria

    A new build came out a few days ago.  Info on the build is:

    The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within corporate networks and across the internet. The data service is reachable over regular HTTP requests, and standard HTTP verbs such as GET, POST, PUT and DELETE are used to perform operations against the service.
    The payload format for the data exchanged with the service can be controlled by the client and all options are simple, open formats such as plan XML and JSON.
    The use of web-friendly technologies make it ideal as a data back-end for AJAX-style applications, Rich Interactive Applications and other applications that need to operate against data that is across the web.

    The first Astoria CTP is a dual release, making Astoria available in the form of downloadable bits that can be used to build data services that are entirely contained within a single computer or network and as an experimental online service that you can use to create online stores that are hosted by Microsoft and are accessible over the internet.
    This September 2007 CTP is mostly a refresh of the past May 2007 that enables developers to use Astoria together with Visual Studio 2008 Beta 2 and the ADO.NET Entity Framework and Tools Beta 2.

    The Astoria Team Blog is at: http://blogs.msdn.com/astoriateam/

  • Phonyism

    We made up/learned a new word that I wanted to share.  Phonyism.  A Phonyism is a term/word that sounds very official, however, when examined further has no meaning or bearing on anything.  An example would be, "That speech was good, but it was just a phonyism to do a cya." 

  • Two short lessons to learn

    The pot calling the kettle black does not stop the kettle, or the pot, from being black.

    While it does take two to tango, only one leads.

  • College Football - September 16, 2007

     We are starting to see separation between teams in college football.  The excellent teams appear to be:

    • University of Southern California.  USC rolled into Nebraska and beat them badly.
    • Louisiana State University.  LSU is rolling teams.  While they played Middle Tennessee on Saturday, LSU has mauled a couple of good teams.  LSU's humiliation of MSU on opening night looks even more impressive now.  LSU has Florida on the schedule.
    • University of Florida. Florida is rolling teams.  They have LSU on the schedule.

    The rising teams appear to be:

    • Boston College.  Matt Ryan is a really good quarterback.  BC rolled my GT Ramblin' Wreck over the weekend.
    • Ohio State.  OSU has won their first 3 games this season and had a big win at Washington yesterday.  I don't see them going undefeated, but I never will count out Jim Tressel.

    The unknowns are:

    • Oklahoma.  Freshman quarterback?
    • Texas.  Unimpressive wins over questionable teams. 
  • GT - BC

    Boston College walked in Atlanta and whipped my Georgia Tech Ramblin' Wreck.  Matt Ryan, BC's quarterback, is that good.

    http://sports.espn.go.com/ncf/recap?gameId=272580059

     

  • Visual Studio 2008 - Thursday September 13, 2007

    ASP.NET AJAX Futures ListView

    If you are playing with the ASP.NETAJAX Futures ListView, one of the things that seems to be missing is an automated mechanism to change the input data to the correct format.  How do you get the returned data to the correct format?  Your OnCompletion method should look something like this:

    function OnCompletion(results)
    {
    var searchResults = $get("DataResults");
    var table = Sys.Preview.Data.DataTable.parseFromJson(results);
    searchResults.control.set_data(table);
    }

    Note the call to Sys.Preview.Data.DataTable.parseFromJson();

  • Entitlement to Controversy

    Given my previous post regarding the deletion of the MVP coffeehouse newsgroup, I thought it interesting to bring up a term that Ken Cox posted about.  The term is "Entitlement to Controversy."  Some people in this world believe that freedom of speech entitles them to say anything that they desire.  "Freedom of Speech" is a right that is provided by the United States government to its people in dealings with its people.  It allows someone to stand on public ground and state what they want.  It does not allow some to slander/libel someone else.  It does not allow you to create a public nusance.  It does not allow anyone to come to my house and say whatever they want.  It amazes me that some people believe that these freedoms are allowed everywhere when they simply are not.  If you come to my house and start spouting off, I will ask you to leave, call the police, and then have you removed.  People online think that they are allowed to insult and threaten to their hearts content.  I guess because the online world started off as an unwatched area, this was allowed to happen.  However, its like the Old West.  As more people move in, civility and rules are forced on a society.  Now, get with the program and act like a decent and upstanding member of a society.
    Posted Sep 13 2007, 09:28 AM by wallym with no comments
    Filed under:
  • Ladies are no longer allowed on the terrace..............

    Ok, have you heard this one?

    There is a patio overlooking the 18th green at a country club.  Some ladies are sitting on the patio having a few drinks.  On the 18th green, some men miss some short putts.  After missing these putts, the men let out a few expletives.  The ladies are shocked and complain to the club manager.  A week later, the ladies ask the manager what has been done about the issue.  The manager replies, "Ladies are no longer allowed on the terrace."

    I was reminded of that rude and insensitive joke when MS announced to the MVPs that they are closing the private coffeehouse newsgroup for MVPs.  Why?  Well, the coffeehouse is a place where people go and talk, complain, argue, and fight.  Sometimes these posts drift into negative areas and go overboard.  And then it gets worse.  There is name calling and sometimes, some people get their feelings hurt and complain to MS.  The MS folks have had enough and decided to close the coffeehouse.  I'm not a big coffeehouse person, so I applaud them for taking this step.  Until there can be someplace the people can act responsibly and be moderated as necessary, there does not need to be a free-for-all place.  There are enough irresponsible actions for MS to take this step.  It is up to people to act responsibly in a civilized manner.  If you don't act responsibly, then punishment follows.  This is punishment.

    Posted Sep 11 2007, 10:36 PM by wallym with 1 comment(s)
    Filed under: ,
More Posts Next page »
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems