Posts

Showing posts from November, 2011

SQL Optimization Tips

• Use views and stored procedures instead of heavy-duty queries. This can reduce network traffic , because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access to table columns they should not see. • Try to use constraints instead of triggers, whenever possible. Constraints are much more efficient than triggers and can boost performance. So, you should use constraints instead of triggers, whenever possible. • Use table variables instead of temporary tables. Table variables require less locking and logging resources than temporary tables, so table variables should be used whenever possible. The table variables are available in SQL Server 2000 only. • Try to use UNION ALL statement instead of UNION, whenever possible. The UNION ALL statement is much faster than UNION, because UNION ALL statemen

Tips to improving ASP.Net application Performance

1. Disable Session State Disable Session State if you're not going to use it. By default it's on. You can actually turn this off for specific pages, instead of for every page: <%@ Page language="VB" Codebehind="WebForm1.aspx.vb" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" EnableSessionState="false" %> You can also disable it across the application in the web.config by setting the   mode value to Off. 2. Output Buffering Take   advantage   of this great feature. Basically batch all of your work on the server, and then run a Response.Flush method to output the data. This avoids chatty back and forth with the server. <%response.buffer=true%> Then use: <%response.flush=true%> 3. Avoid Server-Side Validation Try to avoid server-side validation, use client-side instead. Server-Side will just consume valuable resources on your servers, and cause more chat back and forth. 4. Repe

Custom Error-Pages and 301 redirects

Let´s assume, you´ve just acquired an expired domain and you´ve recognized that there are plenty of back links pointing to a forum, a blog or something like that. Well, the first problem is, that (in most cases) you won´t be able to use that exactly software and you may not use the formerly used content. For SEO-purposes it will be good to 301-redirect the urls that have deep links, because otherwise google may penalize you because of lots of 404-errors. 2nd reason to do this is tousle the link power of all incoming links. The solution: You may use custom 404-pages in IIS. But this one is better, in web.config in system.web just add this section: <customErrors defaultRedirect="404.aspx"                   redirectMode="ResponseRewrite" mode="On">         <error statusCode="404" redirect="404.aspx"/> </customErrors> In my case I´ve added a "404.aspx" where I´m just redirecting via 301-redirect t

DotNetNuke Skin Objects Reference Code

Banner code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="BANNER" Src="~/Admin/Skins/Banner.ascx" %> SkinObject - dnn:BANNER           Code Snippet - < dnn:Banner runat="server" id="dnnBanner"> Description - Displays a random banner ad Breadcrumb code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %> SkinObject - dnn:BREADCRUMB Code Snippet - < dnn:Breadcrumb runat="server" id="dnnBreadcrumb"> Description - Displays the path to the currently selected tab in the form of TabName1 > TabName2 > TabName3 Copyright code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx&quo

Improve DNN’s Page Priority

Improve Dotnetnuke Page Priority DotNetNuke provides a Google-ready XML sitemap to help you get your pages indexed and ranked in Google search results.  Unfortunately, the current implementation sets every page's "priority" ranking to the same fixed value.  Because of this, no page ever gets priority over any other.  Fortunately there's a simple improvement you can make (using Notepad) to give priority to certain pages without changing any core DNN functions... DNN SiteMap As many of you are already aware, DNN provides an XML sitemap feature to help you get your portal(s) indexed on search engines.  An XML sitemap is more search-engine friendly than the easy-to-read (human-friendly) sitemaps.  In fact, the XML sitemap specification is now supported by a number of search engines including Google, Yahoo, MSN, Ask and more.  You'll therefore want to include a link on your website to the XML "SiteMap" even if you already have a separate human-frien

jQuery Tips for DotNetNuke Developers

Image
Make sure you call jQuery.noConflict();. This is necessary to not cause other client scripts and libraries to run errors. This is due to the fact that other client scripts might be using the $ designator for a JavaScript class. [jQuery.noConflict(); documentation] If manually adding jQuery, try to load the jQuery library in the header before all others. Not doing this can lead to the jQuerylibrary not being loaded before another client script or library tries to use it. This is especially true of jQuery plugins. Always call the jQuery core methods using the jQuery() format. This is related to the previous issue. Check the jQuery plugin source code. Not all jQuery plugins use the long form of calling jQuery. This can result in errors if you have called jQuery.noConflict();. In DNN 5+, register jQuery. DNN 5+ allows module developers to register jQuery to be loaded only when modules need it. Just callDotNetNuke.Framework.jQuery.RequestRegistration(). This prevents jQuery f