什么都放到哪里? [英] Where to put everything?

查看:64
本文介绍了什么都放到哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

由于我是oop和vb.net的新手,所以我想问一个简单的问题.

我听说类是对象等的蓝图,但找不到有关如何构建程序的任何信息.

我应该创建一个.dll并将所有类放入其中,从主程序中调用它并使用那里的对象吗?
我应该创建一个项目,创建主程序中所需的所有类,然后将整个内容编译为.exe吗?
我应该使用其他技术吗?

我的程序应该如何架构? :doh:

Dear All

Since I''m new in the world of oop and vb.net I would like to ask you a simple question.

I hear about classes being the blueprints of objects etc but I couldn''t find any information on how to structure a program.

Should I create a .dll and put all my classes in, calling it from my main program and using the objects from there?
Should I create a project, create all classes needed in the main program and compile the whole thing to a .exe?
Should I use another technic?

How should my program be architecture? :doh:

推荐答案

您是否正在编写对多个项目有用的类?如果是这样,将这些类放入库(DLL)中将很有意义.如果您的类是特定于您的项目的,则为它们创建单独的库可能没有多大意义,在这种情况下,您可以将它们包含在可执行项目中.
Are you writing classes that would be useful for more than one project? If so, putting those classes into a library (DLL) would make sense. If your classes are specific to your project, creating a separate library for them may not make much sense, in which case you''d include them in the executable project instead.


只有一个问题.

构造程序的正确方法是什么?
But there is only one question.

What is the proper way of architecturing a program?


好,谢谢您的回答.

进一步扩展我的问题,关于模块...
一个人应该何时何地使用它们,如果一个人应该完全使用它们...

此致
ok, thanks for your answer.

To extend my question a little bit, how about modules...
When and where should one use them, if one should use them at all...

Best Regards


这篇关于什么都放到哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆