-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: LovedJohnySmith
Message 1 in Discussion



Hi Folks!!



 many of our frndz wanna noe ab't this
question, so i would like to answer this questions

 

  Q: any advantages C# would
have over Visual Basic (VB) in terms of the framework?

  Answer: Regarding C# vs. Visual
Basic, it really primarily comes down to what you already know and are
comfortable with. It used to be that there was a large perf difference
between VB and C++, but since C# and VB.NET use the same execution engine,
you really should expect the same perf. C# may have a few more "power"
features (such as unsafe code), and VB.NET may be skewed a bit more towards
ease of use (e.g. late bound methods calls), but the differences are very
small compared to what they were in the past.



Q: Okay, can we contrast C# with VB.NET?
Questions usually come in the form of "I know you guys say VB.NET
and C# let you do the same thing, but C# was designed for the CLR, so I
don't believe you when you say VB.NET is just as good."

Answer: Regarding C# versus VB.NET,
the reality is that programmers typically have experience with either C++
or VB, and that makes either C# or VB.NET a natural choice for them. The
already existing experience of a programmer far outweighs the small differences
between the two languages.



Q: Could you discuss the security
of the config files. I have seen a lot of concern that since they are simple
XML files, they can be hacked into easily.

Answer: We do block all access to the
config files from remote users. However, I think the concern people have
is whether a rogue user who gets access to the config file can modify and
take over things. Note that this problem exists with ASP today as well,
in that the metabase APIs can be written to, which would effectively do
the same thing. However, there are some things that you can do to reduce
this problem. Specifically, with ASP.NET we support the ability to "lock
down" settings at a parent directory. For example, you might want
to lock down the security identity of the worker process (i.e.: the username
it runs under) at the machine level and then restrict sub-applications'
abilities to override it.



Q: I've seen a lot of concern that
data can be passed page to page (ASP to and from ASP.NET).

Answer: Since we really use standard
Web techniques, passing info page to page should not be a problem. However,
page to page in ASP and ASP.NET typically assumes services that are provided
by each, such as session and application state. These services are not
shared, and so you can't rely on them. I have a list of things you
can do to ease migration of ASP code to ASP.NET. 

1.        Use
only a single language within the ASP application. Don't intermix VBScript
and JScript together in the same page (in general a bad programming practice
with ASP, but also a migration issue for ASP.NET in that we now require
only one inline <% %> language. 

2.        Explicitly
declare all of ASP page functions within a <script language="VBScript"
runat=server> block as opposed to <% %> blocks. In ASP.NET we
no longer support this later function declaration option. It is just a
copy/paste change in order to fix I 

3.        Explicitly
use VBScript's "Option Explicit" keyword at the top of every
ASP Page (this will become the default with ASP.NET and will also ensure
that you write slightly better code today). 

4.        Use
the "Call" keyword anytime they call a subroutine in VBScript
today (for example: "Call FooBar (1, 2)"). This will enable/require
them to wrap parenthesis around all subroutine arguments (if you don't
use the "call" keyword, then VBScript today will raise a compilation
error if you have parentheses). In VB.NET, parentheses are now required
(note that the "call" keyword is still supported in VB.NET).
So if they didn't use the "call" keyword, they'd have to go back
and change all subroutines. 

5.        Avoid
relying on "default properties" in VBScript, and instead fully
qualify property references: (For example, with an ADO Recordset write:
rs("a_name").Value instead of just rs("a_name")). Default
properties are no longer supported in VB.NET. 

6.        Avoid
using "render function" tricks (a specific unintended hack/trick
that people can use in ASP but which was never intended as a feature).
Instead explicitly use Response. Write blocks when constructing render
functions





Q: Please explain how Long and Short
Weak References work and the usage scenarios for both.

Answer: The differences between long
and short weak references are when the object reference inside the weak
reference gets nulled out.

Q: So if the reference is held after
GC then it is considered long?

Answer: For short references, the contained
reference gets nulled out as soon as the object is deemed unreachable.
This is ultimately more performant because we remove the reference sooner.
Long weak references are nulled after the object has been finalized.






DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery of the message to such person) and may contain legally privileged and 
confidential information belonging to Tata Consultancy Services Limited. It must not 
be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever 
manner) by any person other than the addressee. Unauthorized use, disclosure or 
copying is strictly prohibited and may constitute unlawful act and can possibly 
attract legal action, civil and/or criminal. The contents of this message need not 
necessarily reflect or endorse the views of Tata Consultancy Services limited on any 
subject matter.

  Any action taken or omitted to be taken based on this message is entirely at your 
risk and neither the originator of this message nor Tata Consultancy Services Limited 
takes any responsibility or liability towards the same. Opinions, conclusions and any 
other information contained in this message that do not relate to the official 
business of Tata Consultancy Services limited shall be understood as neither given nor 
endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy 
Services Limited. If you have received this message in error,  you should destroy this 
message and may please notify the sender by e-mail. 

 Thank you.



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to