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

Tuesday, June 5, 2012 #

Its a pleasure to introduce my first initiative, http://ownabook.org/,  which is live now and is in beta.  Go get in the queue to grab your hardcopy of your favorite book or audio as applicable and when published.

There is no catch.  This site is being built using ASP.NET MVC 3, jQuery and other good stuff.  I will open the source once the beta period is over, and filled with more functionality.

Every month a winner will be selected and couriered the book.   The intent behind this service is to help motivate to keep the reading habits alive.  Though it is never guaranteed the winner will read the book, but, nevertheless, being on the positive note is always a good thing.

Hope you will like the service.



Tuesday, April 17, 2012 #

This is my first blog post on my home domain http://rajeshpillai.tekacademy.com/ and in this series of posts I will explore various facets of JavaScript language that will help us become better programmers.  The idea is tear apart the language and understand how to use the features and build libraries like jquery, knockoutjs, backbonejs.

The idea is not to replicate this libraries, but understand the inner workings using better JavaScript coding practices, design principles and thereby make the web a better place to visit..

We will be covering the following topics, though not in order and there may be addition to this list.

  • Foundations
  • Patterns
  • Closure
  • this keyword
  • Hoisting
  • Anonymous function
  • Currying
  • Server side JavaScript
  • Canvas
  • etc.

Hope you will enjoy this journey with me!  You can directly visit my home URl or wait for posts to be published here.


Thursday, January 19, 2012 #

This is my first post in this new year and was thinking about a topic to write on.  Lately I have been working on varied things that flexes the brain muscles and things which I haven't done before.  So a lot of learning and some unlearning this new year.  One of the big issue which most people faces is learning to learn!.

So, today I will share my experience of how I go about learning a technology,  a skill or anything you want.  The first and foremost thing is the motivation.  This thing is very personal and varies with person to person.  But whatever your preferred way, get motivate to learn something new.

As for me "Necessity is the mother of motivation".  If I need something badly, I need to be motivated to do things to achieve the end goals.  And the way I may find motivation may differ from the way you find.  So, don't bother, find your motivation and stick to it.  Make it a habit.  It will be a bit painful, but will pay in the long term.  (How long, that needs to be fixed by you, as you are the master of your own destiny :)).

Since most of the target audience will be developers, both fresh and experienced, I will outline my take on the subjects which are absolutely must for future proof learning.

What every software developer, project leaders, architects, system support people should know.
1.  Understanding basic operating system, memory management, I/O etc.
2.  Through understanding of Disk IO.  
3.  TCP/IP, HTTP protocol and how it works.
4.  Good understanding of database.
5.  How programming language works?  Build your own toy language in your favorite language if possible.  This may not be production quality, but will involve a lot of learning points.
6.  Thorough understanding of object oriented programming, functional programming.
7.  Client side scripting foundation
8.  Data structures 
9.  Design patterns
10. Foundational maths (not advanced maths)
11. Basic physics (most useful for game programmers and interaction designers).
12.  Economics (will be useful if you need to startup your own venture and understand the demand/supply in the market)


The above list are always taken for granted.  The above items are always ignored by almost 95% of computer science graduates and almost always never revisited by about 99% of developers.

Why?  Because things work, project gets done, even without knowing all these details. But the the problem lies in the solutions you provide without knowing these foundational skills.

These foundational skills are the differentiating factor between you and the next programmer in your cubicle.  These skills providers you with vistas of opportunities to think outside the box and provide efficient solutions.

This is what differentiate between a true programmer and a copy-paste scripter.  So, spend some time learning this.  Get your hands dirty.  Set up your own server, your own webserver, your own proxy server etc.  You will learn a lot and will build up a solid foundation to tackle any thing that comes your way.  It could be WCF, it could be ajax, it could be a NOSQL, jquery  etc..

You will have enough knowledge to know how things work under the hood.  Once you have this knowledge you can contribute back to the community.  Build something that doesn't work in your favorite library.  Blog it.  Sharing is caring and also enriching.

Many of you may think, whats the use of this.  In day to day programming you are never required to know this.  This is what I think is ignorant thinking.  Unless you don't know how things work under the hood, how can you improve it?  How can you extend it?  Think about it for a moment. Once you realize this it will be kind of a-ha moment.

There are some pain in learning the basics.  Its not easy.  It may sound easy theoritically, but when you try to apply it , you may face issues falling from all corners of the world.  That's when you learn the most.  So, don't give up and stick to your learning schedule.

What can you do, once you have these basic foundational skill?

1.  You can build your own DSL for your area of application.
2.  You can build your own client side library extending the one you love.
3.  Your knowledge of WCF will extend the mere configuration and binding.  You may able to diagnose the issue from the root.
4.  You can build a truly RIA once you know how things work under the hood, and then work with your favorite library.

I was trying this approach for the past 4 months in my free time and am very happy with the end result.  Though still I have a long way to go to master all the things required.

For e.g.  in the past couple of months, I have build up the following things.
-  A custom lightweight MVC framework for PHP
-  A mini Activerecord pattern for PHP
-  A jquery grid widget
-  A custom parser for configuration file
-  A two way model binding in JS (similar to knockoutjs) and much more...
-  A small library to inject code in to assemblies using cecil....

One thing to observe here is,  most of the above things are developed in my secondary skill set i.e. PHP, jquery etc and not my primary skills i..e c#, asp.net mvc etc.

I think you got the point.  Once you are on  your way to master the basics, then languages, frameworks doesn't matter.  You can spin your own tools using the language best suited for your environment.

Some of the projects I will be publishing as opensource, once it reaches a feature stable point.

I wish all the very best to all the readers in their journey to learn new things!!

Keep sharing.
  







Tuesday, May 24, 2011 #

For more info refer the below post

 

http://blog.jquery.com/2011/05/12/jquery-1-6-1-released/

 

Some great improvements and fixes.


Friday, March 11, 2011 #

Grab it from here  http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en

There's also an ".iso" available which you can find in the above article.

 


Thursday, February 24, 2011 #

WCF - Automatically create ServiceHost for multiple services

Welcome back readers!  This blog post is about a small tip that may make working with WCF servicehost a bit easier, if you have lots of services and you need to quickly host them for testing.
Recently I was encountered a situation where we were faced to create multiple service host quickly for testing.  Here is the code snippet which is pretty self explanatory.  You can put this code in your service host which in this case is  a console application.

class Program
   
{
       
static void Main(string[] args)
       
{
// Stores all hosts

           
List<ServiceHost> hosts = new List<ServiceHost>();

           
try
           
{
// Get the services element from the serviceModel element in the config file

               
var section = ConfigurationManager.GetSection("system.serviceModel/services") as ServicesSection;
               
if (section != null)
               
{
                   
foreach (ServiceElement element in section.Services)
                   
{
// NOTE : If the assembly is in another namespace, provide a fully qualified name here in the form
// <typename, namespace>
// For e.g. Business.Services.CustomerService, Business.Services

                       
var serviceType = Type.GetType(element.Name); // Get the typeName
                       
var host = new ServiceHost(serviceType);

                       hosts
.Add(host); // Add to the host collection
                       host
.Open(); // Open the host
                   
}
               
}

               
Console.ReadLine();
           
}
           
catch (Exception e)
           
{
               
Console.WriteLine(e.Message);
               
Console.ReadLine();
           
}
           
finally
           
{
               
foreach (ServiceHost host in hosts)
               
{
                   
if (host.State == CommunicationState.Opened)
                   
{
                       host
.Close();
                   
}
                   
else
                   
{
                       host
.Abort();
                   
}
               
}
           
}
       
}
   
}

I hope you find this useful.  You can make this as a windows service if required.


Thursday, August 26, 2010 #

  
Another cool vector drawing JavaScript Library. Introducing Raphelhttp://raphaeljs.com/.  Seems promising (Added to my R&D todo list :)).

 


Sunday, June 27, 2010 #

jQuery fundametal online book  is available at http://www.rebeccamurphey.com/jqfundamentals/book/release/html/

Enjoy :)

 


Monday, June 21, 2010 #

Many times in the Career advice section at http://www.dotnetfunda.com/advices/ we are asked this question

What are the essential skills for a web developer? 

Rather than posting/reposting time and again, thought of writing a post about it.  This post details what according to me and some of the well established people I know think about essential skills that a web developer should posses.

You can find similar entry at Essential Skills for Web Developer in 2010

  1. HTTP/TCP protocol from a very high overview perspective
  2. JavaScript/CSS/XHTML
  3. ASP.NET of-course (since you will be opting for MS technologies)
  4. Authentication/ Authorization techniques
  5. WCF/Web Services
  6. AJAX
  7. jQuery (and similar javascript libraries like Prototype, ExtJS etc.)
  8. Unit Testing / Integration Testing (NUnit, MBUnit, Selenium, WatiN etc or VS Test)
  9. Silverlight awareness
  10. Common design patterns
  11. Strong Object Oriented skills

Happy Programming !!!

 


Thursday, June 17, 2010 #

What did you learn today?

Everyday teaches you something, some lesson or the other. Some day you learn a new language, a new skill or a new hobby or visit some new place, learn music, have a different dining experience, learn swimming, make some good friends, get in touch with some old friend etc. etc…. Each of these things teaches you something…

So, what did you learn today? Some of the learnings from my past weeks are outlined below…

  • Respect others. Don’t underestimate them. (Though I never consciously do so)
  • Be careful with your words because words have different meanings if the context is not clear.
  • Spend some time for your personal stuff and allow others do so.
  • Every individual is different, their skills different, their thoughts are different, their perceptions are different. So, be polite.
  • Time management. (This is a tough skill to master). At the end of the day I keep looking for more time so may be you.

So, again What did you learn today? This reflection is important because if you don’t know what you are learning at every stage in your life, then your are not learning and not growing. In short you are not living. Learning is not memorization but it is self realization…..

Happy learning!!!

 


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.

Certain things in life needs periodic repairs and maintenance. To cite some examples , your CAR, your HOUSE, your personal laptop/desktop, your health etc.

Likewise there are certain other things in professional life that requires repair/ maintenance /or some kind of polishing, so that you always stay on top of it. But they are not always obvious. Some of them are

- Improving your communication skills
- Increasing your vocabulary
- Upgrading your technical skills
- Pursuing your hobby
- Increasing your knowledge/awareness etc… etc…

And then there are certain things that we are always short of…. one is TIME.

We all know TIME is one of the most precious things in life and yet we all are very miserable at managing it. Remember you can only manage it and not control it. You can only control which you own or which you create. In theory time is infinite. So, there should be abundant of it. But remember one thing, you know this, it’s not reversible. Once it has elapsed you cannot live it again. Think over it.

So, how do find that golden 25th hour every day.

To find the 25th hour you need to reflect back on your current daily activities. Analyze them and see where you are spending most of your time and is it really important. Even the 8 hours that you spent in the office, is it spent fruitfully. At the end of the day is the 8 precious hour that you spent was worth it. Just reflect back on your activities. Did you learn something? If yes did you make a point to NOTE IT. If you didn’t NOTED it then was the time you spent really worth it. Just ponder over it.

Some calculations of your daily activities where most of the time is spent. Let’s start (in no particular order though)

- Sleep (6.5 hours) [Remember you only require 6 good hours of sleep every day]. Some may thing it is 8, but it’s a myth.
  o To achive 6 hours of sleep and be in good health you can practice 15 minutes of daily meditation. So effectively you can    round it to 6.5 hours.
- Morning chores(2 hours) : Some may need to prepare breakfast and all other things.
- Office commuting (avg. to and fro 3 hours)
- Office Work (avg 9.5 hours)

Total Hours: 21 hours effective time which is spent irrespective of what you do. There may be some variations here and there.

Still you have 3 hours EXTRA. Where do these 3 hours go?

If you can find it, then you may get that golden 25th hour out of these 3 hours. Let’s discount 2 hours for contingencies, still you have 1 hour with you.

If you can’t find it then you are living a direction less life.

As you can see, the 25th Hour lies within the 24 hours of the day. It’s upto each one of us to find and make use of it.

Now what can you do with that 25th hour i.e. 1 hour extra of your life. Imagine the possibility.

Again some calculations

1 hour daily * 30 days = 30 hours every month
30 hours pm * 12 month = 360 hours every year.

360 hours every year seems very promising. Let’s add some contingencies, say, let’s be optimistic and say 50 % contingency.

Still you have 180 hours every year. That leaves with 30 minutes every day of extra time. That’s hell a lot of time, if you could manage it.

These may sound like a high talk [yes, it is, unless you apply these simple rules and rationalize your everyday living and stop procrastinating].

NOTE: I haven’t taken weekend, holidays and leaves into account. So, that leaves us with a lot of buffer time. You can meet family friends, relatives, other tasks, and yet have these 180 pure hours of joy every year. Do whatever you want to do with it.

So, how important is this 180 hours per year to you? Just think over it. You may use it the way you like

- 50 hours [pursue your hobby like drawing, crafting, learn dance, learn juggling, learn swimming, travelling hmm.. anything you like doing and you didn’t had time to do it.]
- 30 hours you can learn a new programming language or technology (i.e. you can get comfortable with it)
- 50 hours [improve existing skills]
- 20 hours [improve you communication skill]. Do some light reading.
- 30 hours [YOU DECIDE WHAT TO DO]?

So, if you had done this for one year you would have learnt a new programming language, upgraded existing skills, improved you communication etc..

If you had done this for two years.. imagine the level of personal development or growth which you may have attained…..

If you had done this for three years….. NOW I think I don’t need to mention this…

So, you still have TIME, as they say TIME is infinite. So, make judicious use of this precious thing. And never ever comeback saying “I don’t have time”. So, if you are RICH in TIME, everything else will be automatically taken care of, as those things may just be a byproduct of how you spend your time…

So, happy TIMING your TIME everyday.


Thursday, June 10, 2010 #

Welcome Readers!,

 I am starting out a new series on ASP.NET  MVC skill building which will be posted over the next couple of weeks.  Let me know your thoughts on the content, which I have planned and a couple of them has been taken from ASP.NET MVC2 Cookbook. (NOTE: Only the heading has been taken, the content will be not :)).   Do let me know what you would like to see, or any additional inputs or ideas to cover in this topics.  The 30 steps are oultined below for quick reference.  Will start filling this out quickly.

 Outlined is the ‘30’ step to master ASP.NET MVC.

  1. A Peek Into Model
    1. What is a model?
    2. Different types of model
    3. Presentation/ViewModel
    4. Model Mapping (AutoMapper)

 

  1. A Peak into View
    1. How view works in ASP.NET MVC?
    2. View Engine Design
    3. Custom View Engine
    4. View Best Practices
    5. Templated Helpers
    6. Partial Views

 

  1. A Peak into Controller
    1. Introduction
    2. Controller Design
    3. Controller Best Practices
    4. Asynchronous Controller
    5. Custom Action Result
    6. Action Filters
    7. Controller Factory to use with IOC

 

  1. Routes
    1. Explanation
    2. Routes from the database
    3. Routes from XML
    4. More complex routing

 

  1. Master Pages
    1. Basics
    2. Setting Master Page Dynamically

 

  1. Working with data in the view
    1. Repeating Views
    2. Array of check boxes
    3. Array of radio buttons
    4. Paged data
    5. CRUD
    6. Client side action
    7. Confirmation Dialog (modal window)
    8. jqGrid

 

  1. Working with Forms

 

  1. Validation
    1. Model Validation with DataAnnotations
    2. Using the xVal validation framework
    3. Client side validation with jQuery Validation
    4. Fluent Validation
    5. Model Binders

 

  1. Templating
    1. Create strongly typed helper using T4
    2. Custom View Templates with T4
    3. Create custom MVC project template using T4

 

  1. IOC
    1. AutoFac
    2. Ninject
    3. Unity Application

 

  1. Areas

 

  1. jQuery, Ajax and jQuery Plugins

 

  1. State Maintenance
    1. Application State
    2. User state
    3. Cookies
    4. Webfarm

 

  1. Error Handling
    1. View error handling
    2. Controller error handling
    3. ELMAH (Error Logging Modules and Handlers)

 

  1. Authentication and Authorization
    1. User Registration form
    2. SignOn Process
    3. Password Reminder
    4. Membership and Roles
    5. Windows authentication
    6. Restricting access to all pages
    7. Restricting access to selected pages
    8. Restricting access to pages by role
    9. Restricting access to a controller
    10. Restricting access to selected area

 

  1. Profiles and Themes
    1. Using Profiles
    2. Inheriting a Profile
    3. Migrating an anonymous profile
    4. Creating custom themes
    5. Using themes
    6. User personalized themes

 

  1. Configuration
    1. Adding custom application settings in web.config
    2. Displaying custom error messages
    3. Accessing other web.config configuration elements
    4. Adding custom configuration elements to web.config
    5. Encrypting web.config sections

 

  1. Tracing, Debugging and Logging

 

  1. Caching
    1. Caching a whole page
    2. Caching pages based on route details
    3. Caching pages based on browser type and version
    4. Caching pages based custom strings
    5. Caching partial pages
    6. Caching application data
    7. Object Caching
    8. Using Microsoft Velocity
    9. Using MemCache
    10. Using AppFabric cache

 

  1. Localization

 

  1. HTTP Handlers and Modules

 

  1. Security
    1. XSS/CSRF
    2. AnitForgery
    3. Encoding

 

  1. HtmlHelpers
    1. Strongly typed helpers
    2. Writing custom helpers

 

  1. Repository Pattern (Data access)

 

  1. WF/WCF

 

  1. Unit Testing

 

  1. Mocking Framework

 

  1. Integration Testing

 

  1. Load / Performance Testing

 

  1. Deployment

 

 Once again let me know your thoughts on this.

 

  Till then, Enjoy MVC'ing!!!

 

 

 

 

 


Saturday, May 22, 2010 #

I usually love doing TDD and am moving towards understanding BDD (Behaviour Driven Development).  My learnings are documented in the form of an article at CodeProject.

The URL is http://www.codeproject.com/KB/architecture/BddWithSpecFlow.aspx

I will keep this updated as and when I learn a couple of more things.

Hope you like it.

Cheers !!!

 


Friday, May 21, 2010 #

Its been long due I was planning to write an article on creating some useful ASP.NET MVC application. I have code named it "DailyJournal". Its a simple application which allows creation of multiple activities and assign tasks to these activities. Its' kind of "Yet another Task/Todo application".

The credentials which you can use with the attached demo application is shown below.

 

Collapse Copy Code
User Name : admin 
Password   : admin123

Framework/Libraries Used

  • ASP.NET MVC
  • jQuery + jQuery UI (for ajax and UI)
  • ELMAH for Error logging

Warning Ahead

This is just a rough draft and so I am putting down some of the known limitation.
Some points of warning before we move further with this application. This is just an early prototype. As such many of the design principles have been ignored. But, I try to cover that up in the next update once I get my head around this.

The application in its current state supports the following features

  • Create users
  • Assign Activities to users
  • Assign tasks to activities
  • Assign a status to a task

The user creation/authentication is being done by the default Membership provider. Most of the activities are highly visual i.e. you can drag-drop task to different areas, in-place edition of task details and so on.

 

The following are the current issues with the design which I promise to refactor in the second version.

  • No Validations
  • Fat Controller
  • XSS/CSS vulnerable
  • No Service model/abstraction yet. For the demo LINQ to SQL is implemented.
  • No separation of layers
  • UI Design
  • et el...

This is just an extract.  For source code and more information proceed to

http://www.codeproject.com/KB/aspnet/mvcinaction.aspx

Hope you like this!


Monday, March 29, 2010 #

Going through a VS 2010 IDE Features.  We will explore each feature in subsequent posts.  The post are documented as being reviewed by me.
 
  • Breakpoint Labeling
  • Breakpoint Searching
  • Breakpoint Import/Export
  • Dynamic Data Tooling
  • WPF Tree Visualizer
  • Call Hierarchy
  • Improved WPF Tooling
  • Historical Debugging
  • Mini-Dump Debugging
  • Quick Search
  • Better Multi-Monitor Support
  • Highlight References
  • Parallel Stacks Window
  • Parallel Tasks Window
  • Document Map Margin
  • Generate from Usage
  • Concurrency Profiler
  • Inline Call Tree
  • Extensible Test Runner
  • MVC Tooling
  • Web Deploy
  • JQuery IntelliSense
  • SharePoint Tooling
  • HTML Snippets
  • Web.config Transformation
  • ClickOnce Enhancements for MS Office

 

 
VS is an editor as well as a platform for development and this is only more true with VS 2010.  As an editor there is improved forcus on writing code, understanding code, navigating and publishing code.
 
VS Shell has been completely rewritten using WPF extending huge benefits.  The start page has been rewritten using XAML, so it is easy to customize.
 
Support new support for Silverlight, MFC, F# , Azure and extended support for Office 2010, Sharepoint.
 
Has a good Extension Manager as well.
 
Enjoy Coding !!!