什么是脚手架? 它是特定平台的术语吗?

发布于 2024-07-07 03:46:35 字数 33 浏览 10 评论 0原文

脚手架,是什么? 这是仅限 Rails 的东西吗?

Scaffolding, what is it? Is it a Rails-only thing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

丑疤怪 2024-07-14 03:46:36

它不是一个唯一的 Rails 术语,尽管我认为它起源于那里(至少这是我第一次听到它的地方)。

脚​​手架是一个框架,允许您使用很少的代码或不需要代码对数据库执行基本的 CRUD 操作。 一般来说,然后您会按照您想要替换脚手架的方式检查并添加代码来管理数据。 它通常只是为了让您快速启动并运行。

It is not a rails only term although I think it originated there (at least that is where I first heard it.)

Scaffolding is a framework that allows you to do basic CRUD operations against your database with little or no code. Generally, you then go through and add the code to manage the data the way you want replacing the scaffolding. It is generally only intended to get you up and running quickly.

强辩 2024-07-14 03:46:36

不,它还用于其他技术,例如 ASP.NET MVC

它从程序员几乎在每个项目中使用的一些预定义代码创建基本布局,例如:对于数据库数据访问,它可以创建用于创建、读取、更新的 CRUD 方法,删除操作
或者您可以使用它为您的视图/Html 代码创建布局

No it is used in other technologies also such as ASP.NET MVC

it creates a basic layout from some predefined code which programmers uses in almost every project , Eg: for database data access it can make a crud method for create, read, update, delete operations
OR you might use it to create layout for your View/Html Code

策马西风 2024-07-14 03:46:36

脚手架正在编写任何不属于业务逻辑但有助于单元测试和集成测试的代码。

这是一个软件工程术语,不受任何框架或编程语言的约束。

Scaffolding is writing any piece of code that would not be part of the business logic but would help in unit testing and integration testing.

This is a software engineering term and not bound to any framework or programming language.

痴意少年 2024-07-14 03:46:36

不,脚手架不是特定平台的术语,但是许多人在 Ruby on Rails 或 .NET 上下文中都知道这个术语。

还有很多执行 javascript 脚手架的工具:

这些工具也是称为代码生成器

No, scaffolding is not the term for the specific platform, however many know this term in the context of Ruby on Rails or .NET

There are also plenty of tools that perform javascript scaffolding:

Those tools are also known as code-generators

表情可笑 2024-07-14 03:46:36

脚手架是当您不想创建结构的所有部分(例如模型、视图等)并希望一次性生成它们时使用的术语。 很多框架都使用这种技术,我在做 odoo 时研究了它,但给出的大多数参考文献都是 ruby​​ on Rails :)

Scaffolding is the term used when you don't want to create all parts of the structure such as models, views, etc. and want to generate them all in one go. A lot of frameworks use this technique, I studied about it while doing odoo but most of the references given were to ruby on rails :)

舟遥客 2024-07-14 03:46:36

脚手架不是特定于平台的。 通俗地说,脚手架工具为新应用程序提供了开箱即用的结构。 通常,使用这样的工具可以更快地获得工作原型。 脚手架工具非常适合新项目,并且可以防止开发人员预先编写大量样板代码。

开源脚手架工具有很多选择。 一个示例是 Hatchify。 如果您有架构,则可以将其放入 Hatchify 中,并在几分钟内构建一个简单的应用程序。

Scaffolding is not platform-specific. In layman's terms, a scaffolding tool provides an out-of-the-box structure for a new application. Typically, using a tool like this will get you a working prototype sooner. Scaffolding tools are great for new projects and prevent developers from having to write a lot of boilerplate code upfront.

There are a lot of options for open source scaffold tools. An example is Hatchify. If you have your schema, you can drop it into Hatchify and have a simple app built in minutes.

呆° 2024-07-14 03:46:35

脚手架通常是指快速设置应用程序的骨架。 它不仅仅是 Rails,因为其他平台也有它。 它通常也不意味着是一个“最终”系统; 只是第一个、最小的方法。

Scaffolding generally refers to a quickly set up skeleton for an app. It's not rails-only since other platforms have it as well. It's also not generally meant to be a "final" system; merely the first, smallest way to do it.

与酒说心事 2024-07-14 03:46:35

来自维基百科

脚手架是一种元编程
建立数据库支持的方法
软件应用程序。 它是一个
一些人支持的技术
模型-视图-控制器框架,在
程序员可以写一个
规范描述了如何
可以使用应用程序数据库。 这
编译器使用此规范来
生成应用程序可以使用的代码
用于创建、读取、更新和删除
数据库条目,有效处理
模板作为“支架”
构建更强大的应用程序。

From Wikipedia:

Scaffolding is a meta-programming
method of building database-backed
software applications. It is a
technique supported by some
model-view-controller frameworks, in
which the programmer may write a
specification that describes how the
application database may be used. The
compiler uses this specification to
generate code that the application can
use to create, read, update and delete
database entries, effectively treating
the template as a "scaffold" on which
to build a more powerful application.

梦醒灬来后我 2024-07-14 03:46:35

就像建筑工地上真正的脚手架一样,脚手架为您提供您的项目的某种(快速简化临时结构,您可以依赖它构建真实项目。

它可以(并且现在)用于描述许多事物 - 从抽象数据库层到 Web 应用程序文件夹结构,以及生成和管理项目依赖项。

特定于任何语言/技术,就像术语骨架样板与平台无关一样。

它只是从 真正的脚手架(如上所述)。
您构建一些快速、简化的(有时是外部的,有时是临时的)结构,它将帮助您在该临时结构的下方、上方、内部或外部构建真实的、更复杂的最终结构。

.. 就像真正的脚手架一样,脚手架结构旨在支持项目的构建过程,而不是项目本身(有一些例外)。

Just like a real scaffolding in a building construction site, scaffolding gives you some kind of a (fast, simplified, temporary) structure for your project, on which you can rely to build the real project.

It can be (and is today) used to describe many things - from abstracting DB layers, to web apps folder structures, and to generating and managing project dependencies .

It is not something that is specific to any language / technology, just like the term skeleton or boilerplate is platform agnostic.

It is just a term borrowed from real scaffolding (like mentioned above).
You build some fast, simplified, (sometimes external, sometimes temporary) structure that will help you to build the real, more complex, finalized structure under, above, inside or outside of that temporary structure .

.. And just like the real scaffolding, the scaffolding structure is meant to support the building process of the project, rather than the project itself (with some exceptions).

不再让梦枯萎 2024-07-14 03:46:35

脚手架通常是某种类型的代码生成,您将其指向数据库,该技术创建基本的 CRUD(创建、读取、更新、删除)屏幕。

Scafolding is usually some type of code generation where you point it at a database, and the technology creates basic CRUD (create, read, update, delete) screens.

や三分注定 2024-07-14 03:46:35

我相信维基百科和这里的一些答案提供了狭隘和受限的观点。 脚手架不仅仅适用于数据库之上的 CRUD 操作。 脚手架有一个更广泛的目标,即为您提供适用于任何类型技术的骨架应用程序。

Yeoman 是一个现代且有用的脚手架工具。 用他们自己的话来说:

现代网络应用的网络脚手架工具

什么是 Yeoman?

Yeoman 帮助您启动新项目,制定最佳实践
以及帮助您保持工作效率的工具。

为此,我们提供了一个生成器生态系统。 发电机基本上是一个
可以使用 yo 命令运行来完成脚手架的插件
项目或有用的部分。

通过我们的官方生成器,我们推广“Yeoman 工作流程”。
这个工作流程是一个强大且固执己见的客户端堆栈,
包含可以帮助开发人员快速构建的工具和框架
漂亮的网络应用程序。 我们负责提供一切
需要在没有任何正常头痛的情况下开始
通过手动设置。

凭借可开箱即用的模块化架构,我们利用
几个开源社区的成功经验和经验教训
确保开发人员使用的堆栈尽可能智能。

作为良好文档和深思熟虑构建的坚定信徒
流程,Yeoman 包括对 linting、测试、缩小的支持
以及更多,因此开发人员可以专注于解决方案而不是
为小事而担心。

就是这样。 使用脚手架创建快速启动应用程序,作为示例或解决方案的基础。 它可以让你从头开始构建东西,从而更快地提高工作效率。

I believe that Wikipedia and some answers here provides a narrow and restricted view. Scaffolding is not just for CRUD operations on top of a database. Scaffolding has a broader objective to give you a skeleton app for any kind of technology.

Yeoman is a modern and useful tool for scaffolding. Using their own words:

The web's scaffolding tool for modern webapps

What's Yeoman?

Yeoman helps you to kickstart new projects, prescribing best practices
and tools to help you stay productive.

To do so, we provide a generator ecosystem. A generator is basically a
plugin that can be run with the yo command to scaffold complete
projects or useful parts.

Through our official Generators, we promote the "Yeoman workflow".
This workflow is a robust and opinionated client-side stack,
comprising tools and frameworks that can help developers quickly build
beautiful web applications. We take care of providing everything
needed to get started without any of the normal headaches associated
with a manual setup.

With a modular architecture that can scale out of the box, we leverage
the success and lessons learned from several open-source communities
to ensure the stack developers use is as intelligent as possible.

As firm believers in good documentation and well thought out build
processes, Yeoman includes support for linting, testing, minification
and much more, so developers can focus on solutions rather than
worrying about the little things.

That's it. Use scaffolding to create a quick-start application to work as an example or the foundation of your solution. It makes you productive faster them building things from scratch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文