Sunday, October 29, 2006

.Net Pet shop 4.0 Architecture

Petshop Architecture 4.0

I have used earlier Petshop Architecture. It left a mixed feeling. It was simple to start with but not extensible enough for complex distributed computing needs.
I decided to revisit the new Petshop Architecture 4.0. My thoughts

Architectural ConcernObservationMy Rating
High level Diagram
Exploiting ASP.NET 2.0Generics ,Provider ,Caching, Transaction A+
Seperation of Business Logic and Persistence LogicBLL,Model,
Pattern for transferring data between Business Layer and Data LayerModel(Data Tranfer Object)A+
Optimized for Distributed ScenarioWhether Chunky Interfaces are possible between BLL and DLL Under Evaluation
Is optimized for Service Oriented Architecture? Under Evaluation
Business Rule Processor :Under Evaluation
Businses Layer Richness Under Evaluation


Setting up PetShop Application
Setting up .Net PetShop Application has been a very daunting and time-consuming exercise.

1. Do read the ReadMe.Html File. It contain very critical steps to performed before one can run the application

2 . Try running the InstallDatabases.cmd.

3. You can Install SQL Express from this link

4. If you get error that your script is failing because remote is not allowed for SQL Express ,try this link

5. If it does not work like it did not work for me , go to your
Edit \.NET Pet Shop 4.0\DatabaseScripts\Sql and run the individual scripts.

Under Security Folder in SQL Server Management Studio Express, do add your user account.

6. Edit \Web\Web.config:
a. Modify the server path in SQLProfileConnString, SQLMembershipConnString, SQLConnString1, SQLConnString2, and SQLConnString3 connection strings, using host_name\instance_name schema. Example: server=(local)\sqlexpress;.

7. Add this section after decrypting the Web.Config file using the utility DecryptWebConfig.bat

More Information

{"The database 'MSPetShop4' is not enabled for SQL cache notification.\r\n\r\nTo enable a database for SQL cache notification, please use the System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications method, or the command line tool aspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information."}

C:\Program Files\Microsoft\.NET Pet Shop 4.0>aspnet_regsql.exe -d MsPetShop4 -ed

8. You cannot enable Notification with SQL Express, so just comment the code and voila.

Proposed changes


survic said...

it cannot be too bad in architecture, because it has compete with java ;-)

Vikas said...

Hi Survic,
It definitely lacks the advance business object validation mechanism like CSLA. It is throwing exceptions which I thought is not a recommended practice from Microsoft Patterns for Peformance.

Is business rule manager a good software industry (J2EE) practice copied by CSLA or a brain child of Rocky? If it is a brain child of Rocky, hats off to him.

survic said...

Rule manager comes from the combination of the idea that we need winform “real time” per property validation, and per object validation. The latter is very popular in Java, or, in Web in general. Because java is not strong on its swing/AWT stuff, so, I believe it is indeed special from CSLA.

On the other hand, "rule manager" has other meanings ("rule engines")in Java. However, I do not really like those rule engines anyway. So, I am not against messing up those terms ;-)

Vikas said...

Rule Engine
Yes, I know that you are saying. I had requirements in two project where we have to develop user interfaces to allow users to enter new business rules and modify existing rules. Finally the user interfaces we created was so complex that even programmers found it very hard to use. One question that we were asked that why we didn't try IBM Rule Manager Engine. Biztalk also Rule Engine which I have not tried yet. It will be very nice to see whther end users can use it. At least, we have some standard Rule Engine tools. May be send users for training. Now Rule Engines are a big part of BPMN.