Geeks With Blogs
Rajesh Pillai My experiments with mvc, jquery, wpf, silverlight, sharepoint, tdd and design patterns. November 2009 Entries
Summary of MVP in Action - Unit Testing
MVP in Action - Unit Test Read the post Synopsis This is in continuation to the article 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 ......

Posted On Monday, November 30, 2009 5:31 PM

MVP Pattern in action
Just published an article on MVP Pattern in action. You can read it here 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. ......

Posted On Sunday, November 29, 2009 5:04 PM

Some notes from my tdd session
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 ......

Posted On Saturday, November 28, 2009 4:47 PM

c# 4.0 Part 1
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... ......

Posted On Saturday, November 28, 2009 4:05 PM

Tip : ASP.NET 4 Setting Client IDs
ASP.NET 4 Setting Client IDs Another most wanted feature of 4 is the ability control client ID generation. At least I am happy with this. With prior version of 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 ......

Posted On Saturday, November 28, 2009 3:46 PM

Tip: ASP.NET 4 Permanently Redirecting a page
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 ......

Posted On Saturday, November 28, 2009 3:16 PM

Tip: ASP.NET 4.0 State Compression
ASP.NET 4.0 State Compression Session state compression was always a worry in the past. With 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 ......

Posted On Saturday, November 28, 2009 3:04 PM

Some thoughts about application architecture
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 ......

Posted On Saturday, November 28, 2009 12:02 PM

How would you like to grow your skill/career path?
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 ......

Posted On Saturday, November 28, 2009 11:49 AM

Tech Tips: C# 3.0 Partial Methods
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 ......

Posted On Saturday, November 28, 2009 11:41 AM

Tech Mastery : Dependency Injection and IOC
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 ......

Posted On Saturday, November 28, 2009 11:06 AM

Personal Development : Time, Planning , Repairs & Maintenance
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. ......

Posted On Saturday, November 28, 2009 10:27 AM

Lets build a simple blog engine - Prototype for Public Site [eboard] - 3
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... ......

Posted On Saturday, November 28, 2009 12:25 AM

Quick and dirty ASP.NET MVC Tag Cloud
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 ......

Posted On Friday, November 27, 2009 9:23 PM

jQuery Receipe : Build a simple pager plugin to use with mvc
Welcome back. This time we will look at creating a simple jquery pager plugin to use with 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 Let's begin our journey into the mystery of jquery plugin. The first step is to create a self executing anonymous function. Anonymous functions ......

Posted On Friday, November 27, 2009 12:41 PM

Lets build a simple blog engine [eboard] - 2
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 ......

Posted On Friday, November 27, 2009 1:47 AM

Lets build a simple blog engine [eboard] - 1
Welcome to eBoard Hello and welcome to this series of application development using 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 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 ......

Posted On Friday, November 27, 2009 12:17 AM

In-Place-Edit with jQuery
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, 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 ......

Posted On Thursday, November 26, 2009 12:54 PM

ASP.NET Session Id getting lost
This typical problem is almost faced by all new developer working with 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 ......

Posted On Wednesday, November 25, 2009 6:25 PM

jQuery Receipe: Focussing a Text Input on Page
This edition of blog tip shows you how to focus a text input on a page to the desired element. Use 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 ......

Posted On Wednesday, November 25, 2009 3:32 PM

Hello World !!!

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 mvc, jquery, sql server, sharepoint, tdd, design patterns et el.

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


Posted On Wednesday, November 25, 2009 3:16 PM

Copyright © Rajesh Pillai | Powered by: | Join free