Evaluate Sarissa, the cross-browser javascript library for javascript Http requests. It makes a server call from javascript require only a few lines on the client page.
After downloading, check out this page for some code examples to get your started.
Show 125 is now available for download on www.dotnetrocks.com. I talked a little about my experiences in Iraq, but then went on to topics about web standards, ASP.NET tips and upgrading to Visual Studio .Net 2005 Beta 2. Download and have a listen.
I’m going to post my experiences with VS 2005 Beta 2 so you can hopefully save some time when you migrate. My company has converted completely and has deprecated v1.1. My group is a large web project with several class libraries. I’m excited and disappointed with the new web projects. I’ve been working for 2 weeks now with the new web project, and I like most of what they’ve done. The following are the things I don’t like:
- No more pre or post build events
- No project references (just .dll files copied to the bin directory)
- partial classes hide code I’m interested in and hides things from me.
I’m almost to the point where I’m going to use a class library project to develop my ASP.NET 2.0 web projects as well. I will sacrifice some designer support, but I don’t depend on that anyway. If you are using class library projects in v1.1, don’t run your project through the converter. Just open the project in VS 2005 and keep it as a class library. It will be a seemless upgrade with few problems.
When I start new web projects from scratch, I’ll be using class libraries. The new web site layout will be good for hobbyists developing with VWD, but it has too many limitations for me. I really like a lot of what they’ve done, but a few things just ruin a good thing.
Most people who keep up with the computer industry know about John
Dvorak,
a writer for PC Magazine. He rants about Microsoft. He’s
way out there in left field on
most things. He loves Linux, thought (but I’m puzzled why he
still uses Windows). He’s definitely in the camp of Microsoft –
bad, Linux
(and all the underdogs) – good. At the end of this post is some
of his past columns
with the most recent on top. You’ll notice how many times he
complains about Microsft.
I had to laugh today when I came upon his blog, and
he had a link on the left that said “Valid XHTML”. It’s a link to
the w3c markup validator. The funny thing is that when you click
it, the W3C tells you that it’s NOT valid markup (307 errors)..
This blog uses Community Server, and I’ve made it know that CS doesn’t
generate valid markup (no Doctype to start with) I don’t pretend this
blog is valid markup. I encourage Telligent to refactor Community Server so that it renders valid markup.
That’s right folks. Tomorrow (Friday, August 5th, 2005), I’ll be the guest on the .Net Rocks internet audio talk show for .Net developers. You can catch it live at 6PM EST or download it for you Mp3 player when it’s published on Monday.
I will obviously be talking about web standards (Xhtml, Doctypes, etc) as well as ASP.NET tips and tricks. I’ve done several projects with ASP.NET 2.0 now, so I’ll also talk about my upgrade experience as well as some pitfalls to avoid.
And I’ll have some stories about coding in Iraq.
Jeremy Miller is a local Agile “champion” here in Austin, TX, and he is posting a great series on pair programming at his company. Very good info!
First, if you aren’t using NAnt for team builds in ASP.NET 1.1, shame on you. Do that first. When converting to Whidbey, you’ll notice that your website no longer compiles to a single assembly and that multiple assemblies are created at JIT time. This poses a small problem to the way we are used to scripting web application builds.
You DO NOT want to copy everything in your website to your production server. There is no need for your code files to be out there. Instead, you will want your NAnt script to build the whole website and deploy the binaries. The solution task won’t work for you with a VS 8 solution. You’ll need to use an <exec /> target and kick of aspnet_compiler to precompile your web app to a stage folder and them use a <copy /> target to kick the files out to your server.
MsBuild does provide an AspNetCompiler task to do this, but it just kicks off aspnet_compiler. MsBuild is still just a subset of NAnt, so I think it’ll be a while before it can compete effectively (unless we find some proprietary stuff that we _really_ need).
Especially as we move to ASP.NET 2.0, it’s important to use an XHtml DocType or DTD. ASP.NET 2.0 server controls will render valid XHtml transitional markup, so that’s the most compelling Doctype, and that’s the one I prefer, but pick one of the following:
- XHtml 1.0 Transitional
- XHtml 1.0 Frameset (if you need to use <iframe />
- XHtml 1.0 Strict
The DocType needs to be the first line in the page; however, since XHtml is valid Xml, you can optionally add an Xml declaration at the top:
<?xml version=”1.0″?>
And if you do this, the Xml declaration has to first, and then the DocType would come directly after.
I originally was going to label this post level 200, but given how few people know about Html standards, I’ve labeled it 300, but I don’t think this _should_ be an advanced topic.
The first easy step is to try to validate your site with a validator. The one I use is from the W3C: http://validator.w3.org/. Type in the site, and it will tell you what is wrong with it. A series of events brought my focus back to this. I’ve posted on this topics previously here, here, here, here, and here.
I was setting some CSS overrides for my Community Server blog, and I wasn’t getting the results I wanted. Then I inspected the page to find that the default skin of Community Server doesn’t set a DocType. I was very surprised by this since Telligent has been on the ball on so many things. Telligent’s own web site uses the XHtml 1.1 DocType, but it doesn’t validate.
Not including a DocType at all leaves the browser guessing as to what kind of markup your page is. IE will assume Html 3.2 or (quirks mode). FireFox wants to render it as Html 4.01 transitional. In fact, if you use the default DocType in VS.Net 2003, you’ll be using an incomplete one that omits the location of the .dtd document. You can write valid Html 4.0 this way (and I commend Microsoft for having a main page that correctly validates), but IE will still operate in quirks mode. This may cause you some grief when laying out your pages because you will have unpredictable browser behavior.
Adhering to web standards greatly simplifies web application development when you need an attractive user interface. There are some simple steps that even a beginning programmer can employ to ensure the web application is valid markup:
These simple steps can lead anyone to standards-compliant web application.
Intel has name Austin, TX the 3rd most unwired city in the U.S. Whenever I am out and about and have a few hours to kill, I pop open my laptop and do some .Net work. I always have projects going. A new project that’s about to start up is a distributed open-source project for the Austin .Net User Group at Adnug.org. I have a Subversion repository for source code, and we’ll accept code patches from anyone who wants to submit them. We haven’t defined the project yet, so we’ll see how it goes. I have no problem finding a location that offers free wireless internet. Many businesses have added it to their signs, so it’s easy to spot. And Schlotzky’s is the old stand-by with free wifi at every location.
Some different surveys have slightly different results. Here are some:
Being a developer, I’m glad that it’s easy to get connected. I take my laptop with me wherever I go now. I can take advantage of development time even when I’m waiting my Firestone to change the oil in my truck, and when I just can’t find the Wifi, I use the FutureDial USB cable for my Sprint phone to get on the Net through my mobile phone.