What happend to the Client ScriptCallback feature of Asp.Net 2.0, Well nothing really happened to Asp.Net 2.0’s client call back…its there and MS Ajax.net (aka atlas) actually uses this in the back end. The reason why we don’t here about it is…it is a paint in the you know what! To actually get anything done….but there was less of a foot print on the page.
Right now we have a couple API’s for writing Ajax is asp.net:
- MS Ajax.Net (aka Atlas)
- Ajax.Net or Professional Ajax.Net
Tips when not to Use Ajax… because the list of when to use it is actually longer…
- If a callback is going to Redirect a user when it get back to the client, just do a post and redirect him or her from there because it gets annoying. If it has to go all the way to server just do a post and redirect or do a Server.transfer.
- Don’t do a call back if it take 30 sec to return, but if you must give the user a message so he or she knows your processing data.
Script Callbacks in ASP.NET
So continuing with the BI theme lets take a look a small example.
Sample Code: http://quick-max.com/samples/BI/BI-Lite.zip
So i was thinking how much SQL would I have to write to actually get this to work
at the smallest level. The answer if one simple view that gave me Primary Key, and foreign key mappings that i called PkFk (go figure). The rest of the data retrieval was handled by Subsonic package, why write a whole data layer when all that i am interested in is Table names and keys.
The code only really has two files that you want to take a look at default.aspx.cs and TblGraphItem.cs. Also you will need to run the create view sql script on the pubs database….but you can basically point it to any database and change the code slightly.
so what were my results, very simple use reporting tool with some drill down. Where i didn’t have to write table specific code.
Examples: ( ‘->’ will be used to signify drill down)
1. Titles -> Sale
so you can see that I output what sections drill down to what data. I have over simplified the notion of BI but this is the basis, the difference is all you need is the View and its plug and play from there on… i don’t have to massage my data to accommodate reporting.
In researching for B.I tools to be used at work, that could suite our needs I quickly found out a miss conception….there isn’t a plug and play reporting tool. SQL Reporting services, Endeca analytics, cognus ….all require a lot of work to setup.
Now lets say i want to create a small and very simple reporting tool with drill downs. What would i have to know to get the base up.
- List of all tables
- All relationships between table
- If relationships could be marked as graph it would be useful to know top level parents…and the Nth level children.
So if we construct a database with all Primary and Foreign keys set correctly, steps 1 & 2 we can extract from the database catalog.
Part 3 should be taken care of when we start putting entires into the graph.