Friday, October 31, 2008

Debugging without break the code.


In a earlier project that i had worked, i used remote debugging, that work just fine, until the network policies were changes, and then it was extremely painful to make some kind of debugging, and i then i make use of the old fashion debug of using Response.Writeln(value to debug) or Debug.WriteLine(value to debug).

Today i found a hidden feature of the VS debugger, call "When Hit...". That feature gives the possibility to use breakpoints has run time markers to extract values.

After you select the breakpoint with right mouse click, a window appears so you can configure the behaviour of your breakpoint.


In the textbox Print a message we write the syntax of what we want the debugger to tell us, when he passes on that breakpoint. As an example on the output window will appear this messages if we configure the breakpoint as the window above.
Function: Some_Event(object, System.EventArgs), Timestamp: "18:15:54"
Function: Some_Event(object, System.EventArgs), Timestamp: "18:15:54"
(...)

This feature also allows the execution of a macro, witch provides other process to be trigged by our breakpoint.

Tuesday, October 28, 2008

Handling a Timeout on a Async Request.







Today i got a chalange to break trought, that was handling a Timeout on a Async Request, and i find out that the solution was in adding to the HTML source a Page Request Manager that validates if the request fall into a Timeout. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, args) {

if (args.get_error() && args.get_response().get_timedOut()) {

// Tratar o timeout

// colocar o errorHandled = true para evitar receber a popup gerada pela biblioteca de AJAX.

args.set_errorHandled(true);

}

});



And belive me, it works ...

Monday, October 6, 2008

Books, Books and more Books


Here are some links to free Technical Books

Freecomputerbooks.com
Freetechbooks.com
Onlinecomputerbooks.com

Sunday, October 5, 2008

How was Microsoft Dreamway

In friday the Dreamway event occur in the Centro Cultural de Belém (CCB). Another event to review old friends, colleagues and to know more about the new Microsoft Technologies.

After checking in, i assist the Pedro Rosa and Nuno Costa session, that talk about the new tendencies in development, and they explain the Software as a Service concept and show some demos, where we can saw what Microsoft technologies were able to do, such as Silverlight in rich presentations and User Interfaces, such Virtual Earth in maps, or the Live services

Next, i had a coffee break and then i went to a session that talk about the vantages of using the Visual Studio Team System, and in witch way that unit test could be created in this Integrated Development Environment (IDE).

In the next session, presented by Ivo Ramos, i was able to see how easy is to developers and database administrators (DBAs) can work together, and how Visual Studio Team System 2008 Database Edition can help with that task.
Using and database project, developers can work and save the database schema into source control, and also stored procedures, tables etc.

After lunch, Miguel Caldas presented whit is peculiar style, the main features of the new IE8, where one of the most important is the backward compatibility with previous browsers, by telling to IE8 to assume the behavior of IE7, IE6 or even IE5.

In the middle of the Miguel Caldas presentation, at the sound of loud rock music and wrestling star style, Microsoft CEO Steve Ballmer showed at the event, and in front of a majority audience of developers he said that the biggest strength to mobilize an economy was "Developers, Developers, Developers", and Microsoft mission was to guarantee the conditions and tools that developers can do their job.

After the Steve Ballmer session i went to assist an session about ADO.NET Data Services and Microsoft Entity Framework, brilliant presented by Nuno Silva.
Nuno Silva presented the way how does the MS Entity Framework work, he show that the MS Entity Framework is an abstraction of the data model witch the developers only needs to know the entity that he wants the data from. Instead of making a selection with ten inner joins to get an entity, with MS Entity Framework he can create those entities. Another aspect of the MS Entity Framework is that you can create an entity that inherits from another entity.
The ADO.NET Data Services also know as Astoria, is the getting the data access layer (DAL) in a Representational State Transfer (REST ) way, by an URL like an SOAP web service.