Thursday, November 22, 2007



There is complete census that CRUD is Anti-SOA pattern

Simon thinks that one can think of CRUD as business events rather than service operations

Maarten Mullender’s says to take the best of both worlds. Use CRUD interfaces for service when concurrent updates can be avoided because
1. Updates are seldom, or
2. Updates have only one source (person or system)

Ramkumar Kothandaraman writes
If one of the services fails to handle the CRUD request, then the EA service should be able to handle this business exception. One of the mechanisms to handle a business exception involves executing a flow that compensates for prior activities.
A Business Analyst usually determines Compensation Logic. Compensation Logic can be either automated or manual. For example, a compensation action may involve alerting the monitoring facility when one of the services returns a business exception, leading to a manual resolution.

My thoughts
There are going to be CRUD operation even for a SOA scoped Application. Best way of writing optimum CRUD operations is to visualizing a client talking to a service rather than a traditional RPC application.
Service APIs will be designed or dictated by client application and it is responsibilty of client to submit bulk CRUD operation with concise payload. It is responsibility of client to make sure that it has correct state.

Wednesday, August 08, 2007

ObjectMother vs Mock/Stub
I was quoted on following forum

Very interesting article and also do read the comments.

I think that I am on the same page with vast majority of programmatic TDD practitioners.

Wednesday, May 30, 2007

How do you introduce NHibernate to VB6.0 programmers

Recently I tried to use nhibernate with a small project and have spent 60 hours to figure it out and still trying to figure out. I think that it is too many hours for a small project. In Midway, I thought of droping the idea of using NHibernate.

Best documentation for Nhibernate or best place to start is reading Java book for Hibernate or Hibernate documentation.

Ayende has some useful posts.

Let me quote from Java Experts first

Richard Conway. JDJ.SYS-CON.COM writes

Hibernate has come a long way since it was first released. It has a bewildering number of options for configuring your object persistence mappings and behavior – as well as great tools to make it if not painless then at least no so painful.

If you want to quickly persist your objects for a small project and you can manage uniqueness and referential integrity within your application code – look no further than DB4O. It just doesn’t get any easier.

The Cache/Jalapeno combination provides a compelling option for quickly persisting your java objects with a minimum of effort while providing excellent control over database-specific functionality.

Bruce A. Tate of Beyond Java book fame writes

Most of us try to learn an object relational mapper, like Hibernate. While it does relieve some of your persistence burdens, it also imposes a steep learning curve.

My Advice for fellow ex-VB6.0 programmers
Go for Code Generation route if you can go

Very soon I am going to write some posts showing O/R mapping examples using Nhibernate Custom Attributes.

Monday, April 16, 2007

Agile Methodology /Domain Driven Design wih Rich Client Application

Recently I tried Agile Methodology/Domain Driven Design for a small project. It simply rocks.
Some highlights

Step 1 Architecture

Step 2 Architecture

1. Non-disposable clean prototype.
It resulted in Non-disposable prototype. Nothing more connects with users like Screen Designs/Working prototype. Previously, I used to create disposable prototype, I was designing Screens backed by dummy database (by using DataControls). At the end, the prototype was so corrupted and had so bad references and bad code, We have to abandon the prototype.
Prototype fired by an Object Oriented Engine is real application (Tracer bullet)

2. Rich Middle Tier
Was able to nail process/Workflow classed early in the stage

3. Technical Feasibility
I was able to evaluate technical feasibility, efforts required and hence financial feasibility quite early in the game.

4. Agile
Having no database is really helping me at this time. Making changes to business objects and factory objects is very quick as compared to making changed to database and propagating it to middle tier. Carry less baggage in early really helps but I am reaching a point where I will need a database very soon.

5. 100 percent utilization of efforts

You may say that set up data for business objects is waste of time. Take a breath. I am using this code for my setup for tests. They will represent the functional tests and they are going to be independent of database and hence faster.

6. Free Set up for Functional Unit Tests

7. Window Forms Rock
Sometime back, Survic posted that he is going to use Windows Forms to develop prototype for Web Applications. It really shocked me. Now I see some weight in that argument. I remember that to get the docking, anchoring and other effects in older visual basic version, I have to write some very mathematics intensive routines. Now it is coming out of box.

8. Design Patterns Applied

1. Factory
2. Proxy
3. Clone

9. Application Validation Block Rocks

It is very easy to use (within one hour, I was able to set it and use it comfortably.
It is extensible enough to coexist with others custom validation manager like CLSA.
It also supports reading validation messages from Resource Files which is very essential for global applications. I highly recommended for small projects. Since it uses custom attributes and reflection, one may be careful about batch validation.

10. NHibernate

Very extensible and complex. It requires a hugh learning curve. I don't recommend it to fellow ex-VB6 developers to try in a time-critical project for first time.

11. Resharper Rocks
Excellent productiviy booster. It is must have tool for C# developers. I am going to buy a personal copy very soon. I used the evaluation copy.

12. Under Investingation
1. Windows Form Databinding
3. Licensing Software
3. Microsoft Map

Thursday, January 04, 2007

No Stubs, No Mocks -- just use ObjectMother -- TDD
Couple of days back, I wrote that I am not using Mock/Stub objects but I have moved creation of my complex business objects in my testing framework to another helper classes. Today I came to know that there is pattern for this concept from Thoughtworks named as ObjectMother