开发者

when should i use multi-tier web application instead of single tier web application?

original question

when should i use multi-tier web application i开发者_如何学Gonstead of single tier web application?

update to my question

i accepted the following definition to differentiale "Tier" and "Layer"

Layers Refer to specific layers of abstraction with in an application (software) where as tiers Refer to the physical residence of those layers (hardware)

App.Layer == "Software"-----logical App.Tier == "Hardware"------physical

Layers:

1) presentation layer

2) business layer

3) data access layer

4) data layer

5) external system access layer

Tiers:

1) Presentation tier (webserver)

2) Data tier (database server)


Let's start by asking, will the application hold data? If it does, is the data going to be read by multiple users concurrently? How often? Based on the answer to these questions (and many other) you might want to decide whether a database is the way to go.

As far as layers (UI, Data Access, Business Logic, etc) is concerned, it trully depends on a project by project basis. Are you developing a web app for proof of concept? Are you expecting it to maintain it? Do you trust all the developers in your team? But my rule of thumb is to alway use layers unless i'm throwing something together really quick to either prove something or know it will never be maintained and I need to do it fast.

If you decide to use a framework such as MVC, MVP, MVVM, etc then by default you're dividing your app into layers.

Keep in mind that these divisions help you isolate certain aspects of your app, which in turn allow you to easily work with TDD, separation of concerns, maintainabilty, etc.

In conclusion, you have to look at your requirements, goals, team members, and short and long term objectives and decide. There is no white or black answer here


when should i use multi-tier web application (Tier == "Hardware"------physical)

Scalability.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜