KISS, Worse is better !!
by chintan prajapati on Dec.04, 2008, under ASP.net, Google

- Image by machado17 via Flickr
Kiss !! no its not that its kiss principle,
means Keep It Simple, Stupid (KISS)
which says that design simplicity should be a key goal and unnecessary complexity should be avoided. It serves as a useful principle in a wide array of disciplines, mainly in software development, because sometimes we end up building something stupid and complex software which is no way usable by actual user and there’s no way we back to redesign whole stuff.
some people also describe it as “Keep It Sweet & Simple”, “Keep It Short & Simple”, and “Keep It Super-Simple”.
New Jersey style

- Image by nickwheeleroz via Flickr
Worse is better, also called the New Jersey style was conceived by Richard P. Gabriel to describe the dynamics of software acceptance but it has broader application. The phrase is a play on words representing the concept that “quality” is relative. Because of this, something can be “inferior” but still “better”.
For example, to a particular market or user, software that is limited but exceptionally simple to use may be “better” than software that is more comprehensive but harder to use.
You Ain’t Gonna Need It (YAGNI)
In software engineering, YAGNI, short for ‘You Ain’t Gonna Need It’, suggests to programmers that they should not add functionality until it is necessary. Ron Jeffries writes, “Always implement things when you actually need them, never when you just foresee that you need them.
Don’t repeat yourself (DRY)
particularly in computing. The philosophy emphasizes that information should not be duplicated, because duplication increases the difficulty of change, may decrease clarity, and leads to opportunities for inconsistency. When the DRY principle is applied successfully, a modification of any single element of a system does not change other logically-unrelated elements. Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync.
Asp.net MVC vs WebForms -Advantage disadvantage
by chintan prajapati on Nov.27, 2008, under ASP.net
Asp.net MVC seems very easy but it’s not because we are used to Webforms.. MVC’s got lots of advantage over Normal Webform style.
- does Postback (which adds unnecessary more than 20 kb of javascript )
- has Viewstate (performance issue)
- has to go through whole page life cycle
- Uses Event based model
which are stuffs built by microsoft guys to simplify development for VB 6 User which are really not required to make a great site, although i appreciate those thing because it helps in rapid development.
Where As Asp.net MVC is
- RESTful architecture
- Doesn’t Compromise with Performance and flexibility
- Search Engine Friendly
- Provides full control over application
drowback of RESTful architecture of ASP.net MVC
- Any public method in a controller is exposed as a controller action. You need to be careful about this. This means that any public method contained in a controller can be invoked by anyone with access to the Internet by entering the right URL into a browser. e.g. wwwxyz.com/shop/delete/10 will delete shop with ID 10.
Here are few KB articles & resources that you should not miss
http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework
http://en.wikipedia.org/wiki/Representational_State_Transfer
http://www.asp.net/learn/mvc-videos/
More detail on REST http://www.xfront.com/REST-Web-Services.html
How REST works? -> http://www.intertwingly.net/wiki/pie/RestAspNetExample
Download beta MVC framework http://www.microsoft.com/downloads/details.aspx?FamilyId=A24D1E00-CD35-4F66-BAA0-2362BDDE0766&displaylang=en
Feel free to comment if any doubt
testing twitter tools
by chintan prajapati on Nov.26, 2008, under Twitts
just installed twitter tools on wordpress
now onward all the new post will be tweeted automatically
check it out if you have blog http://alexking.org/projects/wordpress
thanks alex king
Share Point server (MOSS) is fun
by chintan prajapati on Oct.03, 2008, under ASP.net
after watching this video it seems share point is really fun.
The SharePoint Song
For beginners nice presentation on share point webpart..
installation of MOSS
Problem with Sql Parameter which uses IN Keyword with single quote in @parameter
by chintan prajapati on Sep.08, 2008, under ASP.net
it took plenty of time for me to search below article in google.. may be i didn’t get proper keywords to search solution.
http://bytes.com/forum/thread257290.html
here’s solution .. which u can find in above article
DECLARE @codes NVARCHAR(100)
SET @codes = ‘G01,G02′
SELECT * FROM tbRules
WHERE CHARINDEX(rule_code, @codes) > 0
returns the same result set as
SELECT * FROM tbRules
WHERE rule_code IN (’G01′, ‘G02′)
actually above trick is helpful when implementing
lucene search
tags: Sql Server, IN keyword Problem,single quote, “‘”,Lucene.net
enable disable validation group Client Side using Javascript in asp.net
by chintan prajapati on Mar.10, 2008, under ASP.net, Javascript, ValidationGroup
Recently i faced problem in validating Address Control which basically depends on selection of radio button.below is the figure of problem.

Here All controls below Gift to this Address Radiobutton should not fire validation if it is not checked. Asp.net Simply does all validation and shows all errormessage even if Gift to this Address is not selected, so all you have to do is create validation group for left address block called “ADDRESS” by assigning ValidationGroup Property value of “ADDRESS”.
Put this code for Button named “Done”
OnClientClick=”EnableDisableValidation();”
javascript function EnableDisableValidation() looks like below.
function EnableDisableValidation()
{
if($L(’rdbMyAddress’).checked)
{
return Page_ClientValidate(’Address’);
}
else if($L(’rdbAddressGift’).checked)
{
if( Page_ClientValidate())
{ return true;}
else
{ return false;}
}
}
Where $L is replacement of document.getElementById(”);
Page_ClientValidate(’Address’) function Validates All Control having property ValidationGroup =”Address”.
Where as Page_ClientValidate() Blindly validates all validation Controls within page.
I hope now you are clear with idea of customized validation control.
i can share more code with you if still not clear.
feel free to put your comments ![]()
happy codding ![]()
Search engine with a touch of humor.
by chintan prajapati on Jan.16, 2008, under Google, yahoo
Ms. Dewey is a
cool interactive search engine. What you see, in the totally flash
based website, is a smart lady Ms Dewey. She prompts you to enter few
keywords in the search box and if you linger she gets impatient and
teases you, with “hellooo, type something here..” kind of sentences.
She will speak on various keywords in her own style. Use the best of
button to see some of the best expressions which will make you smile
atleast once. It is funniest search engine I ever saw. Unfortunately
they haven’t mentioned the contact details of the lady ![]()
Is SQL Mail and Database Mail supported in sql server 2005 express?
by chintan prajapati on Dec.05, 2007, under Sql Server 2005
Answer is No.
Few days before I was trying to send database mail via sql server 2005 Express with SP2.BUt it didn’t Work.
as Procedure [dbo].[sp_send_dbmail] requires a Parameter @profile_name which is of datatype sysname .
@profile_name sysname = NULL,
@profile_name can be found in table sysmail_profile( select * from sysmail_profile)
but Procedure is not accepting default ProfileName ‘DBMailProfile’
and After a little bit of google i found below article.
http://msdn2.microsoft.com/en-us/library/ms165636.aspx
which clearly says that
SQL Server 2005 Features Not Supported in SQL Server Express
The following table lists the additional SQL Server 2005 database features that are not supported in this version of SQL Server Express. It also lists database features from previous versions of SQL Server that are not supported.
| SQL Server 2005 features not supported in SQL Server Express | SQL Server features from previous versions not supported in SQL Server Express |
|---|---|
| Database mirroring | SQL Mail |
| Online restore | Fail-over clustering |
| Database snapshot | Distributed partitioned views |
| Parallel index operations | VIA protocol support |
| Mirrored media sets | Log shipping |
| Partitioning | Parallel DBCC |
| Address Windowing Extensions (AWE) | Parallel Create Index |
| Hot-add memory | Enhanced Read Ahead and Scan |
| Native HTTP SOAP access | Indexed views (materialized views) |
| SQL Mail and Database Mail | Partitioned views |
| Online Index Operations | |
| SQL Server Agent and SQL Server Agent Service |
Thanks.
Fetch Contacts From yahoo using asp.net and c#
by chintan prajapati on Oct.31, 2007, under ASP.net, C#, yahoo
From last many days i was searching for a free script for yahoo contacts importer.. but its freely available only for PHP.
so finally i got a blog post(http://gnillydev.blogspot.com/2007/10/yahoo-contact-import-class-in-c.html) having code to fetch contacts from yahoo. i had implemented it in our project as well i had uploaded it on my website.
You can check this example here
Download Source Code (Asp.net 2.0 , C#)
All Vb.net User can convert their code here
ScreenShot:

If any one having such script for Gmail Please leave a comment.
Please go through all comments for before raising question.
Firebug For IE realesed bye DebugBar
by chintan prajapati on Oct.25, 2007, under ASP.net
good news for all web developers is that now thay can debug javascript with a tool called Companion.JS Developed by http://www.debugbar.com
Download executable @ http://www.my-debugbar.com/wiki/CompanionJS/HomePage
Companion.JS (pronounced Companion dot JS or CJS) is a Javascript debugger for IE.
The current version is 0.2, adding the following features to IE :
- Detailled javascript error reporting (call stack and real file name where the error occured).
- “Firebug”-like Console API feature.
- Javascript console feature useful to inspect javascript objects at runtime.
- A toolbar icon to open the Companion.JS panel.
Here are some screenshots :

Detailled Error reporting
In the top-left corner the notifying panel which pops-up when an
error occurs in the current page if the Companion.JS panel is not open.
At the bottom of the page…

Console API feature







![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=15428a2c-c1e3-43a5-8bee-4aec2175ed3d)