It ain’t so simple, mister!
The most requested feature for NH Prof is the ability to view the query results inline. I created a mockup just to show how this might look like. The real discussion is below the image.
On the face of it, this feature looks very simple. Query the database, throw the results into a grid, done. It is actually not that simple. Let me enumerate all the things that complicate this feature.
The simplest thing is a big stumbling block. How do I get the connection string?
I can make the profiler figure out what the connection string is on the profiled application. That is a relatively simple task from technical perspective. It also open up a whole can of worms. Connection strings are a considered to be highly valuable, and getting the connection string from a running application is a big No! from the security & regulatory perspective.
And that is assuming that I can actually make use of the connection string. In many cases, the connection string point to a database that is not accessible from a developer machine, or not accessible as the database user.
So we remove the “auto detect connection string” feature and move to the next issue. I am not supporting just SQL Server. I am aiming to support all major databases that NHibernate support. But you cannot connect to a MySQL database (to take a non random example) without referencing MySQL’s dlls. Am I suppose to take a dependency on all possible drivers? For that matter, I simply cannot distribute those drivers with NH Prof. MySQL’s drivers are GPL. As such, they are inherently incompatible with commercial software.
So now I need to dynamically discover and load dlls. And that probably involves some sort of UI to search for them, and error handling for all sorts of interesting problems.
Then we have additional issues. What happen if you try to see the results of a DELETE statement? Or execute some sensitive stored procedure.
None of those issues are impossible to resolve, they are just things that complicate a relatively simple feature and make it much more complex.