Laravel 5 中的脚手架是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29405314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 11:16:42  来源:igfitidea点击:

What does scaffolding mean in Laravel 5?

phplaravelscaffolding

提问by judasane

I'm coming back to programming with Laravel by reading the documentation in the official website. Now I realized there is a 5.0 version and I'm trying it, but by I've noticed something called "scaffolding for user registration and authentication" and I don't understand it at all.

我将通过阅读官方网站上的文档回到 Laravel 编程。现在我意识到有一个 5.0 版本,我正在尝试它,但是我注意到一种叫做“用户注册和身份验证的脚手架”的东西,我根本不明白。

Maybe it's because my main language is Spanish and that word doesn't make sense for me in this context, but I'm really confused.

也许是因为我的主要语言是西班牙语,在这种情况下这个词对我来说没有意义,但我真的很困惑。

In the website, the paragraph says this:

在网站上,该段落是这样说的:

Laravel ships with scaffolding for user registration and authentication. If you would like to remove this scaffolding, use the fresh Artisan command:

php artisan fresh

Laravel 附带了用于用户注册和身份验证的脚手架。如果你想移除这个脚手架,使用新的 Artisan 命令:

php artisan fresh

So I would like to know what does it exactly mean and what does it stand for.

所以我想知道它到底是什么意思,它代表什么。

回答by Sulthan Allaudeen

The term Scaffoldingroughly aims to a quickly set up skeleton for an app or your project.

该术语Scaffolding大致旨在为应用程序或您的项目快速设置框架。

The main purpose of Scaffolding is to speed your workflow rather than creating it new.

脚手架的主要目的是加快您的工作流程,而不是创建新的工作流程。

Here is the JeffreyWay/Laravel-4-Generatorsfor your reference.

这是JeffreyWay/Laravel-4-Generators供您参考。

If you don't want you shall use php artisan freshas you said in your question.

如果你不想要,你应该php artisan fresh像你在问题中所说的那样使用。

To get the generator back from your composer

从你的作曲家那里取回生成器

composer require laracasts/generators --dev

回答by Zanon

Referring to my own answerin another question, I believe that Wikipediaprovides a narrow and restricted view. Scaffolding is notjust for CRUD operations on top of a database. Scaffolding has a broader objective to give you a skeleton app for any kindof technology.

参考我自己在另一个问题中的回答,我认为维基百科提供了一个狭隘和受限制的观点。脚手架是不是只是一个数据库上CRUD操作。Scaffolding 有一个更广泛的目标,即为您提供适用于任何类型技术的骨架应用程序。

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

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

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 yocommand 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.

用于现代 Web 应用程序的 Web 脚手架工具

什么是约曼?

Yeoman 可帮助您启动新项目,制定最佳实践和工具以帮助您保持高效。

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

通过我们的官方生成器,我们推广“Yeoman 工作流程”。此工作流是一个强大且固执己见的客户端堆栈,包含可帮助开发人员快速构建漂亮的 Web 应用程序的工具和框架。我们负责提供入门所需的一切,而不会出现与手动设置相关的任何常见问题。

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

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

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.

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