Do you need Something refreshing

2 09 2006

I listened today to this two year old IT Conversations piece by Joel Spolsky.

http://www.itconversations.com/shows/detail207.html

If you are having some time, an MP3 player or a headset, listen to this.

Excellent thoughts. It is very different. Seems honest and has some great insights if you are trying to build a software product.





CLR Stored Procedures Not very efficient

27 11 2005

You might be attending a number of SQL Server launch events where you are being told how good SQL Server 2005 is and all the goodies it comes with.

So do you believe what Microsoft says – Wait here is news for you

I wondered why they are preaching not to use it, unless there is a need!

Here is why!
Here are the steps you would need to do to write a simple stored procedure.

a) Write your cool CLR stored proc
b) Go to SQL server and register the DLL that contains the CLR Store proc
c) Link the new CLR stored proc with a regular stored proc using the EXTERNAL NAME keyword
What you have essentially done is enabled a way for you to call a CLR stored proc.

But wait – Why did we have to create a regular stored procedure

Because that’s what you call to call the CLR stored procedure.

Also here are some not so cool features

1) You need to define the exact param list in the actual stored proc that are in a CLR stored proc.
2) You can only return back int 32 and void from any CLR stored proc method.
3) You can use the SQL Pipe feature to send the result set to your code when the CLR stored proc is executing
4) You can’t add reference in Visual studio to a project that contains your objects.
5) You still write the same amount of code in your data layer that you would to call a regular stored procedure.

What would be cool?

1) To call the CLR procedure directly after registering it from my business layer without writing a line of SQL code
2) To be able to create business objects in the CLR stored procedure

For now CLR Stored procedures are just like a cool toy that has no use beyond keeping it in the shelf and telling everyone – “Look I have a new cool toy‿

Do let me know if there are ways that this could be done..





SQL server 2005 classes

27 11 2005

There are three classes that may be of particular interest to users of SQL server and are free till Nov 1st

2939: Programming Microsoft SQL Server 2005

2940: Building Services and Notifications Using Microsoft SQL Server 2005

2941: Creating the Data Access Tier Using Microsoft SQL Server 2005

The third one is particularly quite useful.

You can download these and view them offline. I did download but you need the E leaning player

Have a good weekend

Vibhu Srinivasan





.NET 2.0 tricks- MasterTemplates

27 11 2005

Mastertemplate is a user control and provides a common look and feel to all pages in a site.

When working with them if you are wondering how to use a master template in a webpage ( xyz.aspx) the trick is to remember that any page using a master template, cannot have head, body or footer tags as those are the tags that are in the master template

So either delete all the html from the aspx page or more easy when creating new Webpage in Visual Studio remember to click the little “Select Master Page” option

null





Think about it and its there

27 11 2005

I spend most of my day in some IDE .Nowadays the IDE that takes most of my day is Visual Studio ( and not IDEA boo hoo)

I read blogs using bloglines and today I was looking for a way to do this within Visual Studio.

Power of google,

Less than 5 minutes from that thought here i am able to read blogs from within studio.

Here is what i found Sharp tools and plugins

Then i went to my bloglines account and exported my blogs as an OPML file and imported it into this plug in.

Whats next - Is there a plug in to write to wordpress from within studio? So far google says no?





SOA in Seattle

27 11 2005

I am sitting here in a class in Seattle ( Pluralsight). Earlier in the
day we had an excellent debate on what is Service Orinted architecure( from a Microsoft perspective)

Many including Aaron Skonnard think that the one of the four tenets ie Services are autonomous is not correct.

The main discussion was why are we doing SOA?

We went from a Component based interface driven design to a COntract based Protocol independent design.

Joel Spolsky’s Law of leaky abstraction got a mention here. The abstraction works fine when everything is fine, but the leaks in these abstractions force the developers to soon know the details.

So if services are autonomous, ie they should be independent of every other system, why are there specifications like WS Transaction which are making systems dependent on each other.

The message that everything is a service and services are not object oriented is not correct. Behind services are OO components which still do the work.

Some one here was pointing out that every now and then the processing power of our systems becomes so much higher that we as a industry need something new to make out lives more complicated.

SOA makes testing a hell? Since the premise of service is contract/schema and not data, there is a new problem that we only talk about the syntax of the contracts than the semantics.

Here we are fifteeen years later, still finding answers to the distributed problem.

Also there are a bunch of Microsoft employees from the team system group in the class, who had some interesting views on what services mean. Hopefully they will solve the problem of distributed software developement( Oops some more leaky abstractions!!)

Are we making the realm of software development more complex than we really need to. Do we really need to solve this distributed problem?

We first define a complex problem ( Distributed computing ) and then define a much more complex solution ( Well may be Indigo will solve all of this ) when we really could have focused on some other simpler non distributed plaftorm. Why are all the Java folks suddenly talking of simpler things like Spring Frameworks and simpler API’s.

Oh well:)





Must read on Static / Shared

27 11 2005

One of my all time favorites when I take interviews is to ask questions on static variables. I find that many programmers tend to over use the Shared functionality without having a clear understanding of the pros and cons.

To me the biggest disadvantage is that static methods lose polymorphic behavior.

There is really not that much overhead in creating instances of a class.
Did you know that classes can be marked as static in 2.0?

Here is a excellent article that appeared in the January version of MSDN magazine. This article walks you through the details of static variables.