Friday, October 31, 2003

Comparisoon of Java and .NET Webservices


Comparison of Microsoft and Java Frameworks - White Paper : Web Services - .NET & JAVA : California Software

.NET Weblogs @ ASP.NET: "Want to achieve it ? (In SQL Query Analyzer)
I found every MS Employee (SQL guys) doing this...so I decided to learn it thier way :)

ActivityShortcut
Bookmarks: Clear all bookmarks.CTRL-SHIFT-F2
Bookmarks: Insert or remove a bookmark (toggle).CTRL+F2
Bookmarks: Move to next bookmark.F2
Bookmarks: Move to previous bookmark.SHIFT+F2
Cancel a query.ALT+BREAK
Connections: Connect.CTRL+O
Connections: Disconnect.CTRL+F4
Connections: Disconnect and close child window.CTRL+F4
Database object information.ALT+F1
Editing: Clear the active Editor pane.CTRL+SHIFT+DEL
Editing: Comment out code.CTRL+SHIFT+C
Editing: Copy. You can also use CTRL+INSERT.CTRL+C
Editing: Cut. You can also use SHIFT+DEL.CTRL+X
Editing: Decrease indent.SHIFT+TAB
Editing: Delete through the end of a line in the Editor pane.CTRL+DEL
Editing: Find.CTRL+F
Editing: Go to a line number.CTRL+G
Editing: Increase indent.TAB
Editing: Make selection lowercase.CTRL+SHIFT+L
Editing: Make selection uppercase.CTRL+SHIFT+U
Editing: Paste. You can also use SHIFT+INSERT.CTRL+V
Editing: Remove comments.CTRL+SHIFT+R
Editing: Repeat last search or find next.F3
Editing: Replace.CTRL+H
Editing: Select all.CTRL+A
Editing: Undo.CTRL+Z
Execute a query. You can also use CTRL+E (for backward compatibility).F5
Help for SQL Query Analyzer.F1
Help for the selected Transact-SQL statement.SHIFT+F1
Navigation: Switch between query and result panes.F6
Navigation: Switch panes.Shift+F6
Navigation: Window Selector.CTRL+W
New Query window.CTRL+N
Object Browser (show/hide).F8
Object Search.F4
Parse the query and check syntax.CTRL+F5
Print.CTR"

All about the PDC03


PDC Sessions

Thursday, October 30, 2003

FTPOnline - VSLive! New York 2003 - Get Ready for VS.NET Changes

Wednesday, October 29, 2003

ASP.NET version switcher


Denis Bauer's ASP.NET Version Switcher

Tuesday, October 28, 2003

VS.NET Tips & Tricks notes


From Paolo Marcucci
This is a BoF session where attendees and presenters (from Canada, yay) share neat little things (some known, some obscure) about working in VS.NET.

Creating a class that implements an interface, pressing Tab after the interface name will create stubs for the methods of the interface
Ctrl+] jumps to the next end block.
Ctrl+Shift+] selects the block.
Ctrl+Shift+I enters incremental search.
Ctrl+Space (sometimes Ctrl+J, depending on the language) enters IntelliSense.
In command window you can create aliases (alias command) to access all menu entries
In command window, immed enters immediate mode.
Change Dockable from the context menu of the Output window to put it into the source panes.
Select New Horizontal/Vertical Tab to split the source window to view two or more files at once.
Ctrl+Tab navigates through open source windows (Ctrl+Shift+Tab navigates backwards)
Clicking Mark All in the Find dialog will create a bookmark for each entry found.
Alt+Drag selects arbitrary blocks of text.
Entering a TODO comment (// TODO: do something) will insert the comment in the task list. You can customize the list of tags that will go in the task list from the Options dialog.
Alt+Shift+Enter toggles the full screen code window.
Toggling Search Hidden Text in the Find dialog will search into the collapsed regions.
In C#, from the Class View, right click on a class and select Add > Property to get a wizard to automatically build a property structure.
When removing a file from a solution, remember to take it out also from the source code manager (Visual SourceSafe or CVS) to avoid having it compiled and built nightly.
Don't use MDI :)
Lots of built-in aliases for the Command Window.
In Solution Explorer, right click the solution, select Properties and toggle Multiple Startup Projects to start both the client and the server (if you have them) applications.
Shift-F7 or Ctrl+PgUp/Ctrl+PgDn toggles between views on your file (Design, Source, HTML, Data, etc...)


Monday, October 27, 2003

.NET Weblogs @ ASP.NET: "Another reason not to deploy Debug code...
In the CLR Internals class today, Jeff Richter gave a great deal of really good information. One thing that I should have figured, but did not really know was about the impact of running Debug code on Garbage Collector performance. Say you have code like this:
public void foo()
{
BigOb big;
big=new BigOb();
System.Console.WriteLine('Big is Really big! {0} ',big.GetSize());
// 1.
LongSlowOperation();
// 2.
}

The C++ programmer in me says that big will be in scope until just after the curly brace below the comment 2. Turns out that in release mode, the big object will be available for garbage collection at the 1 comment (because the framework can tell that it is not referenced again in the code) unless the code is debug code. In that case, the object will be available and not garbage colected as a convenience for you while debugging. In most cases the difference may not be critical, but it just might in some cases.
Consider yourself warned."

.NET Weblogs @ ASP.NET: "For you who do not know EIF:
The Microsoft Enterprise Instrumentation framework (EIF) enables applications built on the .NET Framework to be instrumented for manageability in a production environment. This framework provides an extensible event schema and unified API which leverages existing eventing, logging and tracing mechanisms built into Windows, including WMI, the Windows Event Log, and Windows Event Tracing. An application instrumented with this framework can publish a broad spectrum of information such as errors, warnings, audits, diagnostic events, and business-specific events. In addition, Enterprise Instrumentation enables tracing by business-process or application service, and can provide statistics such as average execution time for a given process or service."

Thursday, October 23, 2003

Excellent .NET Security Whitepaper and Web security Link



IMO, reading everything you can get your hands on is usually a good
idea. If you're not sure about a book, go to a bookstore and thumb
through a copy before buying. another excellent, free resource is the

ASP.NET security best practices whitepaper

While you're at at, you might as well also grab

Improving Web App Security

Ways to connect to DB2 from .NET


Coming from a Microsoft guy (who also wrote aspwiki.asp).
Google Groups: View Thread "Connecting to DB2 UDB (v7.x)"


Creating a .NET Client that Uses DB2 DADX Web Services

IBM Software > Application Development > DB2 Developer Domain

How to secure only certain asp.net pages


This is from google. My problem is turning only certain pages for authentication . Google Groups: View Thread "Turn Off security for specific pages"

A very good introduction to ASP.NET authentication


MICROSOFT® .NET ADVISOR®: Get Started on ASP.NET Authentication - - ADVISOR.com - -

Wednesday, October 22, 2003

Filling DataSets with Multiple Tables


Filling a DataSet with multiple tables can be done by sending multiple requests to the database, or in a faster way: Multiple SELECT statements can be sent to the database server in a single request. The problem here is that the tables generated from the queries have automatic names Table and Table1. However, the generated table names can be mapped to names that should be used in the DataSet.

SqlDataAdapter adapter = new SqlDataAdapter(
'SELECT * FROM Customers; SELECT * FROM Orders', connection);
adapter.TableMappings.Add('Table', 'Customer');
adapter.TableMappings.Add('Table1', 'Order');

adapter.Fill(ds);

Tuesday, October 21, 2003

A lot of asp FAQS

I am using luvdotnet(at)hotmail to enter these treasuryWintellect - Resources - FAQs - ASP.NET FAQs

A lot of asp FAQS

I am using luvdotnet(at)hotmail to enter these treasuryWintellect - Resources - FAQs - ASP.NET FAQs

Tuesday, October 14, 2003

add this Dynamic Sql post
Tek-Tips - Microsoft SQL Server: Programming FAQs

Localization of Web Apps with 10-lines of code

Wicked Code: Code Your Way to ASP.NET Excellence -- MSDN Magazine, August 2002

DataGrid Sorting and Multi-column Sort


Here are some articles about sorting, reverse sorting in ASP.NETEffective Sorting in ASP .NET DataGrids

Sunday, October 12, 2003

Ten Rock-Solid UI ASP.NET Tips

VISUAL STUDIO .NET TIPS - searchVB: 10 rock-solid UI tips

Embedding Javascript into your ASP.NET pages

General ASP.NET - Table of Contents. The key is through 2 functions. RegisterStartUpScript and the RegisterClientScriptBlock.

.NET Magazine online is available here

.NET Magazine Archives - a lot of articles worth reading.

Java and .NET interop via XML


XML & Web Services Magazine � Bridging the Gap - This is the December 2002 issue of the magazine. Lots of useful tips for this mag.

Download the VB.NET resource kit

The Visual Basic .NET Resource Kit

Implementing public interfaces in protected mode


Quite often, we create interfaces as a way to allow extensibility in our OO projects. But as you know, all the members of the interface are public. So, if we don't want to polute our objects public members with the implementation of an interface that was intended for extenders and not the regular user, we can simply make the interface implementation explicit, effectively hiding the member from the class public interface:

public interface IExtensible
{
void Extend( object other );
}

public Customer : IExtensible
{
void IExtensible.Extend( object other )
{
// Do something really cool.
}
}
So far so good. Now the Extend method will no longer appear in intellisense nor will it be available directly. To use it, it has to be casted to the IExtensible interface, but that isn't a problem at all, since most probably, the feature is intended to be used by a method that receives a parameter of type IExtensible anyways.
But now the interface implementation can't be extended by inheritors of Customer! A pattern I've seen quite often throughout the .NET Framework to solve this is doing a double implementation of the method, one private (the explicit interface implementation) and another protected and virtual, so that inheritors can effectively override the base class' private interface implementation behavior:

public class Customer : IExtensible
{
protected virtual void Extend( object other )
{
// Do something really cool, but let inheritors change that.
}

void IExtensible.Extend( object other )
{
// Passthrough to the "real" implementation.
Extend( other );
}
}

What we got now, is a non-poluted public interface for our class, yet inheritors have full access to features that were intended for their use, such as our interface that allows extensibility. If they don't want to inherit our implementations, they can always implement the interface directly, of course:

public class ExtendedCustomer : Customer
{
protected override void Extend( object other )
{
// Stop doing cool things and just do the work.
}
}
posted @ 10/11/2003 6:55 PM by Daniel Cazzulino

Saturday, October 11, 2003

ASP.NET client-side scripting - and much more

Ken's Corner - The validation controls stole my client-side click event.

Wednesday, October 08, 2003

Database independent ADO.NET



One of the main complains about ADO.NET it's that you cannot write code that is database independent.

There are a number of libraries to accomplish it, and the latest DAAB version also supports it.

I think the designers of ADO.NET acknowledged something that we don't want to: each database engine is different, we will write different SQL code, and we will need different APIs.

The most visible difference is parameter markers. SQL Server native ones are prefixed with '@'. In OleDB we used '?' which required the SQL driver to parse the sentence and change them to '@'. In .NET all the Data Providers use their native parameter markers, so you have ':' for Oracle, '@' for SQLServer/Access, etc.

This implies that is very difficult to write a parameterized SQL sentence that can be database independent. 'SELECT * FROM CUSTOMER WHERE CustomerId = @CustomerId' won't work in Microsoft's Oracle Data Provider even if we are using the generic IDb APIs.

Even if ADO.NET provided a generic API and even if it supported the same parameter markers in each Data Provider, we all know the SQL sentences are different in each database engine. Doing a SELECT * FROM CUSTOMER always works, but when you need to deal with autonumbering, database-specific types (think uniqueidentifier in SQL Server), outer joins, then it's not possible to use the same SQL sentences.

Suppose you _can_ write generic SQL, because you have simple SQL statements that are supported in all the databases you need, or the places where you need different statements are not many.

Then you code:

IDataReader reader = myAbstractCommand.ExecuteReader(“SELECT CustomerID FROM CUSTOMER);

while (reader.Read()) short customerId = reader.GetInt16(0);

And then you run Anakrino, open the OracleDataReader class, and find:

public virtual short GetInt16(int i) {
throw ADP.NotSupported();
}

...

Writing database independent code is a dream. Let's wake up.

~ Andres Aguilar

Various C# Code Samples to download

Download 23 C# Code Samples

Tuesday, October 07, 2003

Code Access Security


Code Access Security