Saturday, 13 February 2010

Trick for creating a ‘notification’ screen without AJAX – ASP.Net 1.1

If you are developing on ASP.Net 1.1, the first thing which makes you lose the will to live (especially, if you’re accustomed to ASP.Net Ajax) is obviously the missing AJAX framework!

There is very little you could do with ASP.Net Forms for example, displaying a notification screen when you are processing something in the background after a post pack.

Without using jQuery , Javascript XMLHttp Requests or an open source AJAX framework for ASP.Net 1.1 your probably stumped , so was i., until i found out a trick to do something similar but with a post back (oh, what the heck!, but it still works, given the fact that i can display a notification screen before i start a lengthy process on the server.)

The Trick.

0] Create a session object , let it be an instance of a class which has some properties than can be set.

1] In the Form_Load hander, invoke your lengthy process depending on a Boolean property in your session object.

3] On the dreadful postback, when you want to start the ‘lengthy process’, Set your session object’s Boolean property and do a Response.Redirect(“yourwaitingscreen.aspx”). This will show the waiting screen immediately, however you have still not started the lengthy process.

4] Finally, starting the lengthy process is easy.

Add this in your <meta> tag to “yourwaitingscreen.aspx” to do the magic.

<meta http-equiv=”refresh”; content=1 url=”your_lengthy_process_aspx_page.aspx”>

I can hear the Gotchas !!! and ahas!!! now.

The way asp.net processes the request is still synchronous., remember no AJAX either. But, we are taking advantage of the synchronous processing itself. i.e when we add the

‘<meta http-equiv=”refresh”; content=1 url=”your_lengthy_process_aspx_page.aspx”>’ line to

“yourwaitingscreen.aspx”, you are loading the page, which starts the ‘lengthy process’, but since you are already in the ‘waiting screen’, you need not do anything. you also get a progress bar with IE and Firefox etc. (bonus!!!)

Drawbacks:- postbacks and logic in your Form_Load to start the ‘lengthy process’ (can be accomplished using a session variable as discussed above)

But, that’s fairly trivial given the fact that you are telling the user that you are doing something in the background which is going to take some time. (as simple as that.) – with a progress bar inherently displayed by the browser.

Advantages

It’s maintainable because the ‘lengthy process’ can be loosely coupled with your UI or service. You can re-factor/enhance/test your code for ‘lengthy process’ in isolation, which makes it scalable and may be reusable!

Thursday, 11 February 2010

Visual Studio 2010 and .Net 4 RC

WhooHoo!!
Download everything from here
Catch the action here
I’m having a play on the following, till the RC expires!
1] VS 2010
2] TFS
3] Lab Management 
4] Test Professional
5] Agents -Visual Studio Agents 2010 enables scale-out load generation, distributed data collection, and distributed test execution.

Wednesday, 10 February 2010

Once upon a midnight dreary, while I pondered, weak and weary…

Machine Learning and Computational Linguistics are a fond hobby of mine. Someone ready to sponser money and family permitting time, i want to delve into it any day. I am very excited of Google’s attempt at transliteration so far. It has certainly made writing in foreign languages exciting with on the  fly ‘transliteration’ embedded into mostly all of google’s products, gmail, blogger,orkut etc. to name a few. This has added lot of joy and excitement into many native language communicators.

For a nation like the United States or the United Kingdom, such tools will hardly have any impact (Keeping in mind the majority of english speaking/conversing population). But for a country like india, It’s MASSIVE. India has at least 25 –120 regional languages.

I strongly believe that for a civilization to flourish language - ‘bhaasha’ or call it ‘mother tongue’ is the primary and most fundamental tool that humans could have developed. Indians are pioneers in Linguistics and Logic. Given the very fact that a nation of 1 billion today speak so many different languages is a very simple and strong example of the  Linguistics and Logic revolution in India.

In a diversified state such as India, Computational Linguistics can play a very significant role. Imagine a child writing a letter to his/her mother in a language that she can converse in. The mother might not know to read or write in a different language, However the child will go to school and learn english, call it modernization or existentialism the language english has bestowed upon us. ‘This is a very simple common day scenario in rural india.’

I am very sure that as we all evolve conversing in english everyday into the 21st century, Research in computational linguistics will only start adding much more values into our ‘diversified’ culture and lives.

Therefore Computational Linguistics can be seen as a ‘fundamental tool’.

Simply because for any language to survive, it needs speakers. Amongst the ubiquitous things we can think ok ‘Culture/Tradition’ alone does not help a language to survive, the moment a language loses it’s speakers, it starts to decay and disappear.

After all, the ‘Vedas’ (a philosophical discourse) says ‘Flowers of different colours will only make the garden bright’. Computational Linguistics tools can only enrich a diversified civilization and get it in equilibrium with the ‘modern’ world.

Tuesday, 12 January 2010

Bye Bye iPhone and Nexus one…

 

More Here and Here

Light Peak

 

1. Light Peak

Light Peak is the code-name for a new high-speed optical cable technology designed to connect your electronic devices to each other. Light Peak delivers high bandwidth starting at 10Gb/s with the potential ability to scale to 100Gb/s over the next decade. At 10Gb/s, you could transfer a full-length Blu-Ray movie in less than 30 seconds. Optical technology also allows for smaller connectors and longer, thinner, and more flexible cables than currently possible. Light Peak also has the ability to run multiple protocols simultaneously over a single cable, enabling the technology to connect devices such as peripherals, displays, disk drives, docking stations, and more.

More here and here

For a decade which i think would make iphone a laughable ‘invention’ and

inch closer towards augmented reality.