Difference between frontend, backend, and middleware in web development

后端 未结 6 1424
清歌不尽
清歌不尽 2020-12-04 06:23

I was wondering if anyone can compare/contrast the differences between frontend, backend, and middleware (\"middle-end\"?) succinctly.

Are there cases where they ove

6条回答
  •  天命终不由人
    2020-12-04 07:04

    Generally speaking, people refer to an application's presentation layer as its front end, its persistence layer (database, usually) as the back end, and anything between as middle tier. This set of ideas is often referred to as 3-tier architecture. They let you separate your application into more easily comprehensible (and testable!) chunks; you can also reuse lower-tier code more easily in higher tiers.

    Which code is part of which tier is somewhat subjective; graphic designers tend to think of everything that isn't presentation as the back end, database people think of everything in front of the database as the front end, and so on.

    Not all applications need to be separated out this way, though. It's certainly more work to have 3 separate sub-projects than it is to just open index.php and get cracking; depending on (1) how long you expect to have to maintain the app (2) how complex you expect the app to get, you may want to forgo the complexity.

提交回复
热议问题