>
 Monday, September 12, 2005

We put on a 1 day seminar at UCSD Extension on Saturday for those interested in getting up to speed on the upcoming release of .NET 2.0. I'm posting a bunch of 2.0 samples here directly related to the topics we covered at the event.

Dave McCarter gave a great overview of the VS 2005 IDE and its productivity features. No code to share on that one, you have to be there to see it!

I presented a talk on VB.NET and C# language enhancements. Samples include a few new VB.NET samples:

Several C# samples that are posted on the IDesign site:

 

I also presented a talk on ClickOnce and Smart Clients...the code sample is better seen in “live demo“ but here's the finished product of what I demonstrated:

And to wrap things up, Scott Mitchell gave a great talk on ASP.NET 2.0...he did most of his demos live, but I told him I'd post some of my finished ASP.NET 2.0 samples here that were related to his talk...since I have them handy:

aspnet20samples.zip 

 

 

For more IDesign samples go here:

http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=8

 

Enjoy!

 

 Thursday, September 08, 2005

This blog looks very very boring...for now...but I can assure you I have a lot more personality inside...and it shows in my other endeavors more obviously such as Stuntmusician.

My point?

Well, some of you may know my brother is in a rock band, and I'm very proud of he, his band, and their music...so if you like hard core rock, they just pressed their second CD on a shoestring budget, the usual artists wage...recorded lead vocals (my brother, Paul) in 3 hours, no kidding!!! I happen to think they rock...

http://www.evildoersmusic.net

My second point?

In my “other“ world I'm trying to bring technology to the independent music scene, which I'm a great fan of...for obvious reasons (my brother)...so...I have been interviewing indie rock bands since January (well, sort of, we had a little break as I moved from Mondays to Stuntmusician)...and I just posted my latest interview with Killola, a rock band in LA - diverse, a bit racy for some, and yes there are some profanity so you might want to stay clear if you are the conservative type...this won't be for you...

Check out their interview here: http://www.stuntmusician.net

I have a lot of plans for this site...well...after I get the Indigo book finished...for now enjoy monthly indie rock interviews and some reviews that will get up there very soon...

and I will now return to slaving over the book...

 

 

9/8/2005 10:56 AM Completely Off Topic  | Comments [7]  |  View reactions  |  Trackback
 Wednesday, September 07, 2005

For all you dasBloggers out there...if you want to have nested blogs like I have here:

www.ucsdxcommunity.com

www.ucsdxcommunity.com/ASPNET

...you have to first configure the subdirectory as an IIS application, then remove the <httpModules> section of the web.config in the nested blog. Modules can only be loaded 1x per appdomain, and the nested blog is loaded into the same appdomain by default.

The funny thing is, the error message tells you that it can't load the module twice, so this is actually pretty obvious, but if you are like me, you may have seen this error and started looking for a “bigger“ problem (I always do that...dunno why) ...therefore I didn't pay attention to the error message 'literally“ at first.

9/7/2005 8:45 PM ASP.NET | dasBlog  | Comments [2]  |  View reactions  |  Trackback
 Monday, September 05, 2005
While I convert my samples from WSE 2.0 to WSE 3.0 I thought I might post a few blogs on notable issues you might face, while I'm thinking on it...

<securityTokenManager type="ImagingServices.MyUsernameTokenManager, ImagingServices" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" qname="wsse:UsernameToken" />

For example, creating a new example with the UsernameToken security token, based on the OASIS WS-Security standard, requires some minor adjustments to your web.config settings. Previously, when you configure a custom security token manager to handle <wsse:UsernameToken>, you would add the following <securityTokenManager> element:


Of course the namespace and qualified name of the OASIS WSS UsernameToken profile haven't changed, but the way ASP.NET 2.0 handles application assemblies has, along with the WSE 3.0 configuration schema.

First point: ASP.NET no longer has a single application assembly (DLL) for the application code. You can't count on a specifically named assembly like MyWSE30Service.DLL to be deployed to the \bin directory. In fact several assemblies are generated from the Web site source, and the assembly names are dynamically generated. So, you can't specify the name of the assembly in the type attribute of the <securityTokenManager> element, the custom token manager type is compiled with the ASP.NET application code. In this case the type attribute should only include the fully qualified type name with its full namespace.  And, you'll be glad to know that when you sign the Web site application output assemblies, the setting remains the same.

For types that are compiled into a separate assembly, then referenced, the traditional format for the type attribute would be used. The fuly qualified namespace and assembly name are provided for unsigned assemblies. For signed assemblies provide the full assembly name which includes version, culture, and public key token.

Second point: there is a new namespace attribute, and qname has changed to localname...and they aren't the same thing. Qname refers to a fully qualified XML name which means namespace and local name. Now, the QName property of the SecurityTokenManager at runtime can be generated from the namespace and localname in configuration.

Third point: with WSE 3.0 you can configure more than one token manager for each type of security token manager (binary or XML). THis changes the configuration schema for <securityTokenManager> which now supports the traditional pattern of add, remove, clear - as discussed in the WSE 3.0 specification:

<securityTokenManager>
<add localName namespace type />
<remove localName namespace />
<clear />
</securityTokenManager >

And so now your custom UsernameTokenManager should be configured like this:

Of course, you could just read through the WSE 3.0 documentation to find these things out...but I betcha browsed the Web first, so here ya go...

<securityTokenManager>

<add type="CustomUsernameTokenManager" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />

</securityTokenManager>

 

 

9/5/2005 8:18 AM WSE  | Comments [1]  |  View reactions  |  Trackback
 Wednesday, August 31, 2005

The PDC is coming...in fact it is sold out! Not surprising with all of the new platforms and tools coming in the near term...

...and longer term...

...of course there is more...but my point is, PDC will help you keep up...just jam your day with your favorite sessions...and on that note, a few things yours truly is involved in:

  • PDC TV - The Microsoft Regional Directors are coordinating another cool attendee activity like you have never seen in the past. More information on this coming soon, in a separate blog entry. In short, you can participate in the PDC like never before, and we can get it all on film :)
  • PDC Underground - For those who can't attend the PDC, and those that can but still want to come to a great show, we are putting on a special event on Tuesday night where many of us Microsoft Regional Directors will show off some of the coolest features we appreciate in these upcoming releases
  • Women in Technology Panel - I have participated in a few of these, and I always end up wishing I could have a sit down with my fellow panelists because they impress the heck out of me...this time...they are: Angela Mills, Microsoft; Anne Thomas Manes, Burton Group; Dee Dee Walsh, Microsoft; Kate Gregory, Gregory Consulting; Michele Leroux Bustamante, IDesign; Shoshanna Budzianowski, Microsoft. WOW! What an honor to be part of this crowd! If you have never attended this type of panel before, it is all about reaching success in IT, career mentoring, overcoming challenges...and really this is just as much for men as it is women because the discussions usually relate to all of us in this community. Come join us for lunch and discussions: 402AB from 11:45AM to 1PM on September 13th

Hope to see you there :)

 

 

8/31/2005 5:45 PM Speaking/Events  | Comments [3]  |  View reactions  |  Trackback
 Monday, August 22, 2005

If you haven't tried this already, I have definitely saved you at least one hour, for the two I spent playing, toying, testing, and writing this little blog. The issue is when you want to combine formatting statements with binding activity. Of course the trusty Eval() function will allow us to provide a format statement:

<asp:Image id=Image2 width=200 height=200 BorderWidth=2 runat="server" ImageUrl='<%# Eval("url", "~/Photos/{0}") %>' ></asp:Image>

But what if I don't want to hard-code the path? What if I want to use AppSettings, for example? It really isn't so difficult, but it required a little playing around before I realized that I can literally use the binding statement for any code output, including the String.Format...and, within the context of the binding statement <%# ... %> I can use Container.DataItem to get at row values. This example pulls together AppSettings with row values to build the ImageUrl property:

<asp:Image id=Image2 width=200 height=200 BorderWidth=2 runat="server" ImageUrl='<%# String.Format("{0}{1}", System.Configuration.ConfigurationManager.AppSettings["PhotosDir"], ((System.Data.DataRowView)Container.DataItem)["url"])%>' ></asp:Image>

 

8/22/2005 9:15 PM ADO.NET | ASP.NET | ASP.NET 2.0 Migration  | Comments [5]  |  View reactions  |  Trackback

Sure, the syntax got easier. Instead of the cumbersome:

<%# DataBinder.Eval(Container.DataItem, "url") %>

We get to save some strokes and remove the entire confusion around “what the heck is Container.DataItem?“:

<%# Eval("url") %>

But, this isn't all its cracked up to be. Eval() STILL uses reflection to evaluate expressions, therefore for every bound column/row displayed in your ASP.NET pages, you are adding overhead, unnecessarily. Of course, what this really means is, just like with 1.1, you should be using explicit casts to cast Container.DataItem to its actual type:

<%# ((System.Data.DataRowView)Container.DataItem)["url"]) %>

Of course the trick is to know...you guessed it...what the heck is Container.DataItem??? A quick way to find this out for various objects you may choose to employ in binding, is to bind just to Container.DataItem as a test. In the attached example I bound the GridView control to the Web configuration sections:

Configuration webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);

ConfigurationSectionCollection webConfigSections = webConfig.Sections;

GridView1.DataSource = webConfigSections;

In the GridView declaration I included these labels in a template column:

<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItem%>'></asp:Label>:

<asp:Label ID="Label3" runat="server" Text='<%# ((ConfigurationSection)Container.DataItem).SectionInformation.SectionName %>'></asp:Label>

Now you can consider yourself early bound.

ConfigurationUtility.zip (60.58 KB)
8/22/2005 9:03 PM ADO.NET | ASP.NET | ASP.NET 2.0 Migration  | Comments [20]  |  View reactions  |  Trackback
 Saturday, August 20, 2005

Hi folks...I have finally uploaded my super duper ASP.NET sample code:

http://www.dasblonde.net/ct.ashx?id=f8b330d8-0a87-496c-8be3-3aff101bfd58&url=http%3a%2f%2fwww.dasblonde.net%2fcontent%2fbinary%2fGalleryDemo20.zip

It includes features like:

  • Master pages
  • Security controls and membership
  • New localization features and a localized database
  • Use of Profile to track culture and theme preferences (there are some tricks in here)
  • Use of new GridView and DetailsView controls, with ObjectDataSource (decoupling presentation from data)

This upload is related to my previous blog post here, in case you were waiting for the code...yikes I have been busy! http://www.dasblonde.net/PermaLink.aspx?guid=f8b330d8-0a87-496c-8be3-3aff101bfd58

Don't forget to read the instructions for setup!

 

 

 

8/20/2005 3:42 PM ASP.NET | ASP.NET 2.0 Migration  | Comments [2]  |  View reactions  |  Trackback

I'm designing a new database for samples in my book, so I thought I would refresh my memory on stored procedure naming conventions. Wouldn't you know that my friend Adam Cogan's company down under shows up first in the list when I Google for stored procedure naming conventions? I stopped right there, perfect, his company's site - SSW - is full of great resources for database development. Thought I would share it here in case you hadn't seen the site:

Stored Procedure Naming Conventions and other DB Tips

 

8/20/2005 2:10 PM Database  | Comments [2]  |  View reactions  |  Trackback
 Friday, August 19, 2005

Hi everyone, long time no blog eh? Been out of town almost entirely, working on Indigo and InfoCard projects/book...and just “super” busy. But, although I should be working right now...I just read this article by Calvin Austin entitled “Is the C# Party Over?” http://jdj.sys-con.com/read/11774.htm

This really makes me want to think about what has happened with .NET through these past few years. What has it done for my clients? What has it done for me? Is the momentum still behind it?

Ok, but when I blog, I blog...and this is a long one...

The short answer is that I think Calvin is doing what most that are passionate about their respective platforms do: compare and contrast on what you have seen, and draw conclusions that are heavily slanted in your preferred platform’s direction. It’s normal, lots of people do it. I can let it go. But it is worth discussing…to make sure another perspective is heard. Jon Box, a fellow RD (www.microsoft.com/rd) commented here: http://jonbox.dotnetdevelopersjournal.com/c_is_the_party_over.htm

And, Dino Chiesa of Microsoft responded here: http://dotnet.sys-con.com/read/118121.htm

 

Now, here are my thoughts…more of a personal perspective…

 

First of all, let me state that although the majority of my experience is with Microsoft technologies, I did spend 4 solid years in a 100% J2EE environment while I spent “spare” time on the initial .NET release…and since .NET released those roles switched and moved back to my usual full time .NET efforts while working with J2EE (specifically Web services) in my “spare” time…and have made and happily kept many friends in the Java community as a result. I happen to have a lot of respect for both platforms…I think they both have their strengths and weaknesses, and frankly the choice between the two is often one of company investment in talent and existing code base, or simply put “your community preference”. Both are highly capable platforms for scalable server-side systems hosting Web applications and services. Ok, I’ll say it -> service-oriented systems.

Did we need Visual Studio and .NET?

From a personal perspective on the Microsoft front, I used to develop in VB 3.0…6.0, but I ended up using the Win32 API most of the time to do anything really useful, therefore C++, MFC, ATL ended up being where I spent more of my time. There were things about VB I appreciated, like development productivity and UI designers. But I liked the power and low-level control of C++, because I needed it. Moving to C# for me was like a merge of both into one happy package: productivity and power. But on top of it, I felt I acquired the elegance of the Java deployment model, which I had worked with for several years. Therefore, I had it all! I’m not comparing .NET to Java development environments, the latter of which I know have in the past years really come along with productivity-oriented development tools (WebLogic Workshop, Eclipse…) as well…I’m simply stating that I really appreciated what I got with C# and Visual Studio 2002/2003, and I’m sure others that have tried it probably felt the same. I have even had Java friends that moved to C#, and loved it! They couldn’t believe the productivity/power combination. But, to be fair, I have other Java friends that tried it and still prefer Java, and that’s ok too.  Bottom line: We needed .NET (C# as my preference) and Visual Studio.

Are releases too frequent?

Of course my clients, for example, have to talk a lot about their goals, and if it makes sense to develop in 1.1 today, or 2.0 for tomorrow. As with most innovations, Visual Studio 2005 promises to make things even more productive with everything from designers and wizards to refactoring. .NET 2.0 has added many APIs, built-in functionality, low-level capabilities like generics (finally a better STL from my C++ days).  Yes, Microsoft is releasing MORE. Yes, they have to, because it is still a relatively new development paradigm and there is much to do, plus there is a great base to build on now. In particular Microsoft had to address the productivity needs of the VB 6 developer, and add in modern productivity tools from SOA designers to refactoring. They are simply “must haves”.

In 3.5 years we have had 2 releases, with a third one on the way: Visual Studio 2005. It should be no surprise that Visual Studio 2002/.NET Framework 1.0 was followed with a release of Visual Studio 2003/.NET Framework 1.1, to fix some oversights of the initial release. Realize that Visual Studio and the .NET Framework represent major innovations to Microsoft’s previous technologies. It was years in the making, but you would expect a major paradigm shift to come with demands from the community, particularly in the beginning. With 1.0 we had the merge of productive development tools for Windows, Web, Mobile and even database level development and debugging simplified some of the common pains of VB, C++ and ASP developers previously. C# gave C++ developers an elegant new object-oriented language with a common API layer that would be shared with other languages, and a new deployment model that enabled XCOPY deployment and a secure runtime among many other features. C++ developers could migrate their code, work in a more productive UI design environment, and share in the same deployment model. ASP developers could actually debug, and design code that isn’t spaghetti, not to mention richer UI in a fraction of the time. VB developers were offered the power they didn’t have before so that may account for some of the lag in adoption…because Visual Studio 2005 will finally provide the level of Wizard that VB developers were lacking by comparison to the simplicity of VB6.

To compare, there have been 6 releases of the Java specification in 9 or 10 years. The Java open source community has interim releases too, including nightly builds. They do this to provide bug fixes immediately and enhancements that will ultimately lead to a next release. So, you can’t really say Microsoft releases any major update to software faster than the Java community. And, you can’t really say that both sides don’t complain about the change, or issues with compatibility (which I think are frankly easier to manage in .NET because of side-by-side deployment). There was a 1 year lag before 1.1 followed 1.0 with fixes. And now it has been a few years since and 2.0 hasn’t even released yet. I think it just SEEMS like more because in the past few years Microsoft has been more open than ever about their future releases, very very early on.

Bottom line: 2.0 is an appropriate release but we need to be careful not to give the impression that new tools means “migrate everything”. That costs businesses money. You don’t “just migrate”. You decide what is best for your business. 1.1 is a perfectly stable environment to continue working on. I would agree, however, that there is pressure from developers when a new release comes out, to push the company forward, and the productivity gains of moving forward will actually evaluate to the bottom line as well.

Should your business migrate to 2.0?

It is not bad that we have a major release with 2005. But, it means you have to make choices as a business. If you are starting a new project today, do it with 2.0 in my opinion. If you have an application built on 1.1, you need to think a little harder about your goals as a business. Is it worth it to migrate the system or application? Can the business benefit from taking advantage of deployment and security features of ClickOnce? Can you reduce ASP.NET application maintenance overhead with master pages and other new controls and features? This is all up for discussion…but if you want to stay with 1.1, because of costs to the business…that is also an option. Just like there are many Java applications that have stayed with earlier versions for stability and cost containment.

Is deployment platform really an issue anymore?

Calvin made a comment on .NET limiting your choice of deployment platform. I say “who cares?”. Seriously, this is an obvious statement.  We have know from day 1 that Microsoft = Windows. Who cares anymore? We live in a service-oriented time. Many applications, many platforms, many departments, many vendors, many industries are integrating. Large corporations have Unix, Linux, Windows and other systems spread across departments. What they need are ways to communicate with distributed applications. Interoperability with Web services is one way, but there are many many ways to interoperate or expose functionality across platform besides that. We need people to think about the best tool for the best job, and deploy accordingly. If you require only UNIX or Linux boxes…I guess Microsoft will lose that account…but I would ask the question: why does it have to be UNIX or Linux, before making a final decision. And if that’s the way the cookie crumbles…ok then…there are always these choices.

I’m bordering on rambling now, and I really should be writing my book, so suffice it to say I think that Calvin was inaccurate, and a little slanted. I would hate to see people read that without another perspective, and from this blog entry, you can read three other perspectives: from Jon, Dino and me.

Back to Indigo…a “future” release of Microsoft technology that will once again improve our existence J

8/19/2005 8:48 PM What The?  | Comments [31]  |  View reactions  |  Trackback
    ON THIS PAGE
    SEARCH
    CATEGORIES
    ARCHIVES
    BLOGROLL

Designed by NUKEATION STUDIOS