Creating a JavaScript Object Cache

If you have ever wanted an easy way to cache JavaScript objects and data in your client-side code just like you would when using the ASP.Net's Server side cache then read this article.

Monsur Hossain wrote a JavaScript LRU Cache which my partner found while we were searching for a JavaScript caching option.  As I am a big fan of the ASP.Net AJAX framework and the fact that I was extremely impressed with the feature rich cache written by Monsur, which was fashioned after the ASP.Net's cache. I decided to port the code to an ASP.Net AJAX component. 

ASP.Net AJAX extends JavaScript in some amazing ways which are beyond the scope of this article. However, ASP.Net AJAX does provide a framework to approach JavaScript in a more object oriented fashion.  One such feature of the framework is building classes based on the prototype design pattern which is my goal in porting Monsur's code.  You can find more information about the Least Recently Used caching algorithms at Wikipedia.  And if you are not currently using ASP.Net AJAX or have no plan to implement it I invite you to visit Monsur's site for the original implementation to which a link can be found at the end of this article. 

For those of you who do use ASP.Net AJAX and are looking for a JavaScript Object Cache read on as I describe the porting of the original which I call the JSOCache. More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: joseph
Posted on: 8/21/2008 at 10:22 AM
Tags: ,
Categories: Code Example | Web Development
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

Developer Arsenal Tool #2

This is the second installment of my developer arsenal. Be sure to check out the previous article:

The tool that I will be profiling today is the  IE Developer Toolbar. It has many features that somewhat overlap the features in Nikhil's Web Development Helper.   However, these features are ones that I did not profile in the article about Tool #1.  This is primarily because I usually lean towards the IE Developer Toolbar for the following features:

  • Page Element Selection
  • Element Attribute and Style Information
  • Source View Isolation with CSS
  • Tab Index Identification
  • Ruler and Color Picker

These are the features that we will explore and it is honestly the tip of the iceberg with what this tool offers. More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: joseph
Posted on: 3/7/2008 at 6:45 PM
Tags: , ,
Categories: Developer Tools | Web Development
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

Paying Homage to BlogEngine.Net

I started the year with a resolution to act on a desire that I have had for a long time, which was to start a blog. Being a developer, I had several requirements set for myself:

· I wanted to host the blog myself

· I wanted it to be built on .Net framework (Open Source)

· Of course it had to be theme driven

· And most importantly easily extensible

It didn’t take much research for me to find that my blog engine of choice would be BlogEngine.Net. It met and I know it has the potential to exceed all of my requirements. And amazingly it was so easy to configure. Simply copied the entire thing out to my server hosted at DiscountASP.net and… Voilà!

Yes it was that easy. So thanks Mads Kristensen..

Now to give honorable mention to creators of the theme and extensions that I am using:

Theme

Gluttony - Thanks to Jesse Foster for the reproduction of this theme for BlogEngine.Net

Extensions

Lightbox – Thanks to René Kuss for this extension which automatically wires the page for use with Lightbox which allows one to show images as a page overlay

QuickerLinksAdv – Thanks to ckincincy for this extension which converts words/phrases into predefined links.

SnapLinks - This extension allows for easy implementation of snap.com preview links.  These links let your blog visitor preview external links and many other link types without leaving your site.

These are the extensions that I have currently implemented but there are more.  Check out the others BlogEngine.net extensions.

Windows Live Writer

Even though BlogEngine.net's post editor is great, I would recommend installing Windows Live Writer which greatly enhances your blog writing experience.  Additionally if you are a technical blogger and expect to post code, I would also recommend the Insert Code Snippet plugin for Window Live Writer written by Leo Vildosola.

Happy Blogging!!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: joseph
Posted on: 2/8/2008 at 5:28 PM
Tags: , ,
Categories: Blogging
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

When the ASP.Net Ajax Update Panel does not Work Check xhtmlConformance Mode

So you have used update panels before.  And the same code you may have used in an AJAX enabled website does not work when you put it into a Web Application. 

I struggled with this for several hours before discovering that if you have the following line in your web.config file it breaks ASP.Net AJAX.
<xhtmlConformance mode="Legacy"/>

I have not researched the reason behind this but I plan to do so and will provide an update when I find more information.  Just know that you can comment out this line or change the mode from Legacy and your Update Panel should start working.  Let me hear from you if you know why this breaks ASP.Net AJAX or if removing this config entry does not clear your problem.

UPDATE: 2/5/2008

Found that this config file entry is created when migrating from VS 2003 to VS 2005 and can occur with Web Applications and Websites.  For a deaper understanding Scott Guthrie sheads some insight.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: Joseph
Posted on: 1/31/2008 at 10:16 AM
Tags: ,
Categories: Configuration | Web Development
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

How to modify Reporting Services CSV export Behavior

So you are trying to modify the Reporting Services CSV export behavior.  This article will outline two specific behavior changes:

  • How to turn off exporting of the header record
  • How to change the encoding to ASCII

By default Reporting Services exports a CSV file encoded as Unicode and contains a header record.  Lets start with turning off the header record.

 NOTE: make a backup of any config file prior to making any modifications.

  1. First determine the Instance ID of the Report Server for which you want to make the change.  You can do this by opening the Reporting Services Configuration Manager: All Programs - Microsoft Visual Studio 2005 - Configuration Tools
    Then connect to the appropriate instance.  With server status selected on the left you will see the Instance properties.  The Instance ID will be used in locating the config file which needs to be changed.



  2. Locate and open the rsreportserver.config file with a text editor.  C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\rsreportserver.config 
    Replacing my MSSQL.2 with your Report Server Instance ID.
  3. Locate the config section: <Configuration><Extensions><Render>
  4. Find the <Extension> config entry.
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport, Microsoft.ReportingServices.CsvRendering" /> 
     
     
  5. Extension default behaviors can be modified by making appropriate entries in the device information settings.  So to exclude the header row from the output:
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport, Microsoft.ReportingServices.CsvRendering">
        <DeviceInfo>
            <NoHeader>true</NoHeader>
        </DeviceInfo>
    </Extension>
     
     
  6. So now if you want to also change the encoding to ASCII simple add the Encoding device information setting:
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport, Microsoft.ReportingServices.CsvRendering">
        <DeviceInfo>
            <NoHeader>true</NoHeader>
            <Encoding>ASCII</Encoding>
        </DeviceInfo>
    </Extension>
     
     
  7. Save the file.

There are also other device information settings for the CSV Rendering Extension.  You can change the Field Delimiter, Record Delimiter, change the file Extension and more.  Here are the CSV Device Information Settings.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: joseph
Posted on: 1/29/2008 at 7:45 AM
Tags: ,
Categories: Configuration
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Developer Arsenal Tool #1

The times have changed; with the advent of newer technologies such as AJAX with its partial rendering, a more structured (OO) approach to JavaScript as well as more complicated web page layouts it has become more difficult to evaluate, debug and visualize the results of your development.  That is way I have come to rely on some invaluable tools other than Visual Studio and notepad.  Therefore, I will start my targeted ramblings with a series of articles profiling the tools on which I have come to depend.  The first, and to me the most valuable, is Nikhil’s Web Development Helper.   So how does it help?!

Consider the following debugging and development challenges:

  • JavaScript debugging with full call stack information
  • HTTP logging with JSON format display
  • JavaScript class browser
  • JavaScript Immediate Window

More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: Joseph
Posted on: 1/3/2008 at 6:00 PM
Tags: , , , , , , ,
Categories: Developer Tools | Web Development
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed