使用哪种语言来编写管理控制台à拉韦敏?
我们有一个内部开发的基于 Web 的管理控制台,它使用 C CGI 和 Perl 脚本的组合来管理我们的邮件服务器堆栈。最近,我们一直在考虑清理代码(嗯,替换大部分代码),使实现更加安全,并改进整体行为。
我没有太多的编程知识,但是我断断续续地使用Ruby(主要用于编写erb模板),因此正在考虑使用ruby/rails来开发这样的应用程序(现在下班了,我还需要学习东西 !)。
在盲目学习一门语言之前,你们有什么建议?如果这个问题太模糊,请告诉我,如果需要,我会尽力提供更多信息。
We have an in house developed web-based admin console that uses a combination of C CGI and Perl scripts to administer our mail server stack. Of late we have been thinking of cleaning up the code (well, replacing most of it), making the implementation more secure, and improving the overall behavior.
I don't have much programming knowledge, but I use Ruby on and off (mainly for writing erb templates), and hence was thinking of using ruby/rails for developing such an app (off-duty for now, I also need to learn stuff !).
Before blindly picking up a language though, what would you folks suggest ? Please let me know if this is too vague a question, I'll try to supply more information, if needed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否考虑过将应用程序编写为 Webmin 模块?
当您这样做时,您可以免费获得很多东西(用户和组、大量的安全功能、与配置文件相关的大量帮助函数,以及针对 UNIX/Linux 系统大多数方面的大量现有代码)。您还可以获得很多几乎免费的东西,例如操作日志记录、通过 wbm、apt 或 yum 进行的软件包和更新、在线帮助系统等。
也有一些缺点。它是一个旧的代码库,因此在 API 等地方有一些笨拙的部分。如果您不是老派的 Perl 程序员,许多旧模块可能有点难以理解。但是,它是一个维护良好的代码库,十几年来一直受到数百万用户的使用。它非常坚固。 UI 并不漂亮,但它相对主题化,如果您分发最小化版本,则自定义 UI 会变得更容易。
我怀疑您的启动和运行速度比从头开始或使用大多数现有框架要快得多,这些框架并非专门针对 Webmin 那样构建系统管理界面。
此外,它是 BSD 许可的,因此您可以用它做任何您想做的事情,包括用它构建自定义商业应用程序(多年来已有数百家公司这样做)。
Have you considered writing your applications as Webmin modules?
You get a lot of stuff for free when you do so (users and groups, tons of security features, a pretty big variety of helper functions related to config files, and tons of existing code for most aspects of a UNIX/Linux system). You also get a lot of stuff for nearly free, like action logging, packages and updates via wbm or apt or yum, an online help system, etc.
There are some cons, as well. It's an old codebase, so it has some clunky bits in the API among other places. A lot of the old modules can be a bit hard to grok if you're not an old-school Perl programmer. But, it's a well-maintained codebase, and it's been banged on by millions of users for over a dozen years. It's pretty robust. The UI isn't beautiful, but it is relatively theme-able, and if you're distributing a minimized version it becomes easier to customize the UI.
I suspect you can be up and running a lot faster than starting from scratch or using most existing frameworks that aren't targeted specifically to building systems management interfaces the way Webmin is.
Also, it's BSD licensed, so you can do whatever you want with it, including building a custom commercial app with it (hundreds of companies have done so over the years).
如果您已经了解一点 ruby,那么没有理由不使用它。
如果您对学习另一种语言特别感兴趣,那么您想要做的事情几乎可以在任何语言/框架中完成,这只是您想学习哪一种语言/框架的问题。
If you already know a bit of ruby, then there's no reason not to use that.
If you're interested specifically in learning another language, then what you're trying to do could be done in pretty much any language/framework, it's just a matter of which one you want to learn.
在不了解您现有应用程序的情况下,我想说这实际上可以归结为“您喜欢使用哪种语言?”。
Python 和 Ruby 都是成熟的语言,拥有丰富的库基础设施。他们还拥有流行的、类似的 Web 应用程序框架,分别是 Django 和 Ruby-on-Rails。
由于您要移植现有的 Perl 应用程序(let),因此值得注意的是,Ruby相对与 Perl 更相似。考虑到 Ruby 主要受到 Perl、Smalltalk、埃菲尔和 Lisp”。
Without knowing much about your existing application I'd say that this effectively boils down to "which language do you like to work with?".
Python and Ruby are both mature languages with ample library infrastructure. They also boast popular, similar web application frameworks namely Django and Ruby-on-Rails respectively.
Since you are porting an existing Perl app(lets) it may be worthwhile to note that Ruby is relatively more similar to Perl. Not surprising given that Ruby was influenced "primarily by Perl, Smalltalk, Eiffel and Lisp".
django 有一个漂亮的管理界面
django has a nice admin interface