Tuesday, September 28, 2004

Woah!!

Well, I'm back from my holiday. Got a bit of a tan and now I'm just kinda reeling getting back into the swing of things. Washing (clothes! of course I washed!), ironing, going to work, that sort of thing.

I'll write something more when I've caught up with myself a bit!

Thursday, September 16, 2004

Woo Yay and Thrice to the Hoopla

I'm off to Skiathos on me hols tomorrow. Best get packing!

Wednesday, September 15, 2004

The same 2 questions

I spend quite a lot of time loitering about the ASP.NET forums. One of the things I've noticed is that there are 2 issues that come up over and over again:

1) How do I disable the user's back-button/do some action when the user closes the browser/some other client side stuff?

2) How can I lay out my controls/display something in x way/some other HTML thing?

In case anyone actually reads this, here are the answers:

1) There's nothing you can do through ASP.NET that can do client side things. ASP.NET is a server-side technology. As far as your code is concerned, as soon as a request comes in, is processed and goes out, it's dead. It's a server-side, stateless thing. If your user's browser doesn't ask your code to do something, then it won't even know it exists. I may sound like I'm belabouring the point, but this is quite a key thing to Active Server Pages. It works on the server, not the client. "But what about Session and Application state? How can you say ASP.NET applications are stateless?". Well, ASP.NET does a very good job at mimicing state. For example, it uses a SessionID to link web requests with session objects stored on the server. This is one of the reasons why ASP.NET uses cookies all the time. If you configure your app to use cookieless sessions, then you can even see this SessionID in the URL. Once the request is received, if there's a sessionID, either in the URL or the browser cookie, then the server accesses session variables from that. It's not true state, though. It's just imitated.

"Wandering a bit off topic, aren't you?" Well, not really. The fact that everything is done server-side, including state management and EVERYTHING else ASP.NET does is just to help me make my point. ASP.NET knows your browser is there, it even knows a little bit about it (OS version, Browser version etc. from the standard http headers) but that's all. It can't manipulate your browser, it can't disable buttons, there's nothing it can do to the client.

JavaScript can, though. JavaScript is custom-made for this sort of thing. You want a button disabled based on some sort of criteria? Fine JavaScript'll do it. You want a window to pop up and give your user a message? Fine, JavaScript'll do it (although it'd better be something damned worthwile and relevant. There's a special hell for people who create advertising pop-ups)

2) Control and display layout is all done in the browser from the HTML spat out from your ASP.NET application. I'll repeat that. Control and display layout is all done in the browser from the HTML spat out from your ASP.NET application. ASP.NET outputs HTML. No matter what you've got on your web form, no matter what controls you use, no matter whether they're databound controls like DataLists, DataGrids etc. Your application does what it needs to do, and the spits out a load of HTML to the user's browser. As a result, this means that you have a) ultimate power, but b) ultimate responsibility for making sure your controls work and look right. If it's any consolation, it's not too hard. If you can get VB.NET, C# or whatever, as well as knowing what marked-up code (like XML) looks like, you can get HTML.

There's a million and one fantastic resources and tutorials online, just sling "HTML Tutorial" into google and you're away.

Google is a wonderful thing. As is reading. As is MSDN's library.

Apologies for the rant. Just had to get it off my chest.

Bugger

WebMatrixHosting have stopped doing time-unlimited free hosting.

Anyone know of another? I use Brinkster as well, but the only problem I have is that it doesn't support compiled application dll's - the whole site has to be written in inline code. Which I don't really like (apart from anything else, it's unsupported in VS, so it becomes just a very very expensive version of Notepad!)

Bugger.

Tuesday, September 14, 2004

Well that's alright, then (I think)

I've just read this article about Visual Studio 2005 Standard Edition. This seems to sugest that VS 2005 is going to have a cut-price, slightly limited functionality cheapskates version, without having to resort to the Express edition.

There are several reasons why I think this is a good thing, First and foremost is that, although I develop for fun, writing things that I find interesting, rather than things I have to write, and all that, I would one day like to do it for money. My perception of the express edition dev tools is that they're quite a bit different to VS in how they're used, as well as what they do. If i have a limited functionality version of VS that works the same, just has less features, then I can move quite smoothly rfom one version to the other.

The second reason is that I use some of the things that (I gather) you can't do in a single express edition product, you have to download and use more than 1 simultaneously. For instance, there have been a few times where I've developed a web app in conjunction with a smart-client app as well as a backend class library. That's where it gets (I think) quite fun. As far as I know, I wouldn't really be able to do this so easily in the express edition products.

Yes, yes, yes. I'm the first person to admit that I haven't used any of the express tools. I don't know first hand what I'm talking about. I'm just going from what I've read. If I'm wrong, then please, someone let me know.

When I heard about the Express ed's, I was a bit concerned that it would mean the death of the affordable version of VS, which I was a bit upset about. I'm feeling a bit better about it now.

Just wanted to share.

Thursday, September 09, 2004

Rainy Day

There's some more stuff online that looks to be packed out with stuff it would be good to know from Dev Days 2004.

Just need to wait for an excuse to spend an afternoon in front of the computer...

Wednesday, September 08, 2004

Amusing book review

The reviews for this book made me laugh. Especially the guy who declares Michael Moore's an utter FREUD. What, Michale Moore is, in fact, the father of that rather hokey psychoanalysis thing? (Don't even get me started on Phycho-bloody-analysis!).

Anyway. Made me chuckle. I'm writing Stupid White Men at the moment, and while quite enjoyable, the statistician in me thinks 'yeah, right' to all the numbers, and the part of me that balances arguments and thinks from other viewpoints thinks 'but...'.

That is all.

Tuesday, September 07, 2004

More free stuff

MSDN has another long series of webcasts that started last Friday.

As usual, I'll have to wait for the re-runs, sadly they're always live when I'm at work, but hey, it's all good - and I won't miss anything if I go and make another coffee half way through.

Friday, September 03, 2004

Hey cool...

Windows Media Player 10 is out to download. I'll have to give it a whirl.

It'll be interesting to see whether or not it still likes the app I wrote for WMP 9. If it does, then that's All Good, and if it doesn't, then it'll be interesting to find out why. Either way, it looks like quite a cool thing.

Depending on just how much the back-end stuff's changed, I might even have a stab at doing something else with .NET working with WMP. ASP2WMP and MediaTagger (which was a little app I made for batch-adding MP3's to WMP's library) were kinda fun to work on. I think I might do a couple more.

Just wanted to share.

Wednesday, September 01, 2004

Fight... Fight... Fight

Rory Blyth seems to have a knack for hitting nerves and starting fights.

Just wanted to share. DotNetRocks, however, rocks.