Profil de M Sheikudooz!PhotosBlogListes Outils Aide

Blog


26 décembre

Humax v0.2

You may aware that I have released version 0.2 of Humax.  In this version, I have implemented the AOP programming support.  As of my actual plan, I have planned to implement the following things also:

·         Asynchronous Programming

·         Packaging script

Though I have implemented the AOP concept two months before, I had no time to write the tutorials, due to my sister marriage.  It took two weeks to complete the tutorial section for Humax v0.2.  I had planned to provide lot of pictorial representation in the tutorial section, but the time did not allow me further.

The version 0.2, by the grace of God, has received massive response.  I would like to do benchmarking a web application which uses Humax AOP against normal class-hierarchy model.

I invite people to give their positive and negative feedbacks on Humax.  The main objective of Humax is yet to achieve, to make Humax as an enterprise web framework in very near feature.

I invite people to create new design patterns and best practices based on Humax.  With your support, I will try to provide best on Humax.

Happy Web.

31 juillet

Humax and JavaScript

I’ve started to think on writing a new framework for client side web development after writing series of articles on JavaScript in Web 2.0.  The intention is to break barrier between the client and server side integration.

Numerous mature technologies/concepts are available under commercial or GPL to provide seamless integration between JavaScript and server side technology.  And of course, these tools have features for developing rich internet applications.

The justifications for developing Humax framework are:

·         A framework which enables you to develop RIA applications in a simple and elegant way.

·         Minimal learning curve.

·         Minimal integration means that it simplifies and tries to provide a unified platform for developing web applications.

The primary difference I’ve focused are the necessary level of abstraction and programmatic approach as like you are working in .NET and Java form application development.

I shall update the roadmap and feedback/feature list later.

I was started the development in end-June 2007 and because of the other stuffs in my leisure time did not allow me to release this as early.

You can download the version 0.1 beta from http://sourceforge.net/projects/humax

Tools of the Trade

I would like to share the tools I have used for the development of Humax v0.1.

Aptana IDE

Though it is not a visual editor, I am using this IDE for writing client side script even for my other works also.  The code profile and dynamic type redefinition features of this IDE provide you full-fledged intelli-sense in JavaScript file.  The JavaScript file skeleton window enables you to manage and navigate the JavaScript files more easily.  It supports JSDoc, provides tooltip syntax for your class and normal HTML/JavaScript elements.

What else you want?  I do not find any other IDE like this in the case of JavaScript.

JSDoc

This tool generates javadoc-style documentation from well-formed JavaScript source files.  It is my favorite document generation tool for JavaScript and I have used this for Humax API reference documentation.

JsUnit and scriptaculous-js

I was bit confused which tool I need to use for unit testing.  In early days of development, I was used “scriptaculous-js”.  It is very simple and does not require more settings to start write and test the “unit test”.  And after a while I am also started using JsUnit. 

20 juillet

Microsoft Real World SOA Kit

Yesterday I have received the “Real World SOA” kit from Microsoft India.  The kit was covered by a cute blue with orange color bordered box with the caption “Microsoft presents Real World SOA – SOA that leverages your existing IT infrastructure”.

After opening the box, I saw a letter from Karun Thareja, Sr. Product Manager in Microsoft India regarding the specialty of the kit.  The kit contains two white papers, one leaflet about BizTalk 2006 and one “Understanding SOA with Web Services” book.

It was surprised for me that other than the above the kit does not contain trial or demo software, feature products leaflet.  The letter by Karun Thareja conveys a clear message that Microsoft is seriously thinking about your IT infrastructure for SOA and of course the feature of its products.

I started to read the whitepaper on “Enabling Real World SOA through the Microsoft Platform”.  Though it was published on December 2006, it briefly explains SOA, its important and the line of products from Microsoft for SOA.  I was pretty impressed the way the whitepaper started.   I’ve read lot of SOA papers from various companies, some of them are not clear about SOA even though they have released tools for SOA.  Some of them presenting SOA in such a way to show it as a complex one as like as rocket science.  This white paper explains SOA and its benefits in a simple manner and helping the people to know where to start and how to start their SOA implementation.  One fine thing I’ve found that Microsoft  recommends to start SOA implementation with “Middle out” strategy with one business need at a time, instead of going with “Top-down” or “Bottom-up” approach.

I am yet to read another one whitepaper “Understanding BizTalk Server 2006” by David Chapell – Chappell & Associates at August 2005.  But hope that it will be good.

Finally, without any explanation, everybody knows the major intention of this kit is “Microsoft BizTalk”.  Why not?

28 mai

Discipline in Object Orientation – [JavaScript – The Platform for Web 2.0 Part III]

As per our "Anything on…" slogan, there are numerous ways we can define properties and methods for a class. This flexibility is more helpful in the implementation of bulky script animation, drag n drop, etc. But for a normal UI validation and business entity manipulation we have to follow a discipline. This will enable us to maintain and enhance a JavaScript code in long-time manner.

Firstly, let us see the different ways to define a class.

Object Declaration

Way 1

See the code snippet 1.

function Point(x, y)

{

this.x = x;

this.y = y;

this.toString = function(){return "(" + this.x + "," + this.y + ")";}

}

var point = new Point(10, 5);

alert(point.toString()); //shows (10,5)

Code Snippet 1

Figure 1 explains the nature of this approach.

A class named "Point" is defined with two properties (x and y) and a method "toString()". All the definitions are bundled within "Point" constructor. But technically, there are two issues with this approach; both make this approach as not optimal:

  • Each instance of Point class will have its own copy of members (x, y and 'toString()'). It is feasible for "field" declarations, but harmful for "method" declaration. Each instances has their own copy of code for "toString()".
  • The arguments of above constructor (x and y) are global to all members. Yes, toString() can access the arguments "x" and "y". Is it optimal?

Way 2

As we know that "new" operator in JavaScript enables us to create instance of a class. The function followed by "new" means that it acts as a constructor for the class. The declaration and initialization are happened in the same place as like code snippet 1. Also, JavaScript does the more work. The lifecycle of an object creation is depicted in figure 2.

  1. Point class is declared and defined.
  2. An object of Point is created.
  3. JavaScript, creates "prototype" object with "constructor" property refers the Point constructor and add this as a property of point instance.
  4. If we defined Point as specified in code snippet 2, all the prototype specific members are initialized and added to point instance's prototype member.

In figure 2, upto point 3, there is no different between way 1 and way 2. After instantiating Point with "new", JavaScript add an object "prototype" to the instance "point" as property. By default, "prototype" object has a property named "constructor". Whenever, prorotype is initiated, it assigns the corresponding object's constructor function to its "constructor" property.

If we define the Point class properties and methods in its prototype object, then it can be sharable. That is, each instance has separate "property" values and share same function point. See code snippet 2.

Point = function(x, y)

{

this.x = x;

this.y = y;

};                 

        

Point.prototype.toString = function()

{

return "(" + this.x + "," + this.y + ")";

}

Code Snippet 2

We can refactor code snippet 2 to create more discipline in the next article.

21 mai

JavaScript – The Platform for Web 2.0 – Part II

The next feature in JavaScript nowadays acts a protocol between web client and server. We know that there are two types of web development technologies available in the market.

  1. Pure server side technology. (ASP.NET, Servlet)
  2. Mixed mode technology. (PHP)

The first one raises necessary level of abstraction between client and server side processing. Second one mixed with actual HTML page. Both have pros and cons. Most consumers wants the first one because of its abstraction and separation between UI rendering and UI processing. And it allows us to do object-design. Also, it provides more flexibility to interact with business services of a particular application.

How do the client and this server side talks with each other? Till pre-Ajax, we did by passing a string of HTML/CSV/Plain text/XML. The more general and gentle approach is XML. But based on customer's SLA (Service Level Agreement), the developers selected the feasible one. In any approach, we need a to and fro converter on both server and client. In server, the result of a process (generally business entities or value objects) is converted to anyone of the above approach. In client, based on the approach we need to write JavaScript code to parse these values. We cannot fully say this approach is MVC's (Model-View-Controller) baby because the OO is missing here.

Then now, is there any Ajax implementation to resolve this? Solution is available. But it is not an invention of Ajax. It is a feature of JavaScript. What is that?

In JavaScript specification, it is called as object literals.

Let us take one example. NJS Shopper is an online application for a grocery shop. After a customer placed list of items and paid online, the system finally shows him what are all items he ordered and price for these. The application server returns these information as a business entity named "OrderDetails". The figure 1 shows the details of this entity.

Figure 1

I am not going to explain the business details of the above. Before going further on how can we implement a protocol to speak both server and client in "object" context, let us see what Object Literals is?

Object Literals

We can create a JavaScript object (again object, not class) using object literals. All the members of an object can be declared as name-value pair with color separated. Each members are separated by commas and enclosed within {} as like arrays. For example,

var orderDetails = {orderID:19092, customerName:"Sheik", netAmount:2184.00};

Unlike C++/C#/Java, in JavaScript, we can create an object without any class declaration. One more proof of "Anything can be defined…" slogan.

Now think that, instead of passing HTML, XML or plain text from server to client, we can create object literals at server side and send it to client. Then, JavaScript can process the object literals. At server side, we have to write a converter for the above entity to JavaScript object literals. For example, here I've written a very basic server side code snippet for OrderDetails excluding orders field in ASP.NET 2.0.

StringBuilder orderDetailsBuilder = new StringBuilder();

 

orderDetailsBuilder.Append("{");

orderDetailsBuilder.AppendFormat("orderID:'{0}', customerName:'{1}', netAmount:{2}}}",

orderDetails.OrderID, orderDetails.CustomerName, orderDetails.NetAmount);

Response.Write(orderDetailsBuilder.ToString());

Response.End();

Caution: In .NET, using reflection we can generate object literals more general and in abstract manner. The above code snippet is just for example.

The following code snippet shows that how to handle the returned object.

var asyncReq = new ActiveXObject("Msxml2.XMLHTTP");

asyncReq.onreadystatechange = function()

{

    if (asyncReq.readyState == 4)

    {

        if (asyncReq.status == 200)

        {

          var resultString = asyncReq.responseText;

          var orderDetails = eval("(" + resultString +")");

          alert("Customer: " + orderDetails.customerName +

              " Order ID: " + orderDetails.orderID +

              " Net Amount: " + orderDetails.netAmount);

         }

    }

};

asyncReq.open("GET", "Default.aspx?a1=od", true);

asyncReq.send(null);

In AJAX period, this is called as JSON – JavaScript On Notation, a best protocol for server to client transmission.

15 mai

JavaScript – Platform for Web 2.0

I was excluded JavaScript in the "Web 2.0 basic things" intentionally, because JavaScript is the only choice for every web pages. But most of us know and/or use half the feature of JavaScript. JavaScript has more than these.  Lot of frameworks which target Web 2.0 and applications utilize these smart features. I would like to share some of these features which make JavaScript as a platform for Web 2.0 applications.

If you know these, please have a look and share your knowledge.

Before getting into these, keep the following statement in your mind about JavaScript:

"Anything can be defined within the context of anything and assigned it to anything".

Confused?

Let's take an example, you can define a class from a function and enumerate its properties as array elements. And, you can treat an array as a object, function as data, etc. The following sections briefs about this.

Lamda Functions

Lamda functions are unnamed functions which can be assigned to a variable like assigning an expression. This is more or less similar to functional programming style. See the following example:

var square = function(x){return x*x;}    

alert(square(2)); // returns 2 * 2 = 4  

Code Snippet 1  

The square is actually a variable on which the function reference with the above signature has been assigned.

What is the difference between normal named functions and lamda functions?

Let us see the below code snippets:

var square = function(x){return x*x;}    

function twoSquare(square)

{

    return square * 2;

 

alert(twoSquare(square(3))); // returns 9 * 2 = 18

Code Snippet 2

In the above example, the lamda function "square" is passed as argument to "twoSquare" function as function reference. See the body of "twoSquare". It treats the function "square" as a variable.

Also, you can assign or treat lamda function to object property and array element. The developers of "C" family can enjoy this feature.

The lamda function simulates the C++ or C# style class declaration when creating a class. See the Code Snippet 3.

function Customer(title, firstName)

{

    this.title = title;

    this.firstName = firstName;

    this.getName = function(){return this.title + " " + this.firstName.toUpperCase();}

}

 

var amid = new Customer("Mr","Amid");

alert(amid.getName()); // returns Mr AMID

 Code Snippet 3

 In code snippet 3, a class Customer has been defined. In this getName is a lamda function. Remember, getName is variable to the function reference.

Let us see other features in succeeding articles.

30 avril

Things behind Web 2.0

Recently, I had read an article about Web 2.0.  In this article, the author defined a formula for Web 2.0, which is

AJAX + SOA + OSS = Web 2.0

AJAX = Asynchronous JavaScript and XML

SOA = Service Oriented Architecture

OSS = Open Source Software

I am ok with the above formula, except for the open source software bit.  Note that I am not against OSS, but inspired by.NET and Java technologies.  I agree that OSS provides common ground for everybody to build applications/frameworks in a quick and efficient manner.  However, commercial software (closed source software) is not at any point inferior to OSS.  Also, they are so reliable and scalable.  Okay, that’s a separate story.  From my point of view, we should consider the industry standard specifications and technologies.

What are the things that make the difference between Web (1.0!) and Web 2.0?

Web 2.0 is more about the changes in usability or interactivity of web than technologies, because there is no new technology or protocols for Web 2.0.  The paradigm shift happened only due to proper usage XmlHttpRequest and SOAP.  Both these have been existing in the field since the late 90s.  I have used XmlHttpRequest object for displaying “Please wait…” progress indication message in web sites in the pre-ajax period. In these periods, most of us developed web services with an object-orientation mind set.

Examples of differences are:

Web 1.0

Web 2.0

Personal web sites

Blogs

Groups

Social Networking

Encyclopedia Britannica

Wikipedia

--

Syndication

Additionally, web services make things better and interoperable.

Here, I’ve shown my first level basic list of technologies behind Web 2.0.

  1. XmlHttpRequest 
  2.  SOAP
  3. Patterns and models for Web 2.0 application

Surprised?

We can use the term AJAX, by XmlHttpRequest with some design models and patterns.  Otherwise, people in this ajax world will shoot us.

Okay, let us explore more about the first two points before getting into the world AJAX in succeeding articles.

23 avril

Emerging Web 2.0

Hope everybody has seen the term “Rich Internet Application”, simply RIA and Web 2.0 in any of the computing technology web sites.  Google initiated the second revolution of web and it has impacted everybody in the computing world.  We all know about the dot com revolution in 2000 period.  With immature web development technologies and low speed internet connections, the revolution was a major flop and it made everyone to think seriously about web based solutions.  Limited Internet consumerism was one more factor.  At that time nobody was interested in using the Internet for purposes other than email and surfing.

Then ASP (Application Service Provider) arrived.   No one was ready to think out of their corporate walls.  The technology was one reason for that.  At that time, web technologies providers did not think of security beyond encrypted authentication mechanisms.  And also, CxOs thought of “Enterprise” aspects only within their UNIX box.

Almost all major players closed their web shops and provided only web development products.  Their Internet ideas were used within Intranet environment. 

The Internet backbone technologies have now matured and people are enjoying high-speed broadband Internet connections.  After that, technologies piled up in companies with garbage restored and refreshed.  Though Yahoo! initiated the actual game, Google has made the biggest impression on this.  They successfully converted Internet-challenged software applications into simple and powerful web apps.  GMail and Google Map are some examples.  Google Search is still surviving as the world’s number one search engine because of its right level of software and hardware combination for their search engine.

Microsoft had recognized this area a little bit later and started to think seriously about its Live platform and also how to breathe new life into its Windows and Internet platforms.

O’Reilly, in 2004, coined the term “Web 2.0” based on technologies from various players especially Google and Wiki.  But some do not agree to the versioning of Web.  They argued that Web 2.0 is a buzzword.  However most Internet players thought that they need that term to define and organize current emerging technologies under one roof.

What is Web 2.0?

What does Web 2.0 really mean and what are all the technologies behind Web 2.0?  Tim O’Reilly tried to define the term in his article “Web 2.0 - Design Patterns and Business Models for the Next Generation of Software”.  The Web 2.0 Expo pointed out some approaches proposed by some web products such as YouOS, G.ho.st, Nokia smart phone widgets and Google PowerPoint.  And it also pointed out some technologies such as Vidoop’s new authentication technology and IBM dashboard.

But people are still confused about Web 2.0.  Everybody agreed that AJAX is the core model (Note that it is a pattern not a technology) for Web 2.0 and broadband Internet connection is the basic backbone for this.  Notable other aspects are blogs and web syndication.  Other than these, they are seriously listed out technologies from the Non-Microsoft campus.  Also, they have provided very small space for Web Services.  One pathetic truth is that they have listed PHP for web development and missed out ASP.NET and JSP.  I do not know what makes PHP a more serious aspect than the mature ASP.NET and JSP.  I’m expecting the role of W3C to define and standardize the Web 2.0 technologies.

Personally, I would like to prepare a list of technologies for Web 2.0.  If anybody is interested please join me.  One condition though - you have to look at both open and proprietary platforms.

Cheers!

22 janvier

Programmatic Remote MSI Installation in Windows - 2

WMI - Introduction

In an enterprise environment, WMI lets you to query and update information on clients machines and applications.  It provides a standarize means for managing a system whether it is a local or in a network.  Developers can use WMI programmatically by Windows Scripting, C++/VB and of course .NET.

WMI Installer Provider

It lets us to access and manage Windows Installer through WMI classes.  Following are the core classes of WMI Installer Provider:

  • Win32_Product
  • Win32_SoftwareElement
  • Win32_SoftwareFeature

The Win32_Product class contains methods to install, uninstall and uninstall an application programmatically.

In addition, Windows provides set of tools to manage WMI.  These are:

  • WMI CIM Studio, WMI Object Browser, WMI Event Registration and WMI Event viewer  - see MSDN.
  • WinMgmt.Exe - For manage
  • WbemTest.Exe - WMI Tester tool

WMI in .NET

The System.Management class provides rich set of classes to manage WMI in .NET.  See: MSDN Library or .NET SDK Documentation.

In the froser_foo thread, a sample code has been provided.

In the next series, I'll explain the problem I'm still facing with WMI Installer Provider in very detail.

C...U...

SQL Server 2005 :: Transaction Log - Final Part

I came to know that (not surprisingly) you cannot decode the details in MS SQL Server transaction log other than using third party tools like AuditDB, Idera SQL Compliance and so on.  These external tools are among the Microsoft wing to provide transaction log information.  For others, Microsoft does not give any official support/documentation.   Thats the business trick. :)

Okay, beware when you purchase third party tools.  Check that whether they support transaction log or use automated triggers for each and every tables in a database?

One good thing I came to know is SoftTree Technologies recently released database auditing API for SQL Server, Oracle and Sybase.  (Source: http://snipurl.com/SoftTreeAuditDBAPI).  But for this, you have to pay a big amount.

Bye.

19 janvier

Programmatic Remote MSI Installation in Windows

Two months before, I received a requisition to automate the installation of a set of MSIs for our products on any remote machine.  The strategy of the this automated installation has some intelligent alignments (thanks to my team managers) of product features with related MSIs.  The GUI part of the tool is used to configure such things.  The command line tool just take a configuration and install a set of features on the given machines.

The basic functionality of the command line tool is to install a set of MSIs on one or more remote machines.  For this, we planned to used WMI.  Before that I briefly explain the environment.

Development Platform: .NET 2.0

Server Platform: Windows Server 2003 Ent

Decided that all the machines are connected in a same network domain.  We are successfully implemented the command line tool (here after I called CMDTL).  After the first test, we met a problem while installing a MSI on remote machine.  The story is really complicated and also by the help of fraser_foo, I was moved some more steps for the solution, but...?! (okay).  At the time of development, I saw a thread in Microsoft forum initiated by fraser_foo.  You can visit that thread by just googling "Remote MSI Installation" or visit that thread.  You can see a long replies.

Okay, Let me explain the story.

Let three machines A, B and C in a domain called "XDOMAIN".  And let consider the user "ADMIN_USER" has all administrator credential on all machines.  The domain is working in ADS (Active Directory service) enivronment.

A: Here, I'm running the CMDTL.

B: On this, the MSI packages are installed and shared with all set of permission to ADMIN_USER.  Let take a sample MSI called SAMSETUP.msi.

C: The target machine on which I need to install SAMSETUP.msi.

All the three machines are running in Win2003 Server with WMI Installer Provider.

Note:

By default, WMI Windows Installer Provider is not installed in Win2003.  You have to install by

select Start > Control Panel > Add or Remove Programs.

In Add or Remove Programs window,  press Add or Remove Windows Components button. 

In Windows Components Wizard window, select Management and Monitoring Tools from the Components list.  Press Details.. button. 

In Management and Monitoring Tools window, select WMI Windows Installer Provider in the Subcomponents of Management and Monitoring Tools list.

Press OK.

See the below scenario:

Scenario 1:

Running CMDTL in A.  SAMSETUP.msi file in B. Target machine is A itself.

Result --> PASS

Scenario 2:

Running CMDTL in A. SAMSETUP.msi file in C.  Target machine is C.

Result --> PASS

Scenario 3:

Running CMDTL in A. SAMSETUP.msi file in B.  Target machine is C.

Result --> FAIL

But we really need the third scenario only.

Okay, In this article, I'm going to explain the below:

  • WMI
  • WMI Installer
  • WMI in .NET
  • Problem with WMI Installer
  • WSH
  • Remoting Scripting

C...U.. I'll meet on series 2.

17 janvier

SQL Server 2005 :: Transaction Log - 2

::fn_dblog

I've tried more to know the details of transaction log column information.  During this time, I found a system function ::fn_dblog which is more convenient than DBCC LOG for the following reasons even though it does not have any documentation:

1. DBCC LOG consumes more power to retrieve transaction log info.

2. It is a DML query and flexible than DBCC.

Syntax: SELECT * FROM ::fn_dblog(<START_LSN>, <END_LSN>) [WHERE ...]

START_LSN :  Starting Log Sequence Number

END_LSN: Ending Log Sequence Number

We know that the transaction log keeps records by  CURRENT LSN column.  Every transaction entry can be identified by an unique LSN.  The fn_dblog function fetches all the records from log.  Here you can pass start & end LSN to limit your search, otherwise you should NULL on both.

Example:

Use MyTestDB
SELECT * FROM ::fn_dblog(NULL, NULL)

Following column are displayed:

First section:

Current LSN                         Operation                       Context                     Transaction ID
-----------------------------------------------------------------------------------------------------------------
0000003a:00000077:0001 LOP_SET_BITS                LCX_DIFF_MAP          0000:00000000
0000003a:00000077:0002 LOP_BEGIN_XACT           LCX_NULL                  0000:00000c1b
0000003a:00000077:0003 LOP_MODIFY_COLUMNS LCX_CLUSTERED        0000:00000c1b
0000003a:00000077:0004 LOP_SET_BITS                LCX_DIFF_MAP           0000:00000000

Second Section:

Previous LSN                       FlagBits Alloc                       Alloc                         Page ID
                                                         UnitID                    UnitName
-------------------------------------------------------------------------------------------------------------------
00000000:00000000:0000 0x0000 6488064                 Unknown Alloc Unit 0001:00000006
00000000:00000000:0000 0x0200 NULL                       NULL                       NULL
0000003a:00000077:0002 0x0200 281474981691392 sys.sysdbfiles.clst   0001:00000055
00000000:00000000:0000 0x0000 6488064                 Unknown Alloc Unit 0001:00000006

and more...... 

In this, I can understand the purpose of the following column based on the semantics:

Operation -

Which type of operation occurred.

Some meaning values are: LOP_BEGIN_XACT - Internal checkpoint of an INSERT or UPDATE transaction.

LOP_MODIFY_COLUMNS - update statement called and LOP_INSERT_ROWS - insert row.

Alloc Unit Name  - object name

Okay come back to the function.

In this function, you cannot pass the LSN value as displayed above (0000003a:00000077:0001).  The function accepts only number formated NVARCHAR values.  So, we have to convert these hexa-decimal to NVARCHAR.

How........?

You can do it in two ways:

I. Using your calc (Calculator in WinXP)

   1. Let the hexa 0000003a:00000077:0001.  It contains 3 parts separated by ':'.

   2. Open you calc in hex mode.

   3. Cut the first part of hexa and paste it into calc.

   4. Change the mode to decimal.

   5. Copy the displayed value to a notepad.

  6. Do the step 3 - 5 for other 2 parts.

  7. Finally, you will get a string '58:119:1'.

Instead of above fn_dblog call, use the below:

Use MyTestDB
SELECT * FROM ::fn_dblog('58:119:1', '58:119:4')

It displays only LSN from 0000003a:00000077:0001 to 0000003a:00000077:0004.

II. Programmatically (Thanks killspid: http://killspid.blogspot.com/)

Here is the excerpt from his blog:

SET NOCOUNT ON
DECLARE @LSN NVARCHAR(46)
DECLARE @LSN_HEX NVARCHAR(25)
DECLARE @tbl TABLE (id INT identity(1,1), i VARCHAR(10))
DECLARE @stmt VARCHAR(256)
SET @LSN = (SELECT TOP 1 [Current LSN] FROM fn_dblog(NULL, NULL))
PRINT @LSN
SET @stmt = 'SELECT CAST(0x' + SUBSTRING(@LSN, 1, 8) + ' AS INT)'
INSERT @tbl EXEC(@stmt)
SET @stmt = 'SELECT CAST(0x' + SUBSTRING(@LSN, 10, 8) + ' AS INT)'
INSERT @tbl EXEC(@stmt)
SET @stmt = 'SELECT CAST(0x' + SUBSTRING(@LSN, 19, 4) + ' AS INT)'
INSERT @tbl EXEC(@stmt)
SET @LSN_HEX =
(SELECT i FROM @tbl WHERE id = 1) + ':' + (SELECT i FROM @tbl WHERE id = 2) + ':' + (SELECT i FROM @tbl WHERE id = 3)
PRINT @LSN_HEX
SELECT *
FROM ::fn_dblog(@LSN_HEX, NULL)

Okay, but how can i know the details of other columns?

Its a series of PAIN....

SQL Server Transaction Log Accessing

Last week, I've received a problem from my internal team to find out a way to logg all CRUD (Create, Read, Update and Delete) transactions happened in a SQL Server database using transaction log file.  They have analysed and did some analysis on other options like SSIS, stored procedure replication in OLTP, etc.  But they want to know in transaction log file.

I've taken this and was searching that is there any APIs to access transaction log. After a while, I found that SQL Server does not provide any API to access transaction log. Instead, we can use DBCC LOG commands to access transaction log.

Though, The DBCC LOG is an undocumented command, I can read transaction log, but the information are in either enumerated or Hex format. And there is not documentation found about the details displayed by DBCC LOG.

And one of the major drawback is that transaction log does not keeps to log SELECT queries. 

I found number of third party utilities who used transaction log to fetch the information and display them in user understandable format.

Still I'm searching and analysing the same, but I cannot find a result.

16 janvier

The Layman's View of Software Factory - 2

How can we define the term Industry?

In general, other industries receive the resources from upstream suppliers. Using the product line tools or machines, they automate the production. Finally, they distribute products across supply chains of highly supplied and interdependent suppliers.

As in the above paragraph, we (the software industry) are doing the same thing, then how do the other people differ from us?

In the above paragraph, look at the following terms:

· Resources from upstream suppliers.

· Product line tools.

· Automation of production.

We slightly differ from other industries to do the above tasks. Let us understand the nuances of the above terms:

Resources from upstream suppliers:

All successful industries are working in modular and scale-up manner. For example, the automobile industries purchased their resources for their automobile from upstream suppliers. The resources are produced based on the industry standard and it is directly used into the production without performing any modification.

Software industry also well matured in platform based approach. You can purchase any third party .NET WinForm controls and you can directly integrate into your application. It is very uncommon to meet compatibility issues. But we are more dependants on platform components. We do not have any universal standard in most parts unlike in services oriented middleware. Now only XML Web Services have matured to some extent and are interoperable with other platform components with the great advent of XML.

Product line tools

Every product (eg. Indica, Sumo) in a product family (eg. Tata Motors) share common features across the members in the product family (eg. transmission and drivetrain components). And every product differs from others by its unique features. Industries approach these features by using product line tools.

The common features are implemented and kept as a core asset for product development. New product can be produced by assembling existing core assets and implement of unique features.

Our industry does not use any standard mechanism of developing product line tools and their usage.

Automation of production

To be honest, how many of us used internally developed automated tools in our product development. Yep, some of us have automated tools for generating objects for a relation database. Some of us may have used them to generate standard UI. But how do we use the automated tools through SDLC is a matter of concern in the software factory arena.

Okay, then what is Software Factory?

Simply put, “Economies of reuse” is the basic slogan of software factory. In a given domain, reusing solutions to common sub problems is called economies of reuse. It reduces total cost of solving multiple problems in the given domain. Let’s take automobile industry, after the designing of a car model, a bulk of cars can be produced in the production phase. Unlike this, in our industry, after the design, a system has been developed. The number of cars produced in production phase will also affects the cost of production. But in our industry, the number of copy of the same application does not affect the cost of production (just a cost of CD/download time). This is where our industry differs from others. So, the production phase in other industry naively compared with the development process in our industry.

I’ll explain this concept in detail in the next article.

2 janvier

User Group for Indian Software Factory user

Hi, I've created a fresh group for Software Factory users from India.
 
Name of the group: IndiaSoftwareFactoryGroup
 
 
 
Logon and enter your impacts.!
29 décembre

Part I: The Layman’s View of Software Factory - 1

Last week I’ve given a presentation about Software Factories to my team.  The presentation went well with lot of hot discussion.  I’ve started presentation with the following quote by Peter Wegner:

“Software products are in some respects like tangible products of conventional engineering disciplines such as bridges, buildings, and computers.  But there are also certain important differences that give software development a unique flavor.”

Apart from that I would like to contribute software factory movement.  In this blog I would like to explain all about software factory. Okay, before going to use or implement applications using software factories, in first series, I would like to explain some theoretical concepts behind Software Factory. 

We all believe that software industry is well-matured and we have successful development lifecycle methodology in our hands to develop a successful projects or products.  But, how many of us know that only 16% of the projects are developed on schedule and within budget.  31% are cancelled and 53% exceed their budgets.  As of our experience, we all know that we are releasing a project with spending lot of day and nights in front of our machine and delivered the project with more pain. 

Are we working in right way?  Is our industry always like this?  Are our processes or methodologies standard and matured enough?

Simply we can say only “No” or “May be..”.  What is the problem with us?  If we are not mature, then at least we should learn from other successful industries.  But the big bottleneck is that we cannot follow the other industries, because ours is entirely different than the tangible production industries such as automobile or construction industry.

Our industry gurus invented lot of methodologies and tools over last ten years such object orientation approach, design tools, etc.  But we are not smart like other industry.  They do not spend/waste their time to re-invent the same wheel.  Everything is standard, standard and well automated.  Then what actually we need to say loudly “Software Factory” or “Industrial Approach for Software Development”.  In this blog, I’m going to write series of articles about Software Factory.

In the first part, I'm planned to provide basic details about software factory in a layman's view.

So, please Hold On….!

28 décembre

IT Buzzwords and IT People - An article from SearchWinIT.com

Today mornining I've read this much interesting article.
Yep, we all know the following buzzwords in our company or other software companies when they want to showcase their technology products or solutions.
 
  • User Experience / rich user experience.
  • Architect
  • Best practices
  • Compliance
  • Industry Leading
    and more...
Yes i'm also much tensed with above buzzwords.  Let the term "Architect".  IT companies misused this term as like politicians get doctrate honour in so and so university.  The roles and responsibilities defined for an architect in one company is different in another company.  And most of us do not know the difference between architect/designer/solution architect/technical architect.
 
And the word from John Pescatore, a security analyst at Gartner Inc. is really true:
 
"Holistic really means imaginary and heuristic means undocumented," Pescatore said. "And there are broader, overused terms such as fill in the blank as a service and the overused industry leading," he said.
 
Read full story at SearchWinIT.com by Eileen Kennedy, News Writer.
20 octobre

Industrialization of Software Development

Last 1.5 years, i'm involving in Industrialization of software development.  Whenever, taking new project, i feel the immaturity of industrialziation capability of software development.  The most favoured industry in the world is of course, "Auto Mobile".  It has everything (everything means standards, procedures, etc) for sucessful manufacturing of a product.
 
In mid 2005, I've read the Greenfield's Software Factory book over 2 months and feel very proud of that iniation.  (Note: At that time, Microsoft did not release VS2005).  But i've missed lot to share/acquire information about Software Factory with bloggieans. 
 
So, anybody wants to share something?   warm welcome.. only about Software Factory and Agile methodologies.
 
c..u soon
9 mars

A war between Team Foundation API and me - Part II

Hi!

Finally, i've concluded that instead of WSS, it is better to use Microsoft Visual Studio Team Foundation Server API in our application.  TFS might decrease our application's features localization, but it will reduce my headache.  It is actually built on top of WSS.  So we can enjoy the share point services with luxury of TFS.
Okay! let me write some sample applications to test the TFS APIs before the production code.  I've got the following dlls from Visual Studio 2005 SDK.  You can download VS2005 SDK from
http://www.vsipdev.com/downloads.
At the time of downloading, Microsoft released VS2005 SDK Feb 2005 CTP.  So, i've downloaded the SDK and installed it on my machine.
 
VS2005 SDK Feb 2006 CTP:
After the installation, i navigated to Visual Studio 2005 SDK > 2006.02 > Visual Studio Team System Integration from my Program Folder Menu.  It has some samples and documentation for VSTS Integration.  Really i hate the documentation which is in Word document and unable to see the ever green Microsoft help style.  No explanations, code snippets for VSTS SDK. 
 
And i was shocked, because these documents does not help you to explore from where you can start to develop.  One fine day, i ran Lutz Roder's .NET  Reflector and decompile the following TFS assemblies.
  • Microsoft.TeamFoundation version 8.0
  • Microsoft.TeamFoundation.Client version 8.0.
 
In Microsoft.TeamFoundation, i found namespace Microsoft.TeamFoundation.Proxy.Portal which contains most of the basic APIs to create a project and work items on Team Foundation Server from your application.  (See Fig 1).

The classes and methods are self explanatory, so i've decided to use those assemblies.  But after a while, i was strucked when using this API.  I cannot understand most of the parameters for some basic functions.
 
Oh God! Now i am searching again for help...i got help for TFS Version Control APIs only.  After that, I found that microsoft released VS2005 SDK March 2006 CTP.  Still no more improvements from me. So guys! let me take some times.  I will meet on next issues with a solution.
22 février

A War Between SharePoint SDK and Me

Currently, in our secondary activity, we are developing a web application which will automate our research prototypes lifecycle.  In these, there are numerous documents, codes and reviews are generated, so that we are planned to use WSPS (Windows SharePoint Services) SDK for document management in our portal.
Once again, we've no plan to use the ready made Share Point Portal Server, any way, that is not the solution for our portal.  Instead, we planned to use Windows SharePoint Services as like as Visual Studio Team Foundation Server uses WSPS. 
 
So, in our service agent component, i need to provide a solution to access Windows SharePoint Services from my business objects.
 
I've confused to take a decision whether to provide service agent for black forest flavoured Team Foundation Foundation Server or venilla flavoured WSPS.
 
Order one Venilla - Try to defeat this.
First i downloaded WSPS SDK from microsoft site.  I got bored to read full SDK documentation, so i googled some samples for WSPS in document management.  I'm unable to found one which is matched our requirement.
 
Smell the black forest - Why can't we try.
So, i decided that TFS will be the mail life cycle, then why can't we try to manage TFS from our service agent.  I've collected some document about Team Foundation Server Object Model and read some blogs.
 
Ohhh!! I want some pain-relief balm.
 
So, guys! let me explain the remaing stories of my war with WSPS in the forethcoming articles.