如何在vb.net中构建三层应用程序 [英] how to build three tier application in vb.net

查看:56
本文介绍了如何在vb.net中构建三层应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生
如何在vb.net中构建一个简单的三层Windows应用程序
谢谢您

dear sir
how to build a simple three tier windows application in vb.net
thanking you

推荐答案

从这些C#文章中吸取灵感.
3层架构
3层Architecure CP文章
相同的概念将出现在VB.Net中
Take idea from these C# article.
3-Tier Architecure
3-Tier Architecure CP Article
The same concept will be in VB.Net


尝试以下链接

vb.net中的N层应用程序 [如何在vb.net中构建三层应用程序 [ ^ ]
Try to below links

N-Tier application in vb.net[^]
How to build three tier application in vb.net[^]


这不容易,也不容易解释.我建议您开始对此主题进行一些阅读.
首先,您必须了解面向对象编程 [封装 [继承 [ ^ ]和多态 [ 之后,您距离那里还很远. SOLID原则 [设计模式 [多层体系结构 [对象关系映射器(ORM) [实体框架 [ NHibernate [ ^ ]浮出水面.
中间层"包含业务逻辑.在这里,您可以对业务对象执行操作,例如计算销售订单或发票的总价.该层与您的数据层交互,但不与您的数据存储本身交互.
最后是UI层,您可以在其中向用户展示数据并允许用户与业务层进行交互. UI层的示例可以是WinForms,HTML和CSS或WPF前端.
Google有很多图像代表我刚才说的话, ^ ].

希望能帮助到你!祝你好运! :)
It''s not easy, nor easy to explain. I suggest you start doing some reading on the subject.
First, you must understand Object Oriented Programming[^]. Make sure you get Encapsulation[^], Inheritance[^] and Polymorphism[^]. They are the ''three pillars of OOP''.
After that you are far from there yet. The SOLID principles[^] are key to building robust and re-usable software.
When you get all of these principles you may start reading up on Design Patterns[^].
All these will help you in building Multitier architected[^] software.

Basically, when it comes down to three tiers you have three layers of classes. A data layer, which will interact with your data store. Usually these are some classes that insert, delete, update and get data from a database. Many people use an Object Relational Mapper (ORM)[^] for this. In .NET Entity Framework[^] and NHibernate[^] come to mind.
The ''middle-tier'' contains business logic. Here you perform actions on your business object, like calculating the total price of a sales order or an invoice. This tier interacts with your data layer, but not with your data store itself.
Finally there is the UI layer, which is where you present your data to users and allow users to interact with the business layer. An example of a UI layer can be WinForms, HTML and CSS or WPF front ends.
Google has lots of images representing what I just said, take a look[^].

Hope it helps! Good luck! :)


这篇关于如何在vb.net中构建三层应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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