2 Comments

I use Vista running on a Virtual PC as my development environment (I used to use WinXP, but then came along Windows Azure which required either Vista or Win Server 2003). The usage of SQL Server Management Studio on the Virtual PC was slowing down the system. So, I wanted to use my Host Operating System to access the SQL Server using SQL Management Studio. By default the SQL Server engine is configured to minimise the surface of attack. So, remote access to the sql server engine is also not enabled.

To access remotely, the TCP/IP protocol needs to be enabled, using the SQL Server Configuration Manager.

tmpDC50

There after, it is recommended to allow remote connections via specified ports. So, I did that as shown below.

tmp69C1

To test the configuration, I used a command from the remote computer.

tmpE7C9

Thumbs up. There were no error messages displayed after executing the above command

I expected a nice little text box in the SQL Server Management Studio connection dialog where I could specify the TCP/IP port number. It turns out there isn't and that I could simply append the port number in the same way I tested from command line.

tmp87C1

That's it, a little burden outsourced to the Host PC.

0 Comments

I run a Virtual PC with Vista 32-bit as Guest operating system for my software development purposes. This VPC is quite slow despite taking measures to shut down various background services.

For reasons beyond my understanding (and me not willing to investigate on it), whenever a MMC console window is opened, CPU usage spikes to 100%. It was frustrating to to start SQL Server Engine by going to the services.msc console. So, I found a way to start SQL Server service from command line.

 tmpE0B4

Please click on above image to see the command in clarity.

0 Comments

In redesigning and redeveloping Tapovanam's (my friend's organisation) web site, I want to put in place a good architecture. The following are some of the considerations:

  • A multi-tier design (mainly to separate presentation code from business logic)
  • Support themes in presentation layer to switch designs easily at later stage.
  • Object oriented business logic layer (BLL) (with business objects)
  • Data access layer (DAL) to be independent of underlying database (to switch databases or even use XML files as data store at a later time)
  • Data Transfer Objects (DTO) to pass data between BLL and DAL
  • Maximum use of Data Binding at the presentation layer

Following are few ideas in mind at this moment to solve the above problems:

Multi-tier Design

Presentation Layer - ASP.NET Web Forms

Business Logic Layer - C# business objects having all the validation logic and an abstracted view of underlying data schema.

Data Access Layer - C# data access classes to retrieve and store data in data transfer objects

Plug-in model for Data Access

To be able to change or use multiple data stores with least effort, the Data Access Layer will use the Provider Model design pattern.

An abstract base class containing common data access methods like ExecuteNonQuery, ExecuteReader will be used. This methods in this abstract base class serve as Helper methods for data access. (similar to Data Access Application Block in Enterprise Library). This could be named as DataAccess

For each module in the web site (Eg.. Photos, Events, Commentaries), an abstract provider class and a concrete class is created.

The abstract provider class will have abstract CRUD (create, retrieve, update, delete) methods which will be implemented by the concrete class. For example, GetPhoto(), GetPhotosByCategory() etc. This class is data store agnostic. This could be named as PhotoProvider

The concrete class will have the data store specific method implementations defined in the abstract provider. This could be named as SqlPhotoProvider

Data Transfer Object

To transfer objects with data between BLL and DAL, separate classes are created. For example, PhotoDetails class to store the Photo record obtained from data store. Using un-typed DataSets as DTOs is problematic when it comes to maintenance (spelling mistakes are a pain)

A collection (like List<T>) of DTOs is used to pass a set of retrieved data from data store to BLL.

Object Oriented BLL

The business logic layer consists of C# classes that represent the business objects. These classes have all the validation logic, business logic and methods that talk to the DAL. These classes also use the respective Data Transfer Objects to pass and retrieve data from DAL. These classes can be named like Photo, Event etc.

DataBinding in Presentation Layer

To databind UI components like ListView, GridView, DetailsView etc. the ObjectDataSource controls are used in the aspx pages. The ObjectDataSource controls use the Business Objects in BLL and facilitate as binding adapters between the aspx page and business objects.

Other considerations include :

  • Using all the existing ASP.NET built-in Provider services like Membership, Profile, Health Monitoring and Personalisation
  • Using Enterprise Library's Data Access, Exception, Logging, Security blocks.
  • Pay-pal integration for e-shop
  • Globalisation and Localisation to display web site in Indian Language
  • Content managed pages (allow contributors to compose and publish pages)

1 Comments
When I have a ASP.NET WebSite (NOT WebApplication), I notice the presense of vwd.webinfo in my VS 2005 solution. The problem is the annoyance when it shows as a new source control item. (with a plus sign next to the filename). So, when ever I do a "Pending Checkins"/"Checkin", it is included as part of the pending items. At the moment I am taking care to uncheck this file and then do the checkin. But, it would be nice to have tell VSS to exclude this file (or set of files) from trying to add to VSS. I've also thought about "exclude from this project" option in Solution Explorer within VS 2005, but then it adds a file called vwd.webinfo.exclude and then this shows up in pending checkins once again. Using the VSS client, there is a facility to include FileTypes. To my surprise, the *.webinfo was not included but still the VS 2005's VSS plug-in tries to add it. I've never managed to get an solution to this problem yet. Hopefully something might turn out at a later time.

2 Comments
Hmm.....After VSS came CVS and now after CVS it's time to try out SVN! Yesterday, I was finally determined to make my machine a build system(with WinXP SP2 Pro) for which I had to install and configure CruiseControl.NET. For which I had to install VSS. Then I thought of CVS (because, I was comfortable with CVS way of doing things for the past 1 year). Oh...then I thought of SVN (because, SVN is to be a compelling replacement for CVS). The best part of SVN is the availability of the free e-book which is quite exhaustive. I was indeed more happy to read the TortoiseSVN e-book because it gave detailed steps to install the SVN Server and not just the TortoiseSVN Client. Since I did not have Apache Web Server in my system, I prefered the SVNServe type of SVN Server which listens on port 3690. With that I had my svn server setup but before running the server, I read a piece of information in the book which said that the svnserve.exe can be run as a windows service using a wrapper called SVNService. Without much thought, I tried running the svnserve as windows service. But, to my despair when I tried to view the repository which I had just created using TortoiseSVN, I could not find the repository using the repo-browser of TortoiseSVN. Something has gone wrong somewhere....After 30 minutes, I started to suspect the SVNService wrapper. So, instead of going to that level of abstraction, I decided to run the svnserve manually using command prompt. And lo there was Windows XP SP2 in action asking my permission to unblock the port 3690. Phew! that was a relief. After unblocking it, I reverted back to SVNService. There ended my initial adventure with SVN which was quite less exciting than my earlier ones with CVS and TortoiseCVS. I am expecting the real thrill when I start using ASP.NET application with SVN.