Wrox Programmer Forums
|
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2009, 11:39 AM
Registered User
 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default File structure best practice

Hi, apologies is this is a newbie question or if it is the wrong place to post this. I have written several VB .NET "solutions" and will continue to write several more. I have certain code which is re-used like functions for example. I want to separate the functions, which do not change very much from the new code which uses the functions.
So far I have worked out how to separate the "function" code into either a separate "class" (which then needs to be both "imported" and "instantiated" in my code each time I want to use a particular function) or a separate module that has the functions defined publicly (in which case I don't seem to need to do anything as long as the module is in the sulution explorer window).
In Matlab for example there can be a whole directory tree of functions all in different categories but that are all included in such a way that I don't need to do anything special each time I use the function. It is just sort of implied that all the functions in the tree are available in all code.
Is there a way to set up a set of functions that are always available to me without a lot of hassle?

Thanks in advance for any direction you can provide.
 
Old August 10th, 2009, 05:58 AM
Authorized User
 
Join Date: Jul 2007
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default Use the different file approach.

In my opinion, your idea to separate the functions into classes is much more legible as it makes your code more easy to maintain.
As for the way Matlab works, it sure gives you the opportunity of making all the functions available but with a huge cost of program overhead (loading and unloading).
Taking the way of maintaining separate code files for similar functions is always advised as its much easier to load and also maintain them.
Hope this sheds some light on your issue.

Regards.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using File structure in ASP.NET Spider ASP.NET 3.5 Basics 2 February 23rd, 2009 05:30 PM
practice help with C++ mastrgamr C++ Programming 2 November 2nd, 2006 07:55 AM
How to view the remote file structure on ur machin Goldee J2EE 0 January 25th, 2006 03:57 AM
File to Structure? TheShadow C++ Programming 3 October 23rd, 2004 05:29 AM
thePhile (VB) file folder structure... jaspe BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 1st, 2004 08:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.