|
>
 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 :)
|
|
|
 |
|
 |
 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>
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
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)
|
|
|
 |
|
 |
 Saturday, August 20, 2005
 |
|
 |
|
|
|
|
|
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
|
|
|
 |
|
 |
 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
|
|
|
 |
|
 |
 Thursday, June 30, 2005
 |
|
 |
|
|
|
|
|
If you're wondering if there are redistributables for the Indigo/Avalon Beta 1 RC, there are! You can find them here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&displaylang=en
I'm installing this on a test client machine that I don't want littered with the entire Visual Studio installation for verifying some of my Indigo builds. We shall see...later...if I can as easily uninstall this build when (if) I need to revert to the 2005 bits on the same rocking 2GB RAM machine that I am so happy I have now for running all my VPCs.
But don't confuse this download with a full installation that includes samples and SDK. If you want to play with these bits in the Visual Studio environment, do the following:
- Install the Indigo/Avalon Beta 1 RC Win SDK (this link is on the same download page, but can be tricky to find if you don't read carefully).
- Install Visual Studio 2005 (since you have installed a later version of the runtime to the machine, Visual Studio will point to those bits).
I have been able to do this with the Visual Studio Team Client edition and the Visual Studio Standard edition, without any problems thus far.
|
|
|
 |
|
 |
 Tuesday, June 21, 2005
 |
|
 |
|
|
|
|
|
It's just not enough to play with a technology...you really have to burn a few wasteful hours on something ridiculous before you can really feel the love. I love Indigo, I hate that I just spent 3 hours on what I'm about to describe to you. I hope that these 3 hours are well spent if it saves one of my 4 readers the trouble on the road to Indigo...
I have this relatively complex service I am working on that implements contracts for the WS-Trust and WS-Transfer specification (more on those another time...but you get the idea, lots going on). And since I'm implementing a standard contract, I don't need to create a proxy for the client, instead the client can dynamically create a channel to access the service, binding to the same IWSTransfer or IWSTrust contract definition (interface-based). I was a little bit curious how this would play out, what little steps I might miss getting the client side channel properly configured, exposing the service endpoint correctly since it has multiple contracts...so I expected trouble when I first ran the client code to hit the service.
First, my client started getting Access Denied errors hitting the service. This was easy enough, I had to tweak a few things on my service directory permissions.
Second, and less obvious, I start getting the hideous “Internal Server Error 500“. So begins my trials to find the cause, without really knowing “what I don't know yet” about Indigo.
The saga begins...
1. I run the service in the browser, and I get this strange error that indicates it can't find the service DLL.
<%@Service language=c# Debug="true" class="IDesign.Samples.Indigo.WSTransferService" %> <%@Assembly Name="Service" %>
I check, Service.dll exists, everything built fine, so I test another service that I know works, and no problems showing it the browser.
2. Could it be that my complex interfaces are causing a problem? I am after all exposing two contracts, perhaps I missed something?
So I simplify, and copy a test service that I know works, into my WSTransferService' project, and I modify the configs to expose only that service just to check it out. I use the same test client to hit this test service, simply reconfigure the endpoint from http://localhost/vdiroriginal/service.svc to http://localhost/vdirnew/service.svc. IT DOESN“T WORK! So, now, what am I to think? Same error, different project, different virtual directory. Hmmm...
3. Could it be the Virtual Directory settings?
I check IIS, compare them, I find my service doesn't have “Scripts and Execution“ enabled, so I'm thinking EURIKA, I'VE FOUND IT! No go, same error, damn!
So I use the same Virtual Directory and instead redirect it to another physical directory, and use the same simple test client, and I simply swamp the test client configuration from the service it normally hits, to the same service in a different directory. That means the test client configuration is the same, the test service configuration is the same, but the location is in a new physical directory. Still, no go.
4. Could it be some project settings?
I check the project settings, they are identical, so there is no special post build step that could lead to the error.
I know what you're thinking, “What was the freaking solution then??? Why tell me all of this crap???”. Answer: Well, just to give you an idea of the other possible things you might need to check for other service issues...even if they don't apply to this one. I'm almost there...check it out...
5. Project settings, project settings, project settings...and then it hit me...
The service DLL, you know the one it said in #1 above “can't be found“. Yeah, well the error message couldn't be more clear now could it? The problem is, when you create an Indigo service, you usually create a class library and add the .svc and related code there. If you deploy the service, you deploy as follows:
\root
service.svc
web.config
\root\bin
service.dll
Yeah, well class libraries default to build the DLL in the \debug or \release folder right? Now you feel my 3 hours of pain. I doubted myself, and I shouldn't have. I was sure it was a problem with one of: directory access, virtual directory settings, service configuration errors...or some magical thing I just don't get about hosting in IIS.
NOT
I had to change my project settings to build the output files in \bin instead of \bin\debug or \bin\release.
Had I deployed the app, of course I would have used the correct structure...but I was testing from within the IDE...and that my friends is my first official ghost chase with Indigo. Stupid? Yes. Could it happen to you? Not anymore.
|
|
|
 |
|
 |
 Monday, June 13, 2005
 |
|
 |
|
|
|
|
|
Last month Pat Phillips of MainFunction interviewed me about my career. Her goal: to educate high school teachers about careers possibilities in technology.
https://www.mainfunction.com/patp/blog/archive/2005/06/10/120.aspx
It seems like the MainFunction site is primarily devoted to providing resources for educators, which is fantastic. I had no idea what kind of opportunities awaited me when I was in high school, and my choices in university were completely by “fluke” as I transitioned from Finance to Computer Science. I think that high school students and parents need help to paint the broader picture of what a career in technology means today. It's not just a desk job behind closed doors. It can mean any of the following and more:
- Software quality assurance
- Software development
- IT
- Team lead or management
- VP Engineering, CTO, CIO
- Independent consulting
- Speaking, writing, training
- Blogging
Think about it, since more and more people are blogging, writing articles for online resource sites, participating in local community groups - they are gaining a ton of career satisfaction because they are recognized not only in their day to day job (at least hopefully) but also publicly. This does wonders for a young adult's self esteem, as they get started in their career...and frankly these are activities even high school and university students (heck, grade schoolers probably blog too!!!) can get involved in early.
Spread the word if you know any teachers, let's give the next generation some great ideas about where their career can go if they take the red pill.
|
|
|
 |
|
 |
 Saturday, June 11, 2005
 |
|
 |
|
|
|
|
|
Thanks very much to everyone who attended this talk in Orlando. The demonstration code can be found here:
WSESecurityDemo_MemberRoles.zip
You’ll also notice that there is some set up required to run the code, so be sure and review the readme document for those instructions. The sample uses the 1.1 version of the MemberRoles API.
I also have a resource site where other WSE samples have been posted, many that do not require the database setup:
http://www.dotnetdashboard.net/resources/wse.aspx
This may help those of you that are newer to the subject get your arms around it as well.
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
In this talk I presented approaches to the following key areas for a professionally designed ASP.NET application:
- Page Design & Navigation
- Error Handling
- Data Access
- Caching
- Localization
- Configuration & State Management
- Role-based Security
- Reduce Attack Surface
- Protect Sensitive Data
- Component Design & Deployment
The code sample that implements many of the concepts I discussed can be found here:
GalleryDemos2003_2.0 Migration.zip (1.44 MB)
In fact, this is the “before” code sample that I later use to migrate to 2.0 in my migration talk. So, if you looking at designing 1.1 applications for migration you’ll like some of my approaches here.
Other resources:
• My MSDN Whidbey Articles
– http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx
• ASP.NET Whidbey Team Resources & Book
– http://www.asp.net/whidbey
• ASP.NET Forum
– http://www.asp.net/forums
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
In this talk I demonstrated the following WSE 2.0 example for WS-Security implementation, followed by a demonstration of .NET and BEA interoperability. The BEA interoperability sample is available from the InteropWarriors site, however keep in mind that this requires you to set up a BEA Workshop 8.1 machine, and deploy the project files accordingly. The .NET examples shows the end to end code used for WS-Security that is also demonstrated with Workshop sandwiched in the middle, so this will still be useful to you for the .NET perspective.
WSESecurityDemo_MemberRoles.zip
I also have a resource site where other WSE samples have been posted, many that do not require the database setup:
http://www.dotnetdashboard.net/resources/wse.aspx
This may help those of you that are newer to the subject get your arms around it as well.
|
|
|
 |
|
 |
|