In principal, despre .NET, VB6. C#,VB.NET, ASP.NET Apoi despre programare si multe alte chestii ... de programare.

Subscribe RSS   Mini tools List

vineri, august 11, 2006

rules To Better Code In English
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

The site
http://www.ssw.com.au/ssw/Standards
is VERY GOOD.
It is a must read.
Some observations, though :


Rules to Better Code
15.Do you have the time taken at the end of a long process?

It's good to have the time * but to display in another box to force the user to push an OK
It's better (like you said) to have a status bar for this

20.Do you use interoperability mechanism for COM object?
CreateObject is usefull, in my opinion, in one situation:
You want your program to function with Word 2000 and Word 2003.
You do not want to have 2 programs with 2 references - but you know for sure that the
function you call are the same in both Words.
So - you reference Word2000, create the project, compile, remove New Word.Application with
CreateObject  - and recompile.

33. Do you use Asynchronous method and CallBack when invoke web method?
You can execute the synchronous call to the web service in a background thread ( or other asynchronous method)


Better Dot Net projects
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx
26.Do you Open your Connection in a Try Block?

quote:
Note:Do not use the 'using' keyword in C#. The using keyword is used to declare a scope out of which the connection will be disposed. For the sake of consistancy, we like out VB.NET and C# projects to be as similar as possible. For both languages you should use a Try..Catch..Finally block.   
end quote

VB2005 HAS using(vezi http://msdn2.microsoft.com/en-us/library/htd05whh.aspx sau http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/languageenhancements.asp?frame=true&hidetoc=true) and I prefer using over try catch finally



Rules To Better Windows Forms
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx

26.Do your List Views support multiple selection and copying?
Quote
Make it easier for the user by enabling the "MultiSelection" property of a ListView and providing a right click menu with a "Copy" item that copies to the clipboard.
end quote
Make the same support for CTRL+C

Rules to Better Interfaces
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx

33.Do you provide a warning before the program exits?
In 99% percent of cases, the user is right - he really wants to exit. If all documents are saved, then exit.
For 1% of cases that a user makes a mistake, do not bother you with that.

0 Comments:

Trimiteți un comentariu

Links to this post:

Creați un link

<< Home

 
Acest blog s-a mutat la http://www.serviciipeweb.ro/iafblog/