By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

VS.NET Public Namespaces, classes, Function - Conceptual misunderstanding.

P: n/a
Please pardon my completely lack of understanding on the topic.

I have a website I developed with another developer. We are both far
from experts in VB.NET and OOP. We developed the site WITHOUT VS.NET,
compiling vb.net code into a common dll in the bin directory off the
root of the website. That one vb code creates a namespace we import in
all of our ASP.NET code. Compiling was done fromt he command line use
vbc.exec.

The site works well enough.

Now, and please exuse any missuse of OOP terms, we'd like to move the
site to VS.NET and more importantly understand how such a site would
have been developed via VS.NET if a team of developers were building it
and wanted to share code. Some real NOOB type questions below.

1. Because I manually created a DLL, does this classify that as
unmanaged code?
2. In VS.NET, at a high level, how does one create public classes and
functions that ALWAYS available to other developers and applications?
3. We are using VS.NET 2005, I took my vb that compiled into a dll and
Created a new class library, and compiled it. The build seem to run
fine. The code starts like this:

Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Public Class cjason1
Public Function fjason1(ByVal cmd As String) As DataSet

I took the namespace out of the code, but left the imports in, not sure
if that makes sense.

I closed all projects and started a new asp.net website to see I could
find my new class in the object explorer, but I can't.

4. Am I missing something above, and is this how .net developers share
classes? I'm sure I'm completely misguided.

5. How does team explorer, team projects and team foundation work into
what we *THINK* we are trying to do? Keep in mind we are trying to keep
things simple and cheap for starts.

I guess my very noobie question is "how do most shops deploy and manage
classes"

A HUGE THANKS IN ADVANCE TO ANYBODY THAT CAN CLEAR THIS UP FOR ME. I
REALLY DO APPRECIATE ANY HELP YOU CAN GIVE ME!!!!!!!

Apr 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> 1. Because I manually created a DLL, does this classify that as
unmanaged code?
No, you code is managed. Whether you created it with VS.NET or Notepad
doesn't matter. The code was compiled and is run within the context of the
Common Langugage Runtime (CLR), which makes it managed code.
2. In VS.NET, at a high level, how does one create public classes and
functions that ALWAYS available to other developers and applications?
When a class is created, it is marked as "Public" and then the methods
(functions) within it are also maked as "Public". Now, all any other
developer needs to do to use this class and its methods (functions) is to
make a reference to it from thier application, make an instance of the class
and call its methods.
I closed all projects and started a new asp.net website to see I could
find my new class in the object explorer, but I can't.

4. Am I missing something above, and is this how .net developers share
classes? I'm sure I'm completely misguided.
You need to make a project reference from the application that wants to use
the class to the assembly (.dll) that contains the class first. After that,
the class you wish to use will still be inside of a namespace because VS.NET
requires that all classes be in, at least, a Root Namespace. If you took
out your namespace declarations, your Root Namespace is probably the same
name as your assembly (minus the .dll extension).
5. How does team explorer, team projects and team foundation work into
what we *THINK* we are trying to do? Keep in mind we are trying to keep
things simple and cheap for starts.
Can't help you there as I haven't begun using 2005 yet.

I guess my very noobie question is "how do most shops deploy and manage
classes"

A HUGE THANKS IN ADVANCE TO ANYBODY THAT CAN CLEAR THIS UP FOR ME. I
REALLY DO APPRECIATE ANY HELP YOU CAN GIVE ME!!!!!!!

Apr 2 '06 #2

P: n/a
Jason,

In addition to Scott, why do you not just try the Express versions.

To set a commandline for VBC is forever difficult.
But what you ask you have to set in the parameters for that.

With Express all becomes probably easier to understand.

http://msdn.microsoft.com/vstudio/express/

Cor
<ja***@cyberpine.com> schreef in bericht
news:11**********************@i39g2000cwa.googlegr oups.com...
Please pardon my completely lack of understanding on the topic.

I have a website I developed with another developer. We are both far
from experts in VB.NET and OOP. We developed the site WITHOUT VS.NET,
compiling vb.net code into a common dll in the bin directory off the
root of the website. That one vb code creates a namespace we import in
all of our ASP.NET code. Compiling was done fromt he command line use
vbc.exec.

The site works well enough.

Now, and please exuse any missuse of OOP terms, we'd like to move the
site to VS.NET and more importantly understand how such a site would
have been developed via VS.NET if a team of developers were building it
and wanted to share code. Some real NOOB type questions below.

1. Because I manually created a DLL, does this classify that as
unmanaged code?
2. In VS.NET, at a high level, how does one create public classes and
functions that ALWAYS available to other developers and applications?
3. We are using VS.NET 2005, I took my vb that compiled into a dll and
Created a new class library, and compiled it. The build seem to run
fine. The code starts like this:

Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Public Class cjason1
Public Function fjason1(ByVal cmd As String) As DataSet

I took the namespace out of the code, but left the imports in, not sure
if that makes sense.

I closed all projects and started a new asp.net website to see I could
find my new class in the object explorer, but I can't.

4. Am I missing something above, and is this how .net developers share
classes? I'm sure I'm completely misguided.

5. How does team explorer, team projects and team foundation work into
what we *THINK* we are trying to do? Keep in mind we are trying to keep
things simple and cheap for starts.

I guess my very noobie question is "how do most shops deploy and manage
classes"

A HUGE THANKS IN ADVANCE TO ANYBODY THAT CAN CLEAR THIS UP FOR ME. I
REALLY DO APPRECIATE ANY HELP YOU CAN GIVE ME!!!!!!!

Apr 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.