<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Firoz Ansari's Weblog</title><link>http://weblogs.asp.net/firoz/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Released - TinySQL v2.0 Code Generator</title><link>http://weblogs.asp.net/firoz/archive/2008/04/04/released-tinysql-v2-0-code-generator.aspx</link><pubDate>Sat, 05 Apr 2008 00:26:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6066709</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=6066709</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2008/04/04/released-tinysql-v2-0-code-generator.aspx#comments</comments><description>&lt;p&gt;I just released TinySQL code generator v2.0 with few bug fixes and a
new feature of using separator tag for loop statement. You can now use &lt;strong&gt;{sap}{/sap}&lt;/strong&gt; tags to place your separators inside loop.&lt;/p&gt;
&lt;p&gt;Here is the example of using {sap}{/sap} tags in TinySQL template:&lt;br&gt;
&lt;code&gt;** Generate Data Provider: Update/v2.0&lt;br&gt;
CREATE PROCEDURE [dbo].[usp_Update$table]{loop}&lt;br&gt;
	@$field = $sp_type{sap},{/sap}{/loop}&lt;br&gt;
AS&lt;br&gt;
BEGIN&lt;br&gt;
UPDATE dbo.$table WITH (ROWLOCK)&lt;br&gt;
SET {loop}$field = @$field{sap},{/sap}&lt;br&gt;
	{/loop}&lt;br&gt;
WHERE --TODO&lt;br&gt;
RETURN -1&lt;br&gt;
END&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And generated code from above template will be like:&lt;br&gt;
&lt;code&gt;CREATE PROCEDURE [dbo].[usp_UpdateAction]&lt;br&gt;
	@Id = NUMERIC,&lt;br&gt;
	@Action = VARCHAR(250),&lt;br&gt;
	@ProjectId = NUMERIC,&lt;br&gt;
	@IsNextAction = BIT,&lt;br&gt;
	@IsWaitingFor = BIT,&lt;br&gt;
	@WaitingForNotes = VARCHAR(1000),&lt;br&gt;
	@RemindOn = DATETIME,&lt;br&gt;
	@IsDefer = BIT,&lt;br&gt;
	@DeferDate = DATETIME,&lt;br&gt;
	@IsDone = BIT,&lt;br&gt;
	@Sequence = INT&lt;br&gt;
AS&lt;br&gt;
BEGIN&lt;br&gt;
UPDATE dbo.Action WITH (ROWLOCK)&lt;br&gt;
SET Id = @Id,&lt;br&gt;
	Action = @Action,&lt;br&gt;
	ProjectId = @ProjectId,&lt;br&gt;
	IsNextAction = @IsNextAction,&lt;br&gt;
	IsWaitingFor = @IsWaitingFor,&lt;br&gt;
	WaitingForNotes = @WaitingForNotes,&lt;br&gt;
	RemindOn = @RemindOn,&lt;br&gt;
	IsDefer = @IsDefer,&lt;br&gt;
	DeferDate = @DeferDate,&lt;br&gt;
	IsDone = @IsDone,&lt;br&gt;
	Sequence = @Sequence&lt;br&gt;
WHERE --TODO&lt;br&gt;
RETURN -1&lt;br&gt;
END&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download:&lt;/strong&gt; &lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=tinysql"&gt;TinySQL v2.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also read my previous blog to learn more about TinySQL tool.&lt;br&gt;
&lt;a href="http://www.firozansari.com/2007/09/13/tinysql-code-generator/"&gt;TinySQL Code Generator&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope you will find this tool useful.
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6066709" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/firoz/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/firoz/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://weblogs.asp.net/firoz/archive/tags/Code+Generator/default.aspx">Code Generator</category></item><item><title>TinySQL Code Generator</title><link>http://weblogs.asp.net/firoz/archive/2007/09/13/tinysql-code-generator.aspx</link><pubDate>Thu, 13 Sep 2007 20:38:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3854210</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=3854210</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2007/09/13/tinysql-code-generator.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;TinySQL&lt;/strong&gt; is small and handy SQL script which can
quickly generate consistent code snippet that you can paste in your
project. It basically operates by reading schema of provided table and
applying template to each column of table in order to generate code
snippet.&lt;/p&gt;

&lt;p&gt;With &lt;b&gt;TinySQL&lt;/b&gt;, you can create complete or specific portion of
business class, business service, or data access layer. You can also
generate repetitive code snippet like storing all DataReader columns
into respective property of business object, or passing all object
properties to SqlParameter in data access layer, or creating stored
procedures for a table or creating simple update or insert statement in
stored procedure etc.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;TinySQL &lt;/b&gt;is part of my daily development practice. I am using early
version of TinySQL for 2 years now and found myself more productive
with this tool. I usually keep SQL Management Studio open (like most
Microsoft application developers) all the time with a dedicated query
pane for TinySQL. Whenever I need to write any repetitive code based on
schema of any table, I simply provide table name, tweak template per my
requirement and execute the script. I then copy and paste generated
code in my project. Yes, I do require making minor changes sometime in
generated code to make it usable in my project but still TinySQL serves
its purpose.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;TinySQL &lt;/b&gt;is definitely not a replacement of sophisticated code
generation tools like CodeSmith, TierDeveloper, LLBLGen etc. Those
tools are very advance and can generate code for whole project
including user interface, business layer, data access layers and even
store procedures. TinySQL can only generate basic code snippet that you
can use in your existing code or project.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Download Link:&lt;/b&gt; &lt;a href="http://www.firoz.name/wp-content/uploads/2007/09/TinySQL.txt" id="p123" mce_href="http://www.firoz.name/wp-content/uploads/2007/09/TinySQL.txt"&gt;TinySQL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implementation of TinySQL is very simple and straight forward. It
reads schema definition of all columns of provided table and template;
it then render code by rotating loop for each column. Variable you have
to take care in TinySQL are:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;@TableName:&lt;/b&gt; table name for which you want to generate code&lt;br&gt;
&lt;b&gt;@PrintTableName:&lt;/b&gt; how above table name should display in
generated code. You may have table “tblCategories” but you want
“Category” for class name.&lt;br&gt;
&lt;b&gt;@Template:&lt;/b&gt; Template for generated code&lt;/p&gt;

&lt;p&gt;Open TinySQL in SQL Management Studio, provide table name and
template, press F5 to execute TinySQL and you will have generated code
in result pane. Now you just have to copy generated code from result
pane and paste in your project.&lt;/p&gt;

&lt;p&gt;To make customization of template more flexible, I have used few
tags as placeholder for rendering respective entity. These tags are:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$table    : Table name&lt;br&gt;
$field    : Column Name&lt;br&gt;
$type     : .NET Data Type&lt;br&gt;
$default  : .NET Default Value&lt;br&gt;
$sp_type  : SQL Data Type&lt;br&gt;
$length   : Column Max Length&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{loop}    : Start Loop&lt;br&gt;
{/loop}   : End Loop&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Suppose I want to generate snippet which has list of all columns of provided table. So value of TinySQL variables will be:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SET @TableName = 'tblCategory'&lt;br&gt;
SET @PrintTableName = 'Category'&lt;br&gt;
SET @Template = '&lt;br&gt;
** generate simple column list /v1.0&lt;br&gt;
$table: {loop}$field, {/loop}&lt;br&gt;
'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will generate code something like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Category: Id, Language, ParentId, Name, SafeName, Right, Left, IsEnabled, DisplayOrder, Color,&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; first line of template is comment portion which can be
used as template description, author, template version, additional
comment etc.&lt;/p&gt;

&lt;p&gt;You can play with TinySQL to explorer more about this tool.&lt;/p&gt;

&lt;p&gt;Ok, so here are some practical examples of templates which explain the basic usage of TinySQL:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;1. Listing all fields of provided table.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$table Fields:&lt;br&gt;
{loop}$field,&lt;br&gt;
{/loop}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This template will generate list of field in separate lines.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2. Creating Simple SELECT statement:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT {loop}$field, {/loop}&lt;br&gt;
FROM $table&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As I mentioned before, you may require minor modification sometime
in generated code to use it in your project. Like in above case, you
have to manual remove last comma from SELECT.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;3. Creating UPDATE statement&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;UPDATE $table&lt;br&gt;
SET {loop}$field = @$field,&lt;br&gt;
{/loop}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Again, you require removing last comma from generated code.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;4. Creating Update Stored Procedure:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;** generate Data Provider: Update/v1.0&lt;br&gt;
CREATE PROCEDURE [dbo].[usp_Update$table]{loop}&lt;br&gt;
	@$field = $sp_type,{/loop}&lt;br&gt;
AS&lt;br&gt;
BEGIN&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;	&lt;code&gt;UPDATE dbo.$table WITH (ROWLOCK)&lt;br&gt;
	SET {loop}&lt;br&gt;
		$field = @$field,{/loop}&lt;br&gt;
	WHERE --TODO&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;	&lt;code&gt;RETURN -1&lt;br&gt;
END&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;5. Creating simple insert statement:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;** generate simple insert statement/v1.0&lt;br&gt;
INSERT INTO $table ({loop}[$field],{/loop}&lt;br&gt;
VALUES ({loop}@$field,{/loop}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;6. Now, let’s use TinySQL to generate code snippet in C# (or
VB.NET) which assign entity values to respective parameters of stored
procedure.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;** generate Data Provider: Update Function/v1.0&lt;br&gt;
SqlDatabase database = new SqlDatabase(this._connectionString);&lt;br&gt;
DbCommand commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "dbo.$table_Update", _useStoredProcedure);&lt;br&gt;
{loop}database.AddInParameter(commandWrapper, "@$field", DbType.$type, entity.$field );&lt;br&gt;
{/loop}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;7. And as last example, here is template to generate business entity in C#.&lt;/b&gt;&lt;/p&gt;

&lt;code&gt;** generate basic business entity/v1.0&amp;lt;br&amp;gt;&lt;br&gt;#region Using Directives&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;using System;&amp;lt;br&amp;gt;&lt;br&gt;using System.ComponentModel;&amp;lt;br&amp;gt;&lt;br&gt;using System.Collections;&amp;lt;br&amp;gt;&lt;br&gt;using System.Xml.Serialization;&amp;lt;br&amp;gt;&lt;br&gt;using System.Runtime.Serialization;&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;#endregion&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;namespace MyNameSpace.Entities&amp;lt;br&amp;gt;&lt;br&gt;{&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&amp;lt;summary&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// An object representation of the “$table” table.&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&amp;lt;/summary&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Serializable, DataObject]&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class $table&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region Variable Declarations&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{loop}&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private $type _$field;{/loop}&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion Variable Declarations&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region Constructors&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public $table()&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; {loop}_$field = $default;&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{/loop}&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;p&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region Properties&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{loop}&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public $type $field&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this._$field;&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._$field = value;&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{/loop}&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&amp;lt;br&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;lt;br&amp;gt;&lt;br&gt;}&lt;/code&gt;

&lt;p&gt;Like last example, you can even create complete business service or data access layer using TinySQL.&lt;/p&gt;

&lt;p&gt;I hope you will find this tool useful. Please post your comment and feedback &lt;a href="http://www.firoz.name/2007/09/13/tinysql-code-generator/" mce_href="http://www.firoz.name/2007/09/13/tinysql-code-generator/"&gt;here&lt;/a&gt;.
&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3854210" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/firoz/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/firoz/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://weblogs.asp.net/firoz/archive/tags/Code+Generator/default.aspx">Code Generator</category><category domain="http://weblogs.asp.net/firoz/archive/tags/General+Software+Development/default.aspx">General Software Development</category></item><item><title>Launch Announcement: DOTENET (Digg Clone)</title><link>http://weblogs.asp.net/firoz/archive/2007/03/17/launch-announcement-dotenet-digg-clone.aspx</link><pubDate>Sun, 18 Mar 2007 06:46:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2052627</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=2052627</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2007/03/17/launch-announcement-dotenet-digg-clone.aspx#comments</comments><description>&lt;p&gt;Its give me immense pleasure to announcement .NET portal - &lt;a href="http://www.dotenet.com"&gt;DOTENET&lt;/a&gt; (URL: www.dotenet.com). It&amp;rsquo;s &amp;quot;Digg&amp;quot; style web application dedicated to .NET and relative technologies. This portal will serve as central hub to share articles, tutorials, blog post etc.

&lt;/p&gt;&lt;p&gt;When I was planning to create this portal two months back, I was sure that first release of this project will have minimum &amp;quot;must to have&amp;quot; features and later I will add features which are &amp;quot;good to have&amp;quot;. And that&amp;rsquo;s why you will notice many blank pages on this portal. These blank pages are place-holder for features which I will add in coming weeks (depending upon available bandwidth).
 
&lt;/p&gt;&lt;p&gt;The desired goal of creating a community portal cannot be achieved without your active participation. Please register yourself to this portal and share any article or post which you think useful to .NET community. If you find any existing link useful in DOTNET portal, please vote for that link so that link can be push to popular segment.

&lt;/p&gt;&lt;p&gt;As you continue participating in this portal, please keep in mind that this community portal needs your feedback to remain alive. Please provide your feedback/opinion/suggestion to my blog (URL: &lt;a href="http://www.firoz.name/2007/03/18/announcement-dotenet/"&gt;Announcement: DOTENET&lt;/a&gt;)

&lt;/p&gt;&lt;p&gt;URL: &lt;a href="http://www.dotenet.com"&gt;Home Page&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;URL: &lt;a href="http://www.dotenet.com/register"&gt;Registration Page&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2052627" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/firoz/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/firoz/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/firoz/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/firoz/archive/tags/Community+Portals/default.aspx">Community Portals</category><category domain="http://weblogs.asp.net/firoz/archive/tags/VB.NET/default.aspx">VB.NET</category><category domain="http://weblogs.asp.net/firoz/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Vulnerable JavaScript Comments</title><link>http://weblogs.asp.net/firoz/archive/2006/05/26/Vulnerable-JavaScript-Comments.aspx</link><pubDate>Fri, 26 May 2006 12:10:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:449252</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=449252</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/05/26/Vulnerable-JavaScript-Comments.aspx#comments</comments><description>&lt;P&gt;Today while checking balance in my banker’s web portal, which is self acclaimed as one of the most secured online banking portal of India, I curiously thought of inspecting their HTML content using View Source. But I really shocked (and I almost got heart attack) to see whole bunch of JavaScript comment placed all over their pages. Most interesting thing was that these JavaScript snippets not only tell you bug numbers, who have done those modifications, on which date, but also what was the actual issue and how they have resolved that issue. &lt;IMG class=wp-smiley alt=:) src="http://www.firoz.name/wp-includes/images/smilies/icon_smile.gif"&gt; &lt;/P&gt;
&lt;P&gt;The most interesting part was:&lt;BR&gt;&lt;CODE&gt;&amp;lt;script language="JavaScript1.2"&amp;gt;&lt;BR&gt;function alert_keycode(){&lt;BR&gt;/*&lt;BR&gt;Abhilash. &lt;/P&gt;
&lt;P&gt;This script was added bcze on pressing enter key on pwd field used to get Submittted but since the Command Action invoked was diff one that of OK button, it was not producing desired results. The solution was create a temp hidden field and changing Pwd field name to that of Ok button dynamically, assigning tmp-hidden field name/value with original Pwd Field name/value. &lt;/P&gt;
&lt;P&gt;And submit is invoked&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;frm = document.confirmFrm;&lt;BR&gt;if(event.keyCode==13)&lt;BR&gt;{&lt;BR&gt;blah blah blah&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I love this “detailed” and technically well explained comment provided by developer in HTML code.&lt;/P&gt;
&lt;P&gt;On serious note, I never prefer to put these JavaScript comments in my code as you can realize from comments like these, it might give lead to reveal any vulnerability or security hole in application. Even if you don’t want to consider the increase of payload of page because of these JavaScript comment but still putting comments with all kind technical or business explanations is major security risk to your application. &lt;I&gt;Don’t do that!&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;IMO, these code comments are for developer and not for user. My suggestion to all web developers to use server side comments instead of any client side comment specially if you are developing application for financial institutions etc.&lt;/P&gt;
&lt;P&gt;What is your opinion if I modify above code like this:&lt;BR&gt;&lt;CODE&gt;&amp;lt;script language="JavaScript1.2"&amp;gt;&lt;BR&gt;function alert_keycode(){&lt;BR&gt;&lt;B&gt;&amp;lt;%&lt;/B&gt;&lt;BR&gt;/*Abhilash. &lt;/P&gt;
&lt;P&gt;This script was added bcze on pressing enter key on pwd field used to get Submittted but since the Command Action invoked was diff one that of OK button, it was not producing desired results. The solution was create a temp hidden field and changing Pwd field name to that of Ok button dynamically, assigning tmp-hidden field name/value with original Pwd Field name/value.&lt;BR&gt;And submit is invoked&lt;BR&gt;*/&lt;BR&gt;&lt;B&gt;%&amp;gt;&lt;/B&gt;&lt;BR&gt;frm = document.confirmFrm;&lt;BR&gt;if(event.keyCode==13)&lt;BR&gt;{&lt;BR&gt;blah blah blah&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I guess later one is more secured than the original one. Do you agree with me?? &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Please provide your comment here:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://www.firoz.name/2006/05/26/vulnerable-javascript-comments/"&gt;http://www.firoz.name/2006/05/26/vulnerable-javascript-comments/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=449252" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/firoz/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Great collection of ASP.NET/C# Posters!</title><link>http://weblogs.asp.net/firoz/archive/2006/05/15/446505.aspx</link><pubDate>Mon, 15 May 2006 17:45:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:446505</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=446505</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/05/15/446505.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.bbd.co.za/"&gt;Barone, Budge &amp;amp; Dominick&lt;/a&gt; has great collection of posters relating to ASP.NET, C#, Design Patterns, Software Process etc. &lt;a href="http://www.drp.co.za/default.asp?id=technologies/content_technologies_a"&gt;Here&lt;/a&gt; is the link to these postors. Just check out this first:&lt;/p&gt; &lt;p&gt;&lt;a title="Permanent Link to Great collection of ASP.NET/C# Posters!" href="http://www.firoz.name/2006/05/15/great-collection-of-aspnetc-posters/" rel="bookmark"&gt;Great collection of ASP.NET/C# Posters!&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=446505" width="1" height="1"&gt;</description></item><item><title>Google Trends - .NET, ASP.NET, C#, VB.NET</title><link>http://weblogs.asp.net/firoz/archive/2006/05/14/446361.aspx</link><pubDate>Sun, 14 May 2006 10:45:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:446361</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=446361</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/05/14/446361.aspx#comments</comments><description>&lt;p&gt;I was just exploring &lt;a href="http://www.google.com/trends"&gt;Google Trends&lt;/a&gt; and I have found a very interesting search pattern for .NET, ASP.NET, C#, VB.NET.&lt;/p&gt; &lt;p&gt;&lt;a title="Permanent Link: Google Trends - .NET, ASP.NET, C#, VB.NET" href="http://www.firoz.name/2006/05/13/google-trends-net-aspnet-c-vbnet/" rel="bookmark"&gt;Google Trends - .NET, ASP.NET, C#, VB.NET&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=446361" width="1" height="1"&gt;</description></item><item><title>Murphy’s Laws of .NET</title><link>http://weblogs.asp.net/firoz/archive/2006/05/07/445491.aspx</link><pubDate>Sun, 07 May 2006 16:52:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:445491</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=445491</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/05/07/445491.aspx#comments</comments><description>&lt;p&gt;&lt;font face="Verdana" size="2"&gt;Here is the Murphy’s Laws of .NET. Its based on my previous experience with .NET. I am sure most of the .Net developers will identify themselves somewhere in these laws.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" color="#0000ff" size="2"&gt;&lt;a title="Permanent Link: Murphy’s Laws of .NET" href="http://www.firoz.name/2006/05/07/murphys-laws-of-net/" rel="bookmark"&gt;Murphy’s Laws of .NET&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;Actually, it should be Firoz’s Laws of .NET. :)&lt;/font&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=445491" width="1" height="1"&gt;</description></item><item><title>Color in Motion</title><link>http://weblogs.asp.net/firoz/archive/2006/01/16/435556.aspx</link><pubDate>Mon, 16 Jan 2006 13:54:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:435556</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=435556</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/01/16/435556.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;Do you know each color has its own personality and attitude? Like, blue color is known for its authority, calmness and confidence and can easily complemented with orange color. Or, red color which is known for it’s ambitious, alert and impatient. Or, yellow color which is known more for aspiration, forgiveness and happiness. &lt;a href="http://www.mariaclaudiacortes.com/"&gt;Claudia Cortés&lt;/a&gt; has created a great movie “&lt;a href="http://www.mariaclaudiacortes.com/colors/Colors.html"&gt;Color In Motion&lt;/a&gt;” starring some major colors. Very nice approach of depicting nature of each colors its communication and symbolism. And what a storyline of this movie!&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;font face="Verdana" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;font face="Verdana" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=435556" width="1" height="1"&gt;</description></item><item><title>Google Advanced Operators (Cheat Sheet)</title><link>http://weblogs.asp.net/firoz/archive/2006/01/15/435514.aspx</link><pubDate>Mon, 16 Jan 2006 04:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:435514</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=435514</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/01/15/435514.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;In continuation of my &lt;A href="http://weblogs.asp.net/firoz/archive/2006/01/15/435418.aspx"&gt;previous&lt;/a&gt; blog, here is another useful cheat sheet.&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.googleguide.com/advanced_operators_reference.html"&gt;Google Advanced Operators (Cheat Sheet)&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;font face="Verdana" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;Take a print out and mount it at your workstation.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=435514" width="1" height="1"&gt;</description></item><item><title>Web Development Cheat Sheets</title><link>http://weblogs.asp.net/firoz/archive/2006/01/15/435418.aspx</link><pubDate>Sun, 15 Jan 2006 09:25:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:435418</guid><dc:creator>firoz.ansari</dc:creator><author>firoz.ansari</author><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/firoz/rsscomments.aspx?PostID=435418</wfw:commentRss><comments>http://weblogs.asp.net/firoz/archive/2006/01/15/435418.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.ilovejackdaniels.com/misc/about-ilovejackdaniels/"&gt;Dave Child&lt;/a&gt; has written some great cheat sheets which really a good reference for me as ASP.NET developer.&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;Here is the list of some cheat sheets:&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.ilovejackdaniels.com/article/javascript-cheat-sheet/"&gt;JavaScript Cheat Sheet&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.ilovejackdaniels.com/article/css-cheat-sheet/"&gt;CSS Cheat Sheet&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.ilovejackdaniels.com/article/html-character-entities-cheat-sheet/"&gt;HTML Character Entities Cheat Sheet&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://www.ilovejackdaniels.com/article/mysql-cheat-sheet/"&gt;MySQL Cheat Sheet&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;It’s really helpful to me.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=435418" width="1" height="1"&gt;</description></item></channel></rss>