Tuesday, July 02, 2002

Strsafe.h: Safer String Handling in C Better late than never.  Right? [System.Error.Emit]

For anyone not going to managed code, here's a little something from MS to help prevent silly string buffer overruns. Question is, how many C fanatics will actually a) convert from their current ways and b) settle for the "performance hit" *cough*. ;)

9:41:47 PM    

I just wrote a macro that converts a file to Base64 and places the resulting string on the clipboard. You can check it out right here.

7:58:09 PM    

Except that my web server already has ASP.net. I get a few hundred hits a day. What do I care? :-) I understand what motivates someone like Dave to make it just require FTP and no active server components. He has a monetary interest in working with the largest crowd possible. Personally, I don't have any such need. I'd rather prefer something powerful and dynamic over something static and flaky, but that's just me. :-) [The .NET Guy]

You're right. That's the only real difference between a power user and a typical end user. So it's just a question of target audience.

Technically, most of the code could be shared with the decision of when the content is generated being the only thing done differently. Obviously the content generation engine and database manipualation could be the same. It's just a matter of when the content engine is executed and what is done with the results. In the "desktop publishing" scenario it's executed for all posts, over all categories, each time a new post is published. In the "on demand" scenario, there's some sort of timestamp kept in the database that the IHttpHandler would check against the date of the file on the system (if it even existed) to determine if it needs to be regenerated.

Just some thoughts... maybe one day one of us will actually find the time to put this thing together. ;)

6:42:50 PM    

What I want is dynamic page generation, so if I change something in one of my headers, etc., I don't need to re-generate and re-publish every single page on my site.  Since the FTP upload of Radio is a little flaky for me, this is a killer.  To add to that, Radio actually re-publishes every page in your site when you add a new article on a new day, so it can re-generate the calendar on each page.  Adds to my FTP problem. [Greg Reinacker's Weblog]

I'll echo your experiences with the FTP support in Radio. The FTP support in CityDesk is much better, but of course is still a manual system. Like you, I'd prefer something that leveraged that ASP.net runtime so that publishing is a simpler and more foolproof. I'm just about convinced that the right way to do it is to have whatever tool you're using generate XML files that get shoved up to the server, and then use ASP.net to walk through them as necessary. [The .NET Guy]

Well, that sort of defeats the whole idea behind content generation and publishing, doesn't it? The whole power of Radio is that it's "desktop publishing". Your server doesn't need to be anything except a dumb HTTP server that supports the GET protocol basically. The idea is that, like in a database, writes occur a lot less than reads. So yeah, all the content is regenerated on a publish, but is static for the N reads that follow it on the web site.

So what could a more dynamic alternative be? Run some kind of application (ASP.NET based obviously) on the webserver which reads from a database which you update from your desktop via SOAP calls. Then, content could be cached by the built-in caching framework, but you'd need a custom expiration scheme. Also it would all be cached in memory which is hardly as scalable as caching it to disk. So you would probably want a custom architecture, done with HttpModules most likely, that detects whether or not the requested URL's content has been built since the last save and if not, build it on demand and save for future requests.

4:45:36 PM    

There's a great little article over on the O'Reilly network entitled Enforcing Association Cardinality. It's a good read for any UML followers out there looking to apply their knowledge within the realm of XML.

4:07:02 PM    

O'Reilly publish book on W3C XML Schema. O'Reilly and Associates have published XML Schema: The W3C's Object-Oriented Descriptions for XML, written by XMLhack's own Eric van der Vlist. [xmlhack]

Great! I hope more and more people get on board with schema based XML development. As I've mentioned before, I totally see the benefits in simple well-formed XML documents, but there's so much more power in terms of describing and consuming documents when using schemas.

As a side-note, if you don't already own a copy of Essential XML Quick Reference, I suggest you pick it up. It covers all of the major XML technologies in a concise, well indexed format.

Update: Thanks to John St. Clair who pointed out that the content for the quick reference is actually available for download at the DevelopMentor website. You'll need to sign up for a DM account, but it's painless and well worth it if you want the content.

Disclaimer: I could be considered biased because I reviewed the book, but honestly I use it almost any time I'm working with XML to look stuff up.

3:13:48 PM    

[Macro error: The file "C:\Program Files\Radio UserLand\www\#prefs.txt" wasn't found.]

Ok, great. Where'd it go? I know I didn't delete it and I haven't even posted anything in a couple days. It only happens when I try to put a title on my posts. *sigh*

Update: I went to the folder, saw that #prefs.txt was in fact still there, so I opened it in notepad and just saved it (as is) and everything works again. Interesting.

11:44:58 AM    

Microsoft changed the pricing for .NET Alerts. Now you donít need the initial $15,000 fee, just pay $0.075/user/month. Iíd easily pay a dollar a month for such a service. Anyone want my money? [matt.griffith] read the small print, you have to have a Passport license to be able to send .NET Alerts, and thats still $10K/year. [Simon Fell]

Is this really that bad? I suppose it's a barrier to entry for independent developers, but even the smallest company with a product that requires such services should be able to afford this. Also, are there alternatives? AFAIK, there's no one else out there providing these kinds of (integrated) services yet.

11:39:27 AM    

Chris Sells has contributed an article to this months MSDN Magazine entitled: Scripting and .NET. In it he covers the abilities of the Visual Studio for Applications environment. More importantly, he goes into some detail describing how to integrate the VSA environment into your own application, enabling endless amounts of extension.

11:34:53 AM