脚本在今天适合什么地方
我想知道脚本在当今 IDE 和 GUI 的世界中占据什么位置。
我是编程新手,想知道我应该在什么时候(如果有的话)打开 PowerShell 终端来执行特定任务。这里的人们使用脚本的目的是什么?它对于全职使用 C++/C#/Java 的现代开发人员有多重要?
I was wondering what place scripting has in today's world of IDEs and GUIs.
I'm new to programming and am wondering at what point I should, if at all, open up the PowerShell terminal for a particular task. What do people here use scripting for and how important is it to a modern developer working full time with C++/C#/Java?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
一般来说,如果您希望执行该任务两次以上,您将需要编写一个脚本。制作脚本具有以下优点:
这非常适合构建、部署和自动化测试等任务。
In general, you will want to write a script if you ever expect to do the task more than about twice. Making a script has the following advantages:
This is well suited to tasks such as build, deployment, and automated testing.
IDE 和 GUI 还不能很好地处理开发过程中的测试或部署部分。
IDEs and GUIs don't handle the testing or deployment parts of the development process well quite yet.
当您想快速执行某些操作只是为了查看时,脚本编写也很棒。就我个人而言,我一直使用 Python 解释器作为超级计算器。我还用它结合正则表达式来解析文件。
Scripting is also great when you want to do something quickly just to see. Personally, I use my Python interpreter as a super-calculator all the time. I also use it to parse files, combined with regular expressions.
脚本还经常用于允许客户端轻松扩展系统的行为。使用脚本语言,不需要编译器(甚至IDE)。
有关示例,请参阅使用脚本扩展包 SQL Server 2008。
Scripting is also often used to allow clients to easily extend a system's behavior. Using a script language, a compiler (or even an IDE) is not necessary.
See Extending Packages with Scripting for an example in SQL Server 2008.
另一点需要补充的是,一些使用率较高的服务器没有任何 GUI。一切都是从终端运行的。几乎所有事情都是通过脚本运行的。虽然 GUI 很好,但它们不会一直被使用。
Another point to add is that several servers which are highly used do not have any GUI. Everything is run from a terminal. Almost everything is run through a script. While GUIs are nice, they are not going to be used all the time.