in

dotnet.org.za

South African .NET Developer Portal

Adam Heunis tech talk

Software mostly, but other techie stuff as well. I primarily use Notepad, Visual Studio, the Command Prompt, XmlSpy, SQL Server, MySQL and Photoshop. I speak
C# (incl. OO), XML, XSL, ASP.NET, VB.NET, VB6, SQL, UML and XForms.
  • The ONLY way to register a .co.za domain

    I posted to this blog last year, asking who to use to register a .co.za domain because I had some bad experiences with some of the bigger South-African (not mentioning any names, of course) domain registrars.

    I have subsequently found that the easiest, quickest, cheapest is to do it yourself. It only costs R50-00 a year (much better than the exhorbatant R200/year some registrars charge) and only takes 10 minutes to do (be that in a slightly archaic way). But the best thing about this is the absolute control you have. There are no 3rd parties involved (i.e no registrars pleading ignorance about changing DNS settings so that you HAVE to host with them etc). You set up your all YOUR contact info, DNS settings and all the rest.

    The way to do it yourself is very straight forward. All you have to do is to go to the co.za Domain Administration homepage and click on the HowTo guide link. This explains it all.

    I have recently registered The Red Apple in this fashion and it runs of my Brinkster (in the US) account. Exactly how I want it.

  • Multiple domains with the ASP.NET 2.0 HttpHandler

    Here is my problem: I own many domain names (too many my wife says Smile) and I want to be able to do serve .NET pages for potentially each of them, but I don't want to have an account for each domain name. Essentially I want the users not to know that they are using the same application on a server for different domains. I don't want to redirect either as the urls will give it away.

    I'm sure many other domain junkies must have this same issue. To achieve this I do the following:

    Firstly I use Brinkster.com as my domain host. The allow up to 100(!) domains to point to the same application. That is step 1. Not many other hosts will allow that. Please comment if you know about other hosts that do.

    Secondly I use a an httphandler to interrupt all my root .aspx requests. This handler then uses an xml file that I've created to match a domain with a folder in my website. Then I use fairly basic string manipulation to rebuild the request url. Finally I use:

    IHttpHandler hand = (Page)PageParser.GetCompiledPageInstance(physicalFile, null, context); // For .NET 1.1

    or

    IHttpHandler hand = BuildManager.CreateInstanceFromVirtualPath(physicalFile, typeof(Page)) as IHttpHandler; //For .NET 2.0 with Medium Trust Level

    hand.ProcessRequest(context);

    to "run" the new url.

    This works like a treat and the users are none the wiser. If you don't believe me check out my personal website, photography website and Boesmansriviermond (my town). All are running from the same brinkster account.

    It be happy to get into specifics if anyone is interested. Please email me at adam[lastname - begins with an H]@hotmail.com.

    Posted Jul 23 2006, 11:32 AM by attie with 4 comment(s)
    Filed under: ,
  • Who are the best .co.za domain name registration people?

    I'm looking to register some .co.za domain names, but the guy that I've been working through is messing me around. He is not prepared to set me up as the admin & techie contact. As far as I know this is against domain name registration policy, but I don't want to piss him off only to lose the domain name.

    I was wondering if this community has any thoughts on good and reputable .co.za domain name registration people.

    It astounds me that this kind of business (which has a proven business model) is still run by amateurs in SA. In the US and Europe people have made fortunes doing this with the users in mind.

  • Anger towards Sony gains momentum

    I first heard about this on the excellent Security Now! Podcast and it really pissed me off!

    Sony - yes that previously reputable company - has taken a positive step to alter your operating system without you being aware of this! No this is not some alarmist statement thrown out there to get ratings. This story has been covered all over the world by people like the Washington Post, The Inquirer and PCPro as well.

    The slight-of-hand happens when you run Sony CDs with digital rights management (DRM) software on your PC. There is a EULA that pops-up asking you if it is OK to add some software to your machine, but who reads those anyway. Plus apparently the EULA says that you can uninstall the software, which you cannot. This already is very dodgy, but much worse is to come! This software hack then goes on to hide ALL (not just Sony) files starting with $SYS$. This is a superb opportunity for a hacker to rename his files appropriately and nothing, including Anti-Virus software, will be able to find the offending files.

    Luckily the industry has caught on to this very dodgy approach by Sony in a big way and a right stink is being kicked up. Some people, including the podcast mentioned above, are calling for a boycott on all Sony products. I will adhere to this call to arms as I cannot accept what Sony is doing. Even if you do buy Sony CDs, make sure you don't accept any EULAs that pop up when you play them (on a PC).

    This post is syndicated from Heunis.NET, my personal blog.

  • Who says they're illegal?

    This is something that I've been wondering about for a long time. My big problem is that any file - whether the file is an mp3, mpeg or software - is essentially a combination of 0s and 1s. It doesn't mean anything until it gets interpreted by some software (like IE, Windows Media Player) etc.
     
    I'll explain further. So lets say I've downloaded an mp3 from the Internet. When do I break the law? Do I break the law when I download the offending file or do I break the law once I play the offending file for it to make music? If I do break the law when I download the file, how can it be proven that I knew it was an illegal file - it is just a serious of 0s and 1s - how can that be illegal? What if the file can be interpreted in more than way? If you open the file in one application it might be an harmless image, yet if you open the same file in another application it might be an mp3. Technically this is entirely feasable. I don't think there is a way in hell that you can be held liable for owning a series of 0s and 1s.
     
    They would have to prove that you've allready listened to your file for you to be held accountable. How they would do that, I have no idea.
     
    I think that the copyright big boys are still going to find many many digital challenges ahead. I'm not convinced that they'll be able to legally resolve all their issues either. And I have a feeling there could be a "house-of-cards" effect here - once one card fails, the whole lot will come crashing down. We could have a digital free-for-all!
     
    Just for the record: I don't download music illegally.
  • Flock: All the rave in Europe

    If Wikipedia, Skype and Flickr are the first kids on the Web 2.0 block, then Flock is very much the new kid on the block. It is certainly the buzzword in Europe at the moment. Some people like the tech pundit Robert Scoble are even calling it "Awesome"!

    Flock's experience director, Bert Decram, and his co-developers are claiming that Flock is to web browsing what VHS was to TV, but I don't know if it is that big at all. Unless I am misunderstanding something Flock sounds like just another browser, except it has a lot of "web writing" stuff integrated. I have downloaded it and I must say that the integration is very slick. Blogging & photo sharing (for now) is very easy - you just drag and drop paragraphs and photos onto your blogs or photo sites. A little bit like Google's Picasa.

    The idea is very good and it might help to force an IE rethink, but I'm not sure it is the "Office for the Web" (another Flock claim). Time will tell.

    The guys developing this are all from the Mozillla foundation and I think Flock is based on Firefox. You can download a developer preview (version 0.49) at their developer page.

  • IIS 7: Closer integration with .NET

    For those of you that read Scott Guthrie's blog, this will be old news, but it sounds like the folks (to use Dubya's expression) from Redmond have put some thought into the new release of IIS. Version 7 is supposed to be much more modular and as such much more accesible with .NET. As far as I can tell the idea is that most (if not all) configuration settings in IIS will be set in web.config. This coupled with the fact there will be one shared pipeline for all requests (for .aspx files as well as static content) means that:

    • The HttpModule will intercept requests at the lowest level (no more messy and often inaccesible ISAPI filters!). With 6 and earlier, you can use an HttpModule to do all sorts of awesome stuff with .aspx files, but unless you have access to ISAPI filters not static files. I host my site with Brinkster and as such I don't have access to ISAPI, so in my case this makes the very handy HttpModule option totally redundant.
    • Authentication and role-based authorization will be set for IIS and ASP.NET only in ASP.NET (the web.config again I'd think).
    • You will be able to change the default file just by adding a config element in your virtual directory.

    These are three of the items that immediately caught my attention as they are issues I have come accross, but the modular design is sure to have many more advantages. I do believe though that the hosting fraternity is not entirely happy with the new direction!

    It all sounds very promising; the bad news is that it sounds like it won't be out for at least another year.

  • MySQL 5 may ship in November - whoohoo!

    According to a CIO article published 5 days ago, New MySQL Database May Ship Next Month. This is something that the open-source and software community as a whole has been waiting for for what seems like eternity. Even MySQL themselves are calling version 5 its most significant upgrade yet. The BIG improvement that everyone is very aware of is that MySQL 5 will have proper stored procedures. It has other long sought features like triggers, views and better (or more recognised) error-handling as well, but Stored Procs are the biggest improvement. This will almost certainly see them mount more of a challenge to Microsoft's SQL Server and to a lesser extent Oracle.

    I am a huge fan of MySQL (see my previous post on MySQL and .NET) and there are ways to work around the stored procedure shortcomming, but it is without question a huge shortcomming. As anyone with some database knowledge knows SPs are quicker to run, easier to maintain & extend, easier to use with C# (for instance), type-safe & more secure (using type-safe parameters stops any malicious sql being run).

    According to the article they will not be changing their open-source and licensing policies - MySQL will still be available with a General Public License (GPL). This is in contrast to what Phil Armitage, a friend of mine and someone with his ear to the software ground, has been hearing. According to Phil, there could be some interesting (read: bad) news regarding Oracle involvement in MySQL and more specifically InnoDB. I do hope this is just scare-mongering and that MySQL will continue to aspire to those most noble of causes: open-source software. Judging by the job title they have given their co-founder, David Axmark, of "open-sorcerer" we're on the same page.

    I for one am about as excited about MySQL 5 as I am about VS2005!

    Posted Oct 17 2005, 08:04 PM by attie with 1 comment(s)
    Filed under:
  • ASP.NET Podcast

    I haven't posted anything in ages and I realise this is probably not my most researched post, but I do think this would be very useful to the rest of the ASP.NET community.

    Wallace B. McClure (a Yank) publishes the ASP.NET Podcast (rss). For those of you that are into podcasting as I am, this is well worth a listen. This week he interviewed Shanku Niyogi and Nikhil Kothari, two of Microsoft's top ASP.NET guys, regarding Microsoft's Atlas project for ASP.NET.

    Posted Oct 17 2005, 06:23 PM by attie with no comments
    Filed under:
  • De-skilling the developer

    When I started my software career in 1991, I wrote an application that "peeked" and "poked" individual pixels to and from the screen. It had a meta declaration process (kind-of like xml/xsl, except it wasn't xml) and it could even draw graphs. It was called, originally enough, "Newdisplay". It took me ages to get this spot on and I was very proud of myself when I finished it. It is still in daily use with Neat Contech, my employer at the time.

    Today though, I can get 10 times the functionality using Windows or a web front end with substantially less effort. Now I can display some serious data, beautifully styled and packaged for edit by dragging and dropping a datagrid and binding it with 3 lines of code. This also means that just about anyone that can switch a PC on, can do the same thing. Yes the datagrid may not be the best or most economical way of displaying data, but who cares? Business just wants to see a screen with data. They really don't care anymore how this happens as long as performance is adequate.

    The new Visual Studio is even more a case in point. Now you can pretty much set up an entire user database and web authentication system by dragging-and-dropping controls around. Surely you all know what I mean. I've used front-end development in my example, but the same applies for all the tiers. Just look at all of the MS application blocks.

    I quote from Can the Programmer's Job be De-Skilled? by Drs. Nico, Turner & Kearns:

    As the field of software development becomes more professionalized, and the software development process becomes more formalized, there is a growing belief that the job of the front-line programmer is becoming.or must become, out of economic necessity.de-skilled.

    I'm hoping to get some response from the community on this, because I hope to be proven wrong. C'mon all you hardcore software geeks, prove me wrong!

  • My most popular articles sofar

    My 5 most popular posts (as measured by web hits, not news readers) at this blog sofar are:

    1. .NET and MySQL myths exploded
    2. Why AJAX? The benefits of AJAX explained
    3. It salaries in South Africa
    4. C# Design Patterns
    5. ASP.NET/DHTML Menu User Control

    I find stats like these very interesting. What is also interesting that I've written several, what I feel are very useful, posts on XML/XSL and XForms and these haven't been that popular at all. Does this mean that the eXtensible languages are misunderstood?

  • ASP.NET's error-handling idiosyncrasy

    I have recently been exposed to an idiosyncrasy in ASP.NET's standard error-handling.

    For those of you that might not know, the following is what happens. If your application errors, ASP.NET rebuilds your session from what it was before the error. This is great, BUT it means that any session manipulation (i.e. adding a error message to session) you do will get lost as soon as the error redirect (as specified in web.config) occurs. Of course the LastError also gets reset, so you're not able to show any specific error message on an error page.

    Personally I think this is not very well thought out and reminds me of a certain book by Joseph Heller. Sure you can get around this by Response.Writing in your error event (or an HttpModule, see future posts), but it makes all of the nice customErrors xml in web.config rather redundant.

    This is an issue in 1.1 and older, so hopefully they'll sort it out for 2.0.

    Posted Jul 20 2005, 06:01 PM by attie with 1 comment(s)
    Filed under:
  • Database table & column naming conventions

    When designing databases I use the following table & column naming conventions:

    Tables:

    • Pascal case for entity based tables. Example: Organisations, AuditScheme.
    • "Connector case" for connector tables. This means Pascal case joined by an underscore. Example: Organisation_AuditScheme, Partnership_Organisation.
    • [Tablename]_AU for System Audit tables. I'll post more on these in due course.

    Columns:

    • Primary key is always Id. Many people use [Tablename]Id, but I prefer just Id. This also works well with persistant objects.
    • Pascal case for all the other columns including foreign keys. Example: FinalGrantDate, OrganisationId.

    What does this community think? Don't be shy to mention any online references either!

  • SharpDevelop: the open source solution for C# coders

    Anyone who reads this blog will know that I am a supporter of open source & open standards etc. In this light I'd like to mention SharpDevelop from the guys at ic#code. Once again my learned friend, Phil Armitage, first introduced me to SharpDevelop a couple of years ago.

    This is a very useful open-source IDE that you can use to code C# to your heart's content. It is very easy to use (has a similar feel to VS.NET) and does most things that VS.NET can do. In fact, I think Microsoft "lent" some of their ideas (XML Schema integration) for VS.NET '05 from SharpDevelop. It also integrates very well with nUnit, nAnt (and therefore CI in general). Obviously any code you write with SharpDevelop can be consumed by any .NET application.

    SharpDevelop's one big con is that it doesn't ccurrently support Web applications yet. Definitely worth a look. They also have some insightful videos on their wiki.

  • XForms: an "interface" for user input

    If you've read my blog, you might've noticed that I list XForms as one of my skills. A lot of visitors to this blog have enquired as to what XForms are. With this in mind, here is a brief explanation.

    In essence, XForms are XML driven forms. I know it sounds too simple, but this really is what all the fuss is about. To understand the benefits that XForms have over standard web forms you have to look at it in deeper detail though.

    Forms are an important part of many web applications today. Most of these forms are HTML based and until now they have been doing a good job. The XForms guys are trying to tell us that standard HTML is starting to struggle with complex transactions. I don't know that I agree fully with them on this, but I do say is that all web based (and indeed other) data gathering/user input systems share a lot of commonality.

    XForms is a well thought out (by the W3C with extensive consultation), extensible standard that can define the implementation of a data gathering/user input system. The system will still have to be implemented by the device that you are using but XForms define how it should be implemented in a standard way.

    I guess in C# terms you could almost say that it works in the same way that an interface would. In the same way that implementation is not part of an interface, implemantion is not part XForms. The implemantion is for the class/device. This means that any XForms compliant device can handle user input whether this is a web browser, a windows form, a telephone system, a mobile application, server-side, client-side or even HTML itself. Again note the similarity with OO interfaces.

    I got involved with XForms, through an indirect predecessor called ISML and I have built my own XForms renderer, but some big guns (Adobe, Mozilla, IBM etc) have now commited their massive weight behind their own renderers. Microsoft, rather predictably, are sofar touting their own Infopath as something similar, but there is a rumour that they have started taking XForms more seriously.

    To be brutally honest, I don't think XForms will be anything more than a good standard if Bill & His Boys don't come to the party. I also think that it is a good enough standard and has enough use for them to want to come to the party.

    My final thought: If your organisation requires a lot of user input and you have the standard maintainability issues, then watch this space. The support isn't quite there yet, but when it reaches critical mass I think this could become a very useful standard.

    See more at the W3C Xforms site.

More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems