<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>General</title>
        <link>http://blogs.aspcode.net/category/3.aspx</link>
        <description>General</description>
        <language>en-US</language>
        <copyright>Stefan Holmberg</copyright>
        <managingEditor>stefan.holmberg@systementor.se</managingEditor>
        <generator>Subtext Version 1.9.0.27</generator>
        <item>
            <title>10 reasons why I chose MySQL over MSSQL2005 Express</title>
            <link>http://aspcode.net/archive/2008/01/06/285.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;as the preferred database engine for my web sites.&lt;br /&gt;
(price not being one of the reasons)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I currently have around 100 public websites spread over five servers. For ease of management I have started to look them over and standardize their technology.&lt;br /&gt;
I had to decide which database engine to use. These are my OWN highly personal opinions and arguments which made me take the decision based on the needs I have. I am not trying to start a database war here :)&lt;br /&gt;
But as the title suggests, I have chosen to use MySQL. Here are the 10 top reasons why:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- LIMIT. In a typical webapplication paging is needed and the LIMIT clause is a simple way of just retrieving the needed records from the database. The traffic between&lt;br /&gt;
the database and web application is kept at minimum, as well as the memory required for the web app.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;-  SQL_CALC_FOUND_ROWS. That select modifier works in conjunction with LIMIT and lets you retrieve the total number of rows you would get if we weren't LIMITing. I have a full C# code example&lt;br /&gt;
on this at &lt;a www.aspcode.net="" href="&amp;lt;a href="&gt;ASP.NET, MySQL and efficiant paging&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- memory requirements etc. Let me just say this: MySQL is so lightweight compared to MSSQL. It might not scale as well, it might not handle the same amount of transactions as fast as MSSQL,&lt;br /&gt;
but I don't have those requirements. With a download of 22 MB compared to 50 (or even 250 if you want fulltext) MySQL wins this round in my eyes.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- read performance. I agree: when it comes to transaction intense applications I still recommend MSSQL. but for web apps I have chosen MySQL. A web app is typically mostly reading data, not many&lt;br /&gt;
updates. In MySQL you can use the MyISAM storage engine, which uses an extremly fast table locking mechanism, allowing for multiple reader/single writer.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- management. Never thought I'd say this: I have learned to master and really like SQL Enterprise manager, I am also beginning to like SQL Server Management Studio, but, for a remote webserver&lt;br /&gt;
nothing beats phpMyAdmin against MySQL. On my development box I run SqlYog. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- backup/restore/moving data. MySqldump is a fantastic tool for moving data from one server to another. Spits out CRERATE TABLE/INSERT statements into a textfile. &lt;br /&gt;
So genious, Microsoft recently developed their own version, Database Publishing Wizard. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- MySQL is a full version. Since I said I woudn't talk about price I need to compare MySQL against MSSQL 2005 Express. And that version is crippled. Uses max one CPU,&lt;br /&gt;
uses max 1 gigabyte (GB) of RAM, 4 GB maximum database size.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- it's widespread. I have done quite a lot work lately against Wordpress. Having my own stuff in the same database as the Wordpress data opens up a lot of possibilities&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- fulltext engine. For MySQL it's inside the 22 MB. Nothing to download/install/configure. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;- multi OS support. I now have a Linux box in my machine park as well, since Wordpress is needed. So, being able to run MySQL on Linux as well as Windows sure&lt;br /&gt;
is a plus for me.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Last - consider I had all my experience in MSSQL (been using and coding against it daily for 10 years = since SQL 6.5), but still decided to go the MySQL road. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Messages for Microsoft:&lt;br /&gt;
- make it easy to upgrade an existing SQL 2005 Express installation to include full text engine as well. A 250 MB download is a joke.&lt;br /&gt;
- LIMIT and SQL_CALC_FOUND_ROWS. Something like that. Database support for paging is crucial for web apps, tricking it with TOP (and two separate sort /asc/desc) is not comparable. I know it's not SQL standard, but&lt;br /&gt;
I don't care. I need the best functionalty for my solutions, not the "most standard".&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;These are the two most important reasons I "left you" with regards to my web sites.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Messages for MySQL AB:&lt;br /&gt;
- do something about your own admin tools. The Query browser for example is horrible to work with. Luckily there are a lot of third party tools.&lt;br /&gt;
 &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.aspcode.net%2farchive%2f2008%2f01%2f06%2f285.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblogs.aspcode.net%2farchive%2f2008%2f01%2f06%2f285.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/285.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2008/01/06/285.aspx</guid>
            <pubDate>Sun, 06 Jan 2008 19:41:52 GMT</pubDate>
            <comments>http://aspcode.net/archive/2008/01/06/285.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/285.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/285.aspx</trackback:ping>
        </item>
        <item>
            <title>Switching to MySQL in 2008</title>
            <link>http://aspcode.net/archive/2008/01/01/284.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;My directions for 2008&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I will do some major changes when it comes to technology in 2008. Being an independent consultant (contractor) is not&lt;br /&gt;
all about being totally independent, of course. As in any business you need to adapt and be able to offer what your clients need. Not what you might consider the best/optimal (you can of course always come with  suggestions), but in the end the client makes the decision about which platform and solution to choose, and things like existing  ardware/software/knowledge often plays an important role in it. Therefore I have been doing a lot of ASP.NET, C# against MSSQL Server. However, if it was just up to me, and not taking any old luggage into consideration, I'd actually switch the MS SQL backend to MySQL!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Which is the direction I will try to take for this year. Lately I've been doing a image gallery system for a client, and since I had the freedom to choose the architechture I went for ASP.NET, C# and MySQL. Even though I live and bread MS SQL server and sps I can't say I made the wrong choice. Yes, some initial problems, no doubt,  but, I must say there are certain things making MySQL the optimal database engine for a web solution.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;+ price of course. Nothing more to say. The SQL 2005 Express limitations needs to be removed ASAP in my opinion, cause to me it's very much a developers database...&lt;/font&gt;&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;p&gt;&lt;br /&gt;
+ built in full text index. I have never needed full text index until a project I entered a few months ago. I looked at getting it up and running on my SQL 2005 Express development box. However, an extra download of 250 MB was needed. I also *think*&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;br /&gt;
+ paging. My favorite! This is SOOO typical a web application. Implementing paging in MSSQL is not fun at all. Getting acceptable performance out of it is possible, but coding hard to generlize and reuse.  In MySQL it's a matter of adding LIMIT X,Y to the end of the select statement. And not to talk about SQL_CALC_FOUND_ROWS. Cause typically you need to get the page of rows  but also the total number of rows, as if we were not using the limiting. Typically you do&lt;br /&gt;
two queries, one select count(*)... and one select * limit x,y. But with SQL_CALC_FOUND_ROWS you get that anyway. &lt;br /&gt;
Yes, might not be SQL standard, but I don't care. I don't get paid by creating the most standardized solution, I get paid by delivering a solution with good performance and preberable a low footprint. I have published an article on this, &lt;a href="http://www.aspcode.net/ASPNET-MySQL-and-paging.aspx"&gt;ASP.NET, MySQL and efficient paging&lt;/a&gt;.&lt;br /&gt;
    &lt;/font&gt;&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;p&gt;On the minus side:&lt;br /&gt;
- Microsoft default medium trust configuration. Medium trust is a good thing, it's not about that, I just feel that a lot of webhosts has no idea about what it's about. They take the default configuration (recommended by Microsoft) and uses that. And the default medium trust configuration only allows for MSSQL database access...I've had numerous of conversations with webhosts about it and many, I say many, still doesn't understand  what it's about. Sure they advertise on their website of supporting asp.net, mssql, mysql etc, but still when firing up your ASP.NET 2.0 app you get the &lt;br /&gt;
ecurity exception cause they are not allowing MySQL from medium trust...A lot of respectable webhosts has indeed made the changes needed, &lt;a target="_top" href="http://www.jdoqocy.com/click-2278671-10378494"&gt;GoDaddy&lt;/a&gt; &lt;img height="1" alt="" width="1" border="0" src="http://www.tqlkg.com/image-2278671-10378494" /&gt; is one of them. Hat off for them!&lt;/p&gt;
&lt;p&gt;AdMentor PRO will always have a SQL Server driver and I will still do a LOT of SQL server gigs, since I have a lot of clients using it, but for myself and my own servers I will make the transition.&lt;/p&gt;
&lt;p&gt;    &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;/font&gt; &lt;/font&gt;&lt;font face="Arial"&gt;- I might be wrong here - SQL2005 installs some extra services and stuff. In MySQL it was just a matter of specifying it in the create table statement and start querying...You do need a decent stemmer though, making words in normal form.&lt;/font&gt;&lt;img src="http://aspcode.net/aggbug/284.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2008/01/01/284.aspx</guid>
            <pubDate>Tue, 01 Jan 2008 21:48:56 GMT</pubDate>
            <comments>http://aspcode.net/archive/2008/01/01/284.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/284.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/284.aspx</trackback:ping>
        </item>
        <item>
            <title>Dealing with large datasets in browser</title>
            <link>http://aspcode.net/archive/2007/09/21/283.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;It's always hard working with large datasets, I have written quite a few desktop apps of that kind - and this week I have been trying to educate myself using large datavolumes in a web scenario.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I have no trouble optimizing the actual dataaccess ( I more or less live and breed indexes and sp:s ),  but the trouble is how to design the actual interface. I mean you can't just throw in 100 000 &amp;lt;tr&amp;gt; records and then expect the user to stay waiting for it to first come up at all, and then (try to) navigate it.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;The virtual listview is cool for Windows Forms and desktop apps, but to be honest I have a hard time with the existing&lt;br /&gt;
asp.net grid controls available - while the controls themseleves might be great - we have the problem of trying to be accessible. Meaning people without Javascript (and not to say search engines) should be able to get all our pages, so some sort of cool Ajax solution is (in my eyes) out of the question.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;So - what can you do? I have been experimenting a little lately and have a few tips:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;1. Use CSS as much as you can. Minimize the HTML markup. &lt;br /&gt;
Not&lt;br /&gt;
&amp;lt;li style="color:black;...."&amp;gt;Hello&amp;lt;/li&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;but just&lt;br /&gt;
&amp;lt;li&amp;gt;Hello&amp;lt;/li&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;If you have, say some hundred or more records it CAN make a difference.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;2. Are there "natural" ways of reducing (filtering) the dataset?&lt;br /&gt;
I have one example:&lt;br /&gt;
&lt;a href="http://www.usradiostations.info/"&gt;http://www.usradiostations.info/&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;a site listing US radio stations.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Here the first choice is state - then you select the city - and not until now you get a list of the actual stations.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;If I was to do such an application for myself - for it to be really useful, I would probably have one dropdown list for states - and when selecting a state all cities pops up in a linked dropdown - which in turn lists all radio stations in a third. Or something like that. But I think there is more to it than just creating the easiest to use application. As I said accessibility&lt;br /&gt;
of that site has a value too.&lt;/font&gt;&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;p&gt;&lt;br /&gt;
You can even reduce it further - another example is this site on aircraft models &lt;a href="http://www.aircraftdata.net"&gt;http://www.aircraftdata.net&lt;/a&gt;. To reduce the dataset I took the liberty to split it into different subdomains - that being step 1. Then you get listings for that subset. &lt;/p&gt;
&lt;p&gt;I will do some more investigations in this matter - cause it is very interesting and the task of creating an accessible, yet easily navigatable - yet again USEFUL - site might not be as simple as it sounds when dealing with larger data volumes.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;/font&gt; &lt;img src="http://aspcode.net/aggbug/283.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/09/21/283.aspx</guid>
            <pubDate>Fri, 21 Sep 2007 15:42:38 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/09/21/283.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/283.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/283.aspx</trackback:ping>
        </item>
        <item>
            <title>Source and version control</title>
            <link>http://aspcode.net/archive/2007/09/12/282.aspx</link>
            <description>&lt;p&gt;When setting up new box I had some vague ideas of trying the opensource road. The very example this post is about is source control. I have earlied talked about  &lt;a href="http://www.aspcode.net/Sourcegear-Vault-source-control-tool.aspx"&gt;Sourcegear&lt;/a&gt; but I see alot of buzz around Subversion so hey, why not give it a shot. &lt;/p&gt;
&lt;p&gt;While Sourcegear Vault is a fantastic product, what scared me from using it (it's free for single user - which is what I needed for my websites sourcecode - so price was not the reason) is the rather hefty system requirements for the server end. 2 GB RAM is recommended. Since it's implemented as a webservice it's also integrated with IIS - and I have an idea of NOT running iis at all on my development box (but rather in a virtual VMWare box), considering I run´the built in web server when debugging my VS2005 projects. &lt;/p&gt;
&lt;p&gt;So - off I went. First searching for info on *WHAT* and *HOW* to install Subversion. Then trying to do it. I finally got it running as a service as I wanted. And it is indeed slick - really fast and low on resources as far as I can tell. However there were some things I didn't like about it: &lt;/p&gt;
&lt;p&gt;1. can't check out a single file. You work on directories. That's a problem with the server end - I read somewhere they are gonna implement it  in the future, but I need it now&lt;/p&gt;
&lt;p&gt;2. can't say I found a GUI I likes. Tried out TurtoiseSVN as well as RapidSVN.  While RapidSVN is pretty close to VSS interface (which I fell like I was breastfed with, more or less) - still not close enough.&lt;/p&gt;
&lt;p&gt;So - back to reality and Sourcegear Vault. What I didn't want was to clutter my development box with the server part - so I took a shortcut and installed it on one of my public webservers. I also get the benefit of having the code at a second location.  &lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/282.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/09/12/282.aspx</guid>
            <pubDate>Wed, 12 Sep 2007 10:18:37 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/09/12/282.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/282.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/282.aspx</trackback:ping>
        </item>
        <item>
            <title>At least i tried Vista</title>
            <link>http://aspcode.net/archive/2007/09/10/281.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;Got a new box almost a month ago. Havn't wanted to start configuring it cause I know the time (and pain) it takes to get it configured. Let me tell you a little about how I would like my box to be&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;1. SQL 2005&lt;br /&gt;
2. VS 2005&lt;br /&gt;
3. Virtual box with AMP (apache, Mysql, php)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I was also keen on trying out Vista, since it came preinstalled on the box I thought, why not,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Now that is how it looks in my world - however when considering my customer projects that I still need to be able to support/debug/compile etc I need&lt;br /&gt;
4. VS 2003&lt;br /&gt;
5. SQL 2000&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;(it was about a year ago I got rid of the last VB6 project so at least I wont need  old Visual Studio 97).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;And to add to it - one clients VPN only works with Windows XP - meaning Vista was out of the question. But I decided to &lt;br /&gt;
still give it a try. So the plan was to use use Vista as host and install XP as a virtual machine.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Vista (host OS)&lt;br /&gt;
 -SQL 2005&lt;br /&gt;
 -VS 2005&lt;br /&gt;
 -code directory (shared)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;XP (in virtual box) &lt;br /&gt;
 -VPN client&lt;br /&gt;
 - VS 2003&lt;br /&gt;
 - SQL 2000&lt;br /&gt;
 - code taken from shared directory on host &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I was really happy when I had spent the hours needed to install VMWare server (cause I wanna run Ubuntu as well)&lt;br /&gt;
and installed XP inside, installed the VPN and got it working - and installed VS2003. Last thing was to really try to compile - &lt;br /&gt;
and here the BIG problems started. First I had big trouble getting the boxes to talk to each other at all, but finally&lt;br /&gt;
I got a grip on how things should be configured in Vista to allow disk sharing. However - no matter how I tried the performance between the two were painfully slow. On a GB network I made around 20 KB/s. Yes I didn't mistype - 20 KILOBIT... Coping a VS 2005 simple project of around 30 source files whould take me 34 minutes or so...&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;lso: &lt;br /&gt;
From XP to another (real) XP box on the network performance was normal&lt;br /&gt;
From another(real) XP to Vista operformance was normal&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Now it was sunday afternoon - I had spent friday and saturday night on this and really wanted to be done by monday morning. So I gave up.I wiped the Vista box and installed XP. Now I got the problem of the OS not finding drivers for network, sound card etc (think the motherboard's too new). Found an old USB network interface to plugin to connect to Internet and start searching for drivers. And finally I got most parts working...&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Other from the host OS I have the same configuration as I wanted. Not it works like a charm - and actually the overall performance IS better in XP than in Vista - at least that's what I think.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;To end it up - this post is not a flame on Vista, it might very well be me being not clever enough, for example there are a some reports on VMWare Server trouble with XP - but the truth is I shouldn't have to care. The most important thing for me is to get my system working according to what I and my customers need and XP - not Vista - was the solution once again.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Hopefully I will get my Vista install sometime - but the reality is that's not MY decision - but rather my clients in a way. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/281.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/09/10/281.aspx</guid>
            <pubDate>Mon, 10 Sep 2007 08:16:35 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/09/10/281.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/281.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/281.aspx</trackback:ping>
        </item>
        <item>
            <title>More about code structure</title>
            <link>http://aspcode.net/archive/2007/08/30/280.aspx</link>
            <description>&lt;p&gt;Long time, no blogging. Sorry about that, but I have had a LONG summer vacation. Really nice.&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Lately I have actually been doing some Wordpress stuff. What started out with some simple customizations for &lt;br /&gt;
a client quickly turned into some deep WP hacking. I can say this, I am really impressed with the product. As a &lt;br /&gt;
pure publishing tool I doubt there is nothing beating it. If you can live with using Apache (well, technically IIS is possible, but when doing some url rewrites etc, which you most certainly want in Wordpress, it's a lot easier with Apache) . You also have to live with being tied to PHP and MySQL, of course.  &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;My first reflection after a few weeks of PHP hacking: I miss the ASP coding days in a way. If you don't know it,&lt;br /&gt;
coding in ASP and PHP are very much alike. You typically insert some PHP/ASP tags inside your HTML and just upload the page. Done... It simply allows for quick coding and quick results. While you *could* program the same way with ASP.NET there is almost like an unwritten law saying &lt;a href="http://blogs.aspcode.net/archive/2006/09/15/11.aspx"&gt;you should use code behind&lt;/a&gt; (what moron wrote that - oh, right, it was me...), you should create  multitiered (three layers are an absolute minimum, you know) applications etc. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;And I agree, myself I *almost always* do use code behind, I almost always separate business layer/database layer/GUI in different dll:s etc and I really do believe in that model. But lets face it - we must question ourselves - WHY should &lt;br /&gt;
we separate our layers? And is it possible to achieve in some other way?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Take code reuse for one example. If you implement your FooBar business class inside a dll it means your ASP.NET app as well as your Windows app as well as your console batch routine etc can use it. Fine! But that could also be done with ASP and PHP, not involving any dll:s, but simply including a the FooBar.php/asp file.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Cause, back to Wordpress now, I am amazed over how well organized that code project is. Using a "simple" untyped language they have implemented a model which still allows for event handling etc, third party plugin registration etc.&lt;br /&gt;
Yes, it's all string based, meaning you register a hook for say "wp_footer" (in this example your function will be called each time the page footer is being rendered) - but it's still really easy because of the structure. The "correct" ASP.NET equivalent would be having the server app define an interface and the plugin implementing it. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;To finish this ranting off - I will not leave my "structured way" of ASP.NET coding, it works really well for me,&lt;br /&gt;
but the Wordpress work I have done has kind of opened my eyes a little. I kind of have this idea "best practice is not what someone else says is best practice - best practice is what best for me" (maybe a luxury of being self employed being able to define my own models) so therefore I think it's important to think always try out new and different things. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;br /&gt;
    &lt;/font&gt;&lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/280.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/08/30/280.aspx</guid>
            <pubDate>Thu, 30 Aug 2007 08:20:30 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/08/30/280.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/280.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/280.aspx</trackback:ping>
        </item>
        <item>
            <title>SQL Server columns never updated from SP</title>
            <link>http://aspcode.net/archive/2007/06/27/278.aspx</link>
            <description>&lt;p&gt;Have a look at this SP:&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;p&gt;&lt;br /&gt;
CREATE proc [dbo].[KB_UpdateArticle](@id int, @header varchar(255), @txt text, @active varchar(1),&lt;br /&gt;
@allowcomment varchar(1), @extracontent text, @sortorder int,  @metakeywords varchar(255), @metadescription varchar(512), @publishdate datetime )&lt;br /&gt;
as&lt;br /&gt;
If @id = -1&lt;br /&gt;
BEGIN&lt;br /&gt;
 insert into kb_article (header, txt, created, lastmodified, viewcount,votecount,&lt;br /&gt;
  totalrate, active, allowcomment, allowrating, extracontent, sortorder, metakeywords , metadescription, publishdate )&lt;br /&gt;
 select @header, @txt, getdate(), getdate(), 0,0,&lt;br /&gt;
  0, @active, @allowcomment, '', @extracontent, @sortorder, @metakeywords , @metadescription, @publishdate&lt;br /&gt;
 select @@identity&lt;br /&gt;
END&lt;br /&gt;
ELSE&lt;br /&gt;
BEGIN&lt;br /&gt;
 update  kb_article set header=@header, txt=@txt, lastmodified=getdate(),&lt;br /&gt;
  active=@active, allowcomment=@allowcomment, extracontent=@extracontent,&lt;br /&gt;
  sortorder=@sortorder, @metakeywords =metakeywords , @metadescription=metadescription, @publishdate=publishdate&lt;br /&gt;
  where id=@id&lt;br /&gt;
 select @id&lt;/p&gt;
&lt;p&gt;END&lt;br /&gt;
GO&lt;/p&gt;
&lt;p&gt;Spot the error? It is an "authentic" stored procedure from a CMS system I am developing - and the lesson to learn is to always test out all test scenarios - even after the smallest additions. I added some new columns in the table, metakeywords and metadescription, and had to update the stored procedure to update it accordingly. &lt;/p&gt;
&lt;p&gt;And in the "update" case &lt;/p&gt;
&lt;p&gt;@metakeywords =metakeywords , @metadescription=metadescription, @publishdate=publishdate&lt;/p&gt;
&lt;p&gt;should be&lt;/p&gt;
&lt;p&gt;metakeywords = @metakeywords, metadescription= @metadescription, publishdate= @publishdate&lt;/p&gt;
&lt;p&gt;of course. My biggest error was not this, but not testing that case out. I just created a NEW article and saw that the information made it into the database - then I was happy with it. I can tell you I had some trouble finding the cause later, at first I looked in the code of course. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;img src="http://aspcode.net/aggbug/278.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/06/27/278.aspx</guid>
            <pubDate>Wed, 27 Jun 2007 06:27:52 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/06/27/278.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/278.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/278.aspx</trackback:ping>
        </item>
        <item>
            <title>New stuff on my sites</title>
            <link>http://aspcode.net/archive/2007/06/19/265.aspx</link>
            <description>&lt;p&gt;Just a "new stuff" article. I've been working really hard lately which hasn't given me much time to publish stuff. But today I made some progress:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.programmingado.net"&gt;search engine at programmingado net&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a id="_ctl0_repWhat__ctl2_hlViewQuestionLink" rel="bookmark" href="http://www.aspcode.net/articles/l_en-US/t_default/ASP.NET/ASP.NET-2.0/Simple-ASP.NET-SOA-architecture_article_473.aspx"&gt;Simple ASP.NET SOA architecture&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a id="_ctl0_repWhat__ctl1_hlViewQuestionLink" rel="bookmark" href="http://www.aspcode.net/articles/l_en-US/t_default/ASP.NET/ASP.NET-2.0/Two-layer-cache-mechanism_article_474.aspx"&gt;Two layer cache mechanism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The two articles are worth reading I'd say. In short I needed some performance improvements from my laptop, thounsands of sequential calls to do  DNS lookups were dead slow because of network latency over the wireless network. So I created a small ASP.NET page, uploaded it to my webserver (connected to Internet with 100MB fiber line), and sent a batch to it from my client. All DNS calls were then made from the server and the result sent back as a singe batch. Really improved the overall performance!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/265.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/06/19/265.aspx</guid>
            <pubDate>Tue, 19 Jun 2007 10:55:28 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/06/19/265.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/265.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/265.aspx</trackback:ping>
        </item>
        <item>
            <title>Posting to blogs with C# code</title>
            <link>http://aspcode.net/archive/2007/06/12/264.aspx</link>
            <description>&lt;p&gt;If you have a couple of blogs you soon get tired of logging in (oh wait, first find the right userid and password) and then clicking some menu buttons to get to the post page.&lt;/p&gt;
&lt;p&gt;So I have started to look into a Windows client (create my own of course, heck I'm a developer, am I not) for that. It has been some "fun" trying to get the posting API:s to work and today I added a new one to the list - LiveJournal. I never even knew about it (don't know much more than wordpress and blogspot to be honest) and it was not too easy to get the posting right from the C# client.&lt;/p&gt;
&lt;p&gt;However, a quick and dirty solution, turning into concatenating XML parts into a long string, hehe - well not  big biggest moment of pride - but who cares about cred and "slick" solutions...I prefer working solutions.&lt;/p&gt;
&lt;p&gt;Read more and get the code here&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://www.aspcode.net/articles/l_en-US/t_default/.NET/Networking/C_-code-to-post-to-Livejournal_article_470.aspx"&gt;C# code for posting to livejournal&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://aspcode.net/aggbug/264.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/06/12/264.aspx</guid>
            <pubDate>Tue, 12 Jun 2007 14:44:03 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/06/12/264.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/264.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/264.aspx</trackback:ping>
        </item>
        <item>
            <title>The CSS and tables problem</title>
            <link>http://aspcode.net/archive/2007/05/11/252.aspx</link>
            <description>&lt;p&gt;
While I am really starting to appriciate the power of CSS there are some certain drawbacks which drives me nuts. 
Beside the obvious about CSS - the possiblity to separate layout and content - the power lies in
the &lt;b&gt;C&lt;/b&gt;SS - where C stands for cascading. 
&lt;/p&gt;
&lt;p&gt;
However you gotta be really careful cause soon enough you will have trouble knowing which styles will be inherited or not.
One thing I miss (correct me if I am wrong) is however a possibility to - for a certain item - 
break the inheritance chain, this element should NOT inherit any style but rather start from the "fresh" default style.
&lt;/p&gt;
 
&lt;p&gt;
One example of this I have been struggling lately is tables.

For AdMentor PRO I use some heavy table formatting:&lt;/p&gt;

&lt;p&gt;
&lt;img src="http://www.admentor.net/sites/AdMentorblog/images/CropperCapture[11].Png" /&gt;   
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://demo.aspcode.net/demo/index.html"&gt;Live demo&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now, what if I want to include, say a datepicker Javascript component for one of the
fields. Since most Javascript datepickers are implemented as tables, all styles
from the outer table WILL be cascaded down to the datepicker - no matter what. Since the 
new table is &lt;i&gt;contained&lt;/i&gt; inside...
&lt;/p&gt;
&lt;p&gt;
What I am left to do is try to reverse all settings from the outer table,th,tr,td etc
for the datepicker component...That was not so fun at all, and I didn't even get an result good enough.
Somehow some cellspacing or margin or something got carried over so it didn't look ok.
I simply guess I have more to learn about that. &lt;/p&gt;


 

 

&lt;img src="http://aspcode.net/aggbug/252.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stefan Holmberg</dc:creator>
            <guid>http://aspcode.net/archive/2007/05/11/252.aspx</guid>
            <pubDate>Fri, 11 May 2007 09:56:11 GMT</pubDate>
            <comments>http://aspcode.net/archive/2007/05/11/252.aspx#feedback</comments>
            <wfw:commentRss>http://aspcode.net/comments/commentRss/252.aspx</wfw:commentRss>
            <trackback:ping>http://aspcode.net/services/trackbacks/252.aspx</trackback:ping>
        </item>
    </channel>
</rss>