什么是架构 [英] What is the architecture

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

问题描述



我是Web开发的新手.阅读有关n层架构的信息,并有一个非常基本的疑问.我的项目使用带有存储过程和sql函数的SQL Server来访问数据.用于访问这些存储过程和功能的代码以及业务逻辑被组合到单个dll中.后面的aspx代码将调用dll.这是3层还是2层架构?由于我们使用的是存储过程,因此拥有单独的数据库访问层的好处是什么.拥有单独的数据库访问层是否可以提高性能?

Kavya

Hi,

I am new to web development. Read about n tier architecture and have a very basic doubt. My project uses SQL Server with stored procedures and sql functions to access the data. The code for accessing these stored procedures and functions and the business logic are combined into a single dll. The aspx code behind calls the dll. Is this a 3 tier or 2 tier architecture? Since we are using stored procedures , what would be the advantages of having a separate DB access layer. Will having a separate DB access layer improve the performance?

Kavya

推荐答案

您介绍的Senario是2层体系结构.
如果业务逻辑是分开的,那么它就是3层.

拥有单独的数据库访问层会带来什么好处"

它肯定会使您的应用程序可重用,并且对其他将在您的项目上进行工作的人来说非常简单.

有时,您需要使用相同的过程在不同的页面上进行调用,因为您可以直接转到该层并搜索该过程并重复使用.

假设您需要对过程中的代码进行某些更改,或者在过程中添加了新参数,那么您只需要向该层中调用过程的现有函数中添加一些代码即可;

但是假设没有该层,那么无论在哪里使用该过程,都需要在很多地方进行代码更改,这将使您难以在项目中的任何地方进行搜索.

因此,它只是减少了您将来的修改并为维护增加了价值...
The senario you explained is of 2-tier architecture.

If the business logic is separated then it is 3-tier one.

"what would be the advantages of having a separate DB access layer"

It will surely make your application reusable and very much simple for others who will work on your project.

Sometimes you require the same procedure to call at different pages, for that you can directly go to that layer and search for that procedure and reuse that.

Suppose you need to do certain changes to the coding in the procedure or you added new parameter to the procedure, then you will just have to add some codings to the existing function calling the procedure in that layer;

But suppose if you don''t have the layer, it will be difficult for you to search everywhere in the project whereever the procedure is used and need to do the changes in coding at many places.

So, it simply lessens your future modifications and adds value to maintainance...


设计模式无法提高性能,但是更强大.
Design pattern can''t improve the performance.But it''s stronger.


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

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