Rajesh Pillai

My experiments with asp.net mvc, jquery, wpf, silverlight, sharepoint, tdd and design patterns.

  Home  |   Contact  |   Syndication    |   Login
  44 Posts | 2 Stories | 36 Comments | 0 Trackbacks

News

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

business

November 2009 Entries

MVP in Action - Unit Test Read the post here..geekswithblogs.net/ra... Synopsis This is in continuation to the article geekswithblogs.net/rajeshpi... This post will deal with writing simple unit test case for the "User" user creation use case we covered in the above blog post. Background Unit testing means testing a piece of code or a method. White unit testing we need to stub or fake out external dependencies so that the test can ......

Just published an article on MVP Pattern in action. You can read it here geekswithblogs.net/rajeshpi... Extract... This edition of blog post deals with a simple example of MVP pattern in action. Model View Presenter is a UI pattern which separates the presentation concerns with the presentation logic. There are three elements to it Model - This is the data or business object View - The User interface dealing with displaying data. It routes user commands to the presenter. ......

Here's a quick notes from the TDD session which I conducted some time back. Introduction Writing test before writing production code. Design as you go along. Follow Red-Green-Refactor paradigm Benefits Spot design flow early. Test before the production code is built. Identify poort requirements or requirement gaps. Reduced testing time. The test forms the functional document for your code. Quickly identify bugs. Reduces the cost of bugs in the long run. Low level regression test suite. Road blocks ......

c# 4.0 Part 1 The following are some of the new features and few interesting things you can do with c# 4.0. - Named and Optional Parameters - ExpandoObject - Interface with Python (and example) Program 1 class Program { // Optional parameters should be at the end static void PrintMessage(string name = "World", string greeting = "Hello") { Console.WriteLine("{0} {1}", greeting, name); } static void Main (string[] args) { PrintMessage("World", "Hello"); // prints "Hello World" PrintMessage(greeting:"Good... ......

ASP.NET 4 Setting Client IDs Another most wanted feature of asp.net 4 is the ability control client ID generation. At least I am happy with this. With prior version of asp.net it was always difficult control the control id generation though not impossible. Why is this important? If you can control ID generation then the markup size may dramatially reduce which may result in improved performance. The gain may around 15% reduction in terms of markup size in case of complicated nested pages. The new ......

ASP.NET 4 Permanently Redirecting a page You may have faced this problem of moving pages in a web applications around which can leat to an accumulation of state links in search engines. Traditionally developers have handled requests to old URL's by using Response.Redirect method to forward request to new URL. However as you may be aware of the Redirect method issues an HTTP 302 Found status (temporary redirect) response , which results in an extra HTTP round trip to the server when users attempt ......

ASP.NET 4.0 State Compression Session state compression was always a worry in the past. With asp.net 4.0 this feature is built into the framework. Just modify your web.config with the following changes and you are ready to go. Now there will be less data travelling through the wire. <sessionState mode="SqlServer" sqlConnectionString="data source=dbserver;Initial Catalog=aspnetstate" allowCustomSqlDatabase="true" compressionEnabled="true" /> Just add the "compressionEnabled="true" to sessionState ......

Application Architecture Consideration The following is the topics that we have to be good at as part of our understanding about "Application Architecture". I am noting these points as it crosses my mind. Will need to add more depth to these points. - Performance - Reliability - Availability - Security - Modifiability - Portability - Functionality - Extensibility - Interoperability - Usability - Maintainability - Efficiecy - Reusability - Ease of Deployment - Rollback strategy - Configuration Management ......

Career/Skill Path Each individual is playing different roles. Some are software engineer, some are programmer, tech lead, architect, project manager and so on… How would your skill to develop over a period of time so that you can take the next step and will prove to be true to your designation. Here are some of the check list… Check what skills you have and develop the one which you don’t currently possess. It’s not just about superficial skill, but true skill I am talking about. Don’t go over the ......

c# 3.0 : Partial Method You are all aware of “Partial Class” introduced in .net 2.0. Partial class is useful in situation where you need to split the definition of a class, struct or an interface over two or more source files. Each source file contains a section of the type or method definition and all parts are combined when the application is compiled. There are several situations when splitting a class definition is desirable: When working on large projects, spreading a class over separate files ......

Just to give you a background to all those who newly following this post,we will be publishing materials of this kind every week to gain some insight into upcoming technologies, to understand current technology better, to know more about the latest development processes, best practices, build up foundational skills, RIA, certifications etc. etc. The intent is very clear. To get out of the routine work mode and build something for ourselves, because the more the stronger we become in these said areas ......

Reposting this from my personal blog as this may be useful to few readers here as well. Personal Development : Time, Planning , Repairs & Maintenance These are just my thoughts, but some you may find something interesting in it. Please think over it. We may know many things, but still we always keeps procrastinating it. I have written this as I have heard many people coming back and saying they don’t have time to do things they like. These are my thoughts buy may be useful to someone else too. ......

Prototype This time we will have a basic prototype ready for the public website. The design will be kept simple so that we could concentrate on the main task at hand. Later on we will enable theming,so that the user could customize the blog to their heart's content. The landing page looks like in the figure below. Create a "Blog" folder under the "Views" folder in the website. Add an aspx and copy the below markup and name it "List.aspx". <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Sha... ......

Tag Cloud Here's a quick snippet to create a tag cloud for your blog or cms application.. Very rudimentary but may be useful for someone. <div id="TagList"> <h2 class="TagHeader">Tags&l... <% var tags = ViewData["Tags"] as List<Tag>; if (null != tags) { foreach (Tag tag in tags) {%> <% double font_size = (double)(tag.TagCount + 1) * 0.5; if (font_size > 2) font_size = 2; %> <%= Html.ActionLink(tag.TagText, "Tags", "Course", new { id = tag.Id }, new { style ......

Welcome back. This time we will look at creating a simple jquery pager plugin to use with asp.net mvc project. Please note the intent is to learn the basics of jquery plugin development. The control as such is not recommended for use in production environment. I recommend having a look at the jQuery Authoring Guideline at docs.jquery.com/Plugins/Aut... Let's begin our journey into the mystery of jquery plugin. The first step is to create a self executing anonymous function. Anonymous functions ......

Welcome to the 2nd series of building a blog engine. In the first part we have laid out the foundation for this application and modeled the DB structure for quick mockup. You can read the first part here lets-build-a-simple-blog-en... One thing I missed to mentioned in the first part is the we will be using the excellent ELMAH for error logging. This is a pretty cool module which hooks up to the system and logs all exceptions without writing a single line of code. You can read more ......

Welcome to eBoard Hello and welcome to this series of application development using asp.net mvc, jquery, automapper, ninject. Though the world doesn't need another blog engine, but sometimes reinventing the wheel teaches you many unknown things and it's the learning experinece that counts more than anything else. I have been using asp.net mvc + jquery for about a year now. So, it's time to put down something which will help the beginner with this technologies get a good graps of the fundamentals ......

Let's try a simple in-place edit with jquery. For demonstration purpose I am using the plain old HTML file. However, if you, wish you could apply the same technique to asp.net, asp.net mvc or php or any other web application as well. Here is the html that we will be using for the demo. <body> <div style="line-height:3xm;back... Double Click the below paragraph to edit. </div> </br></br> <div class="edit"> Lorem ipsum dolor sit amet, consectetur ......

This typical problem is almost faced by all new developer working with asp.net. This behaviour is by design as ASP.NET tries to be efficient in storing sessions for users. Remember unless you store anything in session the session id value keep changing. If you want to tell ASP.NET that you want it to track user sessions, you can do one of 2 things: Store something in the session. Simple handle the Session_Start event in your GLobal.asax. The presence of this method will tell ASP.NET to track sessions ......

This edition of blog tip shows you how to focus a text input on a page to the desired element. Use jsbin.com for executing/troubleshooting or just for learning jquery or any other popular js framework that it supports. I'll show two ways to do this based on the scenarios you encounter. Using jQuery $(selector).focus method when the DOM is ready: // When the HTML DOM is ready $(function() { $("#elementId").focus(); }); The above works in most cases but may be annoying in situations you have a slow ......

I am typically starting this blog with the "Hello World" kind of post.  Just to give an brief summary to the curious out there this blog will be a place where I will be putting down my experience with technologies specifically asp.net mvc, jquery, sql server, sharepoint, tdd, design patterns et el.

Also, I plan to record my learnings with developing an asp.net mvc project.