After adding Facebook “Like” button to my blog I’ve decided to add Google+1 button as well . I guess I am also going social although a little old fashioned with blog.
Again it is very easy to add it with two simple steps:
1. Add the tag to the template in order to appear in every post.
Open ~/themes/MY-BLOG_THEME and edit PostView.ascx by adding following script where appropriate:
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="small" annotation="inline" href="<%=Post.PermaLink %>"></g:plusone>
2. Add google JS at the end of the page.
Open ~/themes/MY-BLOG_THEME and edit site.master and add this at the end:
<!-- Place this render call where appropriate -->
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(po, s);
Please refer to google documentation for more information and to configurator to customize.
Tim Heuer posted a great series of articles targeted a new Silverlight developers. These can be used to ramp up with new things in v3 as well as Silverlight concepts.
Original post here.
Today Microsoft announced that Windows 7 and Windows Server 2008 R2 code is signed off and is ready to go to manufacture – so this will be the code that end user will use.
Even more - partners and business customers can get their hands on Windows 7 RTM code starting next month.
I have been using Windows 7 and Windows Server 2008 R2 since their Beta and I dare to say that this is the fastest OS, I’ve ever worked with. You will like it for sure.
Both client (Windows 7) and server (Windows Server 2008 R2) are full with improvements and for sure these increase both the pleasure and the productivity.
“Office 2010” will be official name of Office 14 and will be ready in “the first half of next year”.
Office 2010 — previously known by the code name "Office 14" — will include slimmed-down versions of Word, Excel, PowerPoint and OneNote that let people create and edit documents in a Web browser. Consumers will have access to a free, ad-supported version, and Capossela said the company is still hammering out what to charge businesses that want a version without ads.
A friend of mine send me link to article in Wikipedia describing Cross-site request forgery attack.
Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF ("sea-surf") or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts. Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser.
This is how the attack is performed:
Note how simple this would be?! And end user won’t see anything – not even image :).
This illustrates why is so important when implementing REST in your services to do only read on GET requests.
As you might noticed this week the site was down. This was due to hosting upgrade to favorite IIS7 and some issues with dasBlog and one of it’s controls. Luckily I was able to fix it and also upgraded to dasBlog v2.2.
Hopefully there won’t be any downtime next… 10 years (next upgrade should be handled nicely :) ) Not like I am planning uptime 5 nines – 99.99999% :)
If you planning your servers’ availability you might want to check how Microsoft.com Ops are doing it by taking a consultation from them for free. Why?! Because these are the results (as of 2005) – just imagine what are now:
- 3 Data Centers
- 1606 Data Center Servers
- 506 Servers in Labs
- 111 Web Sites
- 1069 Databases
- 1000’s of Web Applications
- 80+Gbit/sec Network Traffic
- 13 million unique users/day
- 70 million page views per day
- 10,000 requests/sec, 300 concurrent connection on 80 servers
- 350 Vroots
- 150 million unique client scans/day
- 12,000 ASP.NET requests/sec
- 500K concurrent connections
- 1 Billion Downloads and 750K client installs in 2 weeks (April 2006)
- 4Gbit/sec Web Site Egress (Web Pages Only…No Downloads)
- 20+ Billion Downloads in 2005…Routinely 150M+/Day
Internet Information Services 7.5 (IIS)
The great Internet Information Services (IIS) has it’s v7.5 with following features in Windows Server 2008 R2
- PowerShell provider for IIS 7 has more than 50 new cmdlets
- Administration Pack extensions: Database Manager (SQL Server management within IIS Manager), Configuration Editor (generate scripts with a GUI to automate administrative tasks), IIS Reports, Request Filtering (HTTP filtering, URL rewriting, etc.)
- One-click publishing in Visual Studio 10
- Web Deployment Tool (formerly MS Deploy): Deployment, management, and migration of Web applications, sites, and entire servers
- Configuration Tracing: track configuration changes to IIS and applications
- New performance counters
- .NET support for Server Core
- WebDav integration (was available before as a separate extension)
- URLScan 3.0 integration: restricts the types of HTTP requests (was available before as a separate extension)
- FTP server services: integrated in the IIS administration interface; new .NET XML-based *.config format; virtual host names for FTP sites; improved logging
- Integrated extensions: new kind of extensions that appear to be an integral part of IIS
(via 4sysops.com article)
I had interesting issue today: I was on urge to complete a task when I saw a strange exception – you know – the Murphy's law. It hit at the most inconvenient time. To be even more interesting I’ve deployed my work on two different servers and worked fine.
But on the most important one I got this exception when I tried to hit WCF service:
System.MissingMethodException: Method not found: 'Void System.ServiceModel.Diagnostics.EventLogger.UnsafeLogEvent(System.Diagnostics.TraceEventType, System.ServiceModel.Diagnostics.EventLogCategory, System.ServiceModel.Diagnostics.EventLogEventId, Boolean, System.String)'.
at System.Runtime.CompilerServices.RuntimeHelpers.PrepareDelegate(Delegate d)
at System.AppDomain.add_UnhandledException(UnhandledExceptionEventHandler value)
at System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Very strange… and search engines doesn’t know much about the problem…
Luckily this was not used heavily and I could reinstall .NET Framework 3.5. And this solved the problem.. Now back to more productive things…
You come up with a great HTML layout for data-driven ASP.NET web page which makes perfect sense from business perspective and reveals key indicators while making possible to drilldown into details if needed. This page utilizes DHTML and AJAX calls to improve User eXperience (UX) and overall page looks great until… your database is not filled up and page load time is increasing due to generated HTML size, DHTML is slow due to big DOM tree and users starting to complain about it.
At that point there are several approaches that can be employed to help:
- Rework page layout so only part of data is loaded;
- Download data to the client in XML or JSON format and generate necessary HTML code on client
- Load only those portions that need to be immediately displayed and load others on demand (e.g. like paging)
Let’s explore these options:
Here is no technical challenge here – just business one: you have to sell new layout to existing users/customers and once they liked the initial one this can be really difficult. If you can do that – go ahead. There is nothing wrong with that approach.
Instead of downloading 10 MB HTML code to client’s browser you can generate pure JSON and having a template of HTML just to fill data in the HTML template with simple (or not-so-simple) loop. Good news here is that such feature is coming to ASP.NET AJAX in v4.0. It is called client templates and implements the idea. Here are some resources:
Partially Loading Page
This is also not new concept – load only those parts that should be visible immediately to the user. Traditional paging explores that option although it is not that fancy. If you’re using Google Reader you probably noticed that it loads only visible part of the feed and as you scroll down it keeps loading from the RSS feed.
So here is the idea: having small piece of HTML loaded would ease the browser in rendering HTML DOM tree and you gain performance. As user keeps using the page you keep adding HTML to existing DOM tree by loading it dynamically using AJAX.
Tricky part could be rendering ASP.NET User Control within Web Service so pure HTML can be returned by AJAX. Here are some useful tips:
Utilizing these techniques could improve download time for your web apps and also speed them up because the browser doesn’t need to process whole DOM before give the control to the user. All these can be used together or in any combination as long as it makes sense from business perspective.
Hope this helps!