Summary: Migrating this blog from Community Server to BlogEngine.net due to issues with the former's compatibility with IIS 8.0 and SQL Server 2012.
IE9 beta is out, and after giving it a try is not so bad, in fact would be a really good improvement if most of the changes weren't already present on the competitor browsers (either in stable or beta versions).
But one thing that is for sure unique and might interest heavy desktop users is the new Pinned Sites IE9 functionality. Basically allows to pin webpages to the taskbar and implement some interactive features like thumbnails, contextual menus and even overlay icons.
While Kartones.Net is not the best site to fully use this features, I can for sure place some basic shorcuts to the main sections of the site so... I've just done it:
Nothing impressive and done just using the <meta> tags because I didn't wanted to add javascript only for this, but it was really fast and easy to create. Remember that only works on Windows 7 and that you have to first pin the site (for example dragging the tab to the taskbar).
Another small feature to add to the IE webslice and search provider :)
In january 2009 I added Twitter support for Kartones.Net, in two ways:
Recently, Twitter announced that is removing basic authentication for security, leaving only OAuth. As usually happens with this movements, almost no library was using OAuth (because basic auth is so easy to implement) and while OAuth itself is not hard, initially I could only find PHP implementations and not .NET ones.
I tried a few implementations with custom OAuth "helpers" without luck, until Microsoft released the Web Application Toolkit for Social Network APIs. There I could finally find a correctly working OAuth helper to plug into my code (I had already integrated into Community Server all the token and approval flow and a small "Twitter Client").
Without more explanations, I'll just say that our bloggers can go to their profile and authorize this site to post on their behalf (or remove the authorization:
At Twitter's web interface you will find the new "Connection":
And finally the updates will have the correct source setup:
I hope you like this new version (as it is not a new feature), much more secure.
Note: This post is more for the bloggers of Kartones.Net.
First of all, my hosting provider changes its name and gets better facilities and hardware, so I'm getting a free upgrade to Windows Server 2008, SQL Server 2008 and IIS 7. This means that the site should go a bit faster soon (I'm finally getting PHP 5 and MySQL 5 too, although I'm not using them here).
The migration will take place on one of the weekends of december (I don't know yet which one), so keep it in mind just in case the site goes down for some minutes.
Also, I found that the internal web-based post editor doesn't supports Opera or Google Chrome, so I tried to upgrade TinyMCE. Unfortunately, CS2007 comes with support for 2.x, and 3.x has breaking changes, so I'll have to do a real migration instead of a simple override of .js files. In exchange, I'll try to minimize the controls and js needed so t hat post editing loads faster than it does now (it doesn't even uses CSS sprites!).
I plan to make some small improvements to the mobile version too, the stats page is still broken (the Google Analytics part) and I have some more ideas to enhance the community.
Finally, I have a small dumb "proof of concept" project (very similar to a demo in the scope) that might end up being of more general interest than only for my "tests".
This post is a 3x1 because I prefer to not write multiple smaller posts when they are so related.
First, I want to announce a new revision of my CS2007 Addon Pack, 1.4.0. The news are:
And now, the third part of the subject: a bit of caching.
As I've just mentioned, the Related Posts component caches the results for 30 minutes. In fact, the final HTML markup is cached so almost nothing is done server-side, apart from cheching the cache and retrieving the string containing the markup.
So its a per-post cache (the keys are "RELATEDPOSTS_{0}").
This approach works fast as hell, and if you have tons of visits and tons of RAM you'll be good to go. But it is really reusable?
Not really, each post ID is unique for a given post and not used anywhere else. So I made an internal version for this blog community that works differently when managing the cache.
First, as part of my CS optimization, I've created a WeblogPostLite class containing just the critical and minimal fields needed to operate with a post, returned by a new WeblogPost.GetLite() method. I plan to use it in multiple places that do heavy operations with post objecs (but using just few common fields of them), but for now, they provide me 00% serializable and fast objects.
When I search for related posts, I (as in the normal component) get 5 posts of each category (the generic component allows to choose for most viewed or most recent ordering). And here comes the trick: I insert into the cache a List<WeblogPostLite> per blog and per tag (cache key could be "RELATEDPOSTSLITE_{0}_{1}").
This caching means that for a low amount of posts, I use more memory (4-5 fields per "lite" post, up to 5 posts per category, easily 5 or 6 categories per real post,...). But as soon as visits are spread upon multiple posts, benefits start to appear: Any decently used tagging of posts will achieve a great percentage of cache hits. And the amount of memory consumed is not linear (stabilizes, unless you use insane amount of tags).
In my opinion, caching is itself not hard to do, but strategical decisions about how, what and when to optimally cache data. And as usual, is really subjective and different in each scenario.
Note: The related posts search is not perfect, and while it yields nice results most of the time, sometimes it doesn't :) I plan to do "something else" more interesting to actually have the best related results but needs one important change in CS core and, most important, time (my greatest problem, lack of free time!).