使用 Web Toolkit 快速开发 Web 应用程序

发布于 2024-07-29 22:26:58 字数 1562 浏览 8 评论 0原文

我花了很多时间(实际上太多时间)开发后台应用程序,其主要目的是内容管理和 Web 应用程序配置。 我可以这样描述这些应用程序:

- Made with PHP
- Using a MySQL or Postgres or SQLite database
- Made of a lot of pages and features
- Very simple features, mostly data CRUD (create+read+update+delete into the database)
- Mostly made of forms
- UIs are usually quite simple (html + css + very basic javascript)

这些应用程序中的所有数据访问代码都依赖于我多年前开发的库,并且每次都可以重复使用。 这部分并不耗时。

耗时的是 UI 部分,主要是设计数据列表和表单。 使用 WYSIWYG 编辑器在这里会很有意义,除了我尝试过的那些(Dreamweaver、Frontpage、Expression、Eclipse...)并没有真正使其变得更快,因为生成的代码通常很臃肿,并且这些工具可以不要依赖自定义库,例如我制作和使用的库。

我认为使用 Web Tookit 可能是减少开发这些工具时间的另一种方法。 因此,在我花太多时间寻找完美的工具包之前,我会感谢您对此类问题的意见和经验。

免责声明:我并不是在寻求有关 MVC 如何发展以及 CodeIgniter/Zend/WhatEver 如何成为我应该使用的框架的建议。 我的问题不是关于我应该构建应用程序的框架或设计模式。 我的问题是如何使用正确的工具来加快简单 Web 应用程序的开发速度,并提高其代码的可重用性。

是否有一个我不知道的很棒的 Web 应用程序 RAD 工具?

对于简单但表单繁重的 Web 应用程序,您使用哪个工具包?

有没有用 PHP 编写的优秀、轻量、不臃肿、可靠的工具包?

提前致谢 !


编辑:到目前为止没有得到太多反馈:/我知道我的问题非常广泛,但我确信很多人都在从事我正在谈论的同类项目,并且提高了他们的生产力使用 GWTWicket 等。 请告诉我一下:)


9 月 28 日编辑:感谢大家的有趣答案。 过去几个月我可以尝试的任何框架都没有涵盖我正在寻找的内容。 PHP 可能不是实现我的 RAD 愿景的最佳语言,但因为它是我非常熟悉的语言,而且我不想花太多时间学习 Python 以及我了解 PHP(目前) ,我决定自己做。 每当我对某个小部件有特定需求时,我都会以最可重用的方式对其进行编码...到目前为止一切都很好:)

我可能会在某个时候开源该工具包,并且会让你们都知道。

I spend a lot of time (actually too much time) developping back-office applications whose main purpose is content management and web application configurations. Here is how I can describe these apps :

- Made with PHP
- Using a MySQL or Postgres or SQLite database
- Made of a lot of pages and features
- Very simple features, mostly data CRUD (create+read+update+delete into the database)
- Mostly made of forms
- UIs are usually quite simple (html + css + very basic javascript)

All of the data access code in these apps relies on a library I developped years ago and re-use every time I can. This part is not time-consuming.

What's time-consuming is the UI part, and mostly designing data-lists and forms. Using a WYSIWYG editor would make a lot of sense here, except those I tried (Dreamweaver, Frontpage, Expression, Eclipse, ...) don't really make it much faster, because the generated code is often bloated, and these tools can't rely on custom libraries such as the one I made and use.

I figured using a Web Tookit could be another way to spend less time developping these tools. So before I spend too much time looking for the perfect toolkit, I would appreciate your opinions and experiences on that kind of matter.

Disclaimer : I'm not looking for advices on how MVC is the way to go and how CodeIgniter/Zend/WhatEver is the framework I should use. My question is not about the frameworks or the design patterns I should build my applications upon. My question is about using the right tool to make simple web-applications development faster, and their code even more re-usable.

Is there an awesome web-application RAD tool I don't know about ?

Which toolkit do you use for simple but form-heavy web applications ?

Are there good, light, non-bloated, reliable toolkits written in PHP ?

Thanks in advance !


Edit : Not getting much feedback so far :/ I'm aware that my question is very broad, but I'm sure lots of people work on the same kind of projects I'm talking about, and have improved their productivity by using toolkits such as GWT, Wicket and such. Tell me about it, please :)


September 28 edit : Thanks everyone for the interesting answers. What I'm looking for is not covered by any framework I could try in the past months. PHP is probably not the best language to use for my vision of RAD, but since it's a language I know very well, and since I don't want to spend too much time learning Python as well as I know PHP (for the moment), I decided to do it by myself. Everytime I have a specific need for a widget, I code it in the most re-usable way...so far so good :)

I might open-source that toolkit at some point, and will let you guys know.

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

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

发布评论

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

评论(9

[旋木] 2024-08-05 22:26:59

我认为 Symfony 可能是正确的选择,因为就像您的应用程序一样:

  • PHP ORM 编写的
  • 它是用基于 Propel/doctrine(因此您可以使用 MySQL、Postgres 或 SQLite)
  • 使用的架构和模式将帮助您处理复杂的应用程序
  • 您将找到帮助您调试、记录和测试应用程序的工具
  • 表单创建、验证、本地化和本地化 国际化、测试、AJAX 是简单symfony 中的表单解释在这里,查看一下
  • 在开发应用程序时对网页进行原型设计很容易

在 symfony 框架中实现的其他工具/实践将使您的生活变得轻松:

  • 使用 YAML 语法进行完整配置(易于阅读和理解)
  • 脚手架功能为您生成一个简单的 CRUD 界面来编辑数据。
  • 您不必担心编码表单清理、安全性、缓存、ACL; 需要配置,但不需要繁重的编码。

唯一的缺点是,您需要阅读一些文档才能理解“symfony 的做事方式”。 但是,嘿,一个好的框架是 20% 的代码和 80% 的良好实践

我的观点是,即使您不想在项目中使用 Symfony,您也应该检查它的功能和内置工具,因为这就是您项目想要的工具类型。

I think Symfony may be the way to go because, like your apps:

  • it's written in PHP
  • ORM based on Propel/doctrine (so you can use MySQL, Postgres or SQLite)
  • Architecture and patterns used will help you with complex applicatons
  • You'll find tools helping you to debug, document, and test your application
  • Forms creation, validation, l10n & i18n, testing, AJAX is easy (forms within symfony explained here, check it out)
  • prototyping you webpages while developing your application is easy

Other tools/practices implemented in the symfony framework that will make your life easy:

  • full configuration using YAML syntax (easy to read and understand)
  • the scaffolding feature generates for you a simple CRUD interface for editing your data.
  • you don't have to worry about coding form sanitization, security, caching, ACL; configuration is needed, but no heavy coding.

The only downside, you need to read some documentation to understand "the symfony way of doing things". But hey, a good framework is 20% code and 80% good practices.

My point is, even if you don't want to use Symfony for your project, you should check its features and built-in tools, because that's the kind of tools you want for your project.

香橙ぽ 2024-08-05 22:26:59

我过去几年从事的 PHP 项目很像这样。 大量的表单,大量的服务器端逻辑,但有大量冗余的表单编码。 更糟糕的是,并非所有表单都如此,有时我们实际上需要做花哨的布局(即使只是做一个树控件,如果没有库,也是很痛苦的),并且 UI 的本土性质意味着我将面临战斗浏览器从头到尾都有怪癖。

所以,我开始思考什么是更好的架构。 我们需要非常强大的表单控件、丰富的网格、丰富的树、高级布局,并且我们需要逐步迁移到这些。 似乎没有一个 PHP 框架适合。 然后我退后一步,意识到它不一定是 PHP,也可以是 javascript。 我们已经对 javascript 有了要求,所以坚持下去就好了。 首先,我查看了较小的库、jquery、prototype,但很明显它们做得还不够。 所以我研究了 Dojo、ExtJS、YUI,所有非常重的 javascript 工具包,最后选择了 ExtJS,因为它具有最好的控件。

我们的 UI 结构严重依赖于 iframe、外部的导航框架、内部的应用程序框架、内部的功能框架等等。 我们最终的结果是,我们将这些内容从外向内迁移。它们都变成了 ExtJS,并且都位于同一个页面中。 服务器端代码保持不变,但已迁移到 Web 服务中。 同时,我们集成了 zend 框架,并将一些您不应该自行开发的内容移植到其中,例如身份验证和翻译。

最终目标是能够只编写业务逻辑,而不必弄乱所有样板文件。 现在知道我的方法是否会成功还为时过早,但我认为我的信息对您的代码库至关重要,并决定您想要继续自己编写哪些部分,以及想要将哪些部分外包给库。

The PHP project I've been working on the past few years is a lot like that. Heavy on forms, heavy on server-side logic, but lots of redundant form coding. Too make matters worse, it wasn't all forms, sometimes we actually need to do fancy layout (even just doing a tree control is a pain without a library), and the home-grown nature of the UI meant that I would be battling browser quirks from start to finish.

So, I got to thinking about what a better architecture would be. We needed very powerful form controls, rich grids, rich trees, advanced layout, and we needed to migrate to that gradually. None of the PHP frameworks seemed to fit. Then I took a step back and realized that it didn't have to be PHP, it could be javascript also. We already had a requirement on javascript, so it was fine to go the distance with it. First I looked at the smaller libraries, jquery, prototype, but it became obvious that they didn't do enough. So I looked at Dojo, ExtJS, YUI, all the really heavy javascript toolkits, and settled on ExtJS as having the best controls.

We had a UI structure that relied heavily on iframes, a navigation frame on the outside, application frames inside that, feature frames inside that, and so on. What we ended up with is we're migrating those from the outside in. It's all becoming ExtJS, and it's all living in the same page. The server-side code is kept the same, but it's migrated into web services. At the same time we've integrated zend framework, and are porting some of the stuff you really shouldn't do home-grown to it, like authentication and translation.

The end goal is being able to write just the business logic without having to mess with all the boilerplate. It's too early to know if my approach will pan out, but I think my message would be to be critical towards your code base and decide which parts you want to keep writing yourself, and which parts you want to outsource to a library.

假情假意假温柔 2024-08-05 22:26:59

请尝试 http://agiletoolkit.org/。 我想这就是你所需要的。 用最少的时间/代码得到结果。

Please try http://agiletoolkit.org/. I think it's what you need. Results with minimum time/code.

你的呼吸 2024-08-05 22:26:59

目前,我正在使用一个实体表单类来呈现带有客户端和服务器端验证的 HTML 表单,并使用一个数据库类来编写 SQL。 我可以用大约 10 行代码获得管理控制台的 CRUD 部分。 我自己编写了这些类,这样我就可以在我的所有项目中重复使用它们。 希望这能给你一些想法吗?

我个人会远离所见即所得工具。

At the moment I'm using a solid forms class to render HTML forms with client- and server-side validation, and a database class to write the SQL. I can get a CRUD section of my admin console up in about 10 lines of code. I wrote those classes myself so I can re-use them in all my projects. Hopefully that gives you some ideas?

I would stay away from WYSIWYG tools personally.

凉墨 2024-08-05 22:26:59

我正在测试 NuBuilder.com,我发现确实如此
几天之内,乍一看似乎很有希望。 如果你看一下
请向我发送您的反馈!

I'm testing NuBuilder.com, I discovered it does
within days, at first looks promising. If you take a look
please send me your feedbacks!

高冷爸爸 2024-08-05 22:26:59

也许采用或创建一个“基于应用程序”的基础设施,例如 Django 的? 就 Django 而言,社区创建了一些强大的基线,例如 Pinax

Maybe adopt or create an "app-based" infrastructure like Django's? In Django's case, the community has created some powerful baselines like Pinax.

高跟鞋的旋律 2024-08-05 22:26:59

我开始使用 Django,它有非常有用的功能,尤其是。 内置管理(用于一般 CRUD 内容)和非常出色的表单处理代码和 小部件渲染。 即使您不打算使用 python,我也建议您看一下,只是为了了解一下。

您提到您不需要有关“使用 X 框架”的建议,因为这更多是关于 RAD 和 RAD 的。 UI/表单而不是系统架构。 但我发现一个好的框架对于 UI 和界面同样有帮助。 就像建筑一样,形成事物的侧面。 这意味着虽然框架非常适合大型项目,但它们对于减少代码冗余也非常有帮助。 我开始在 PHP 中创建自己的辅助函数,将其从一个应用程序复制到另一个应用程序,该函数将根据一些参数自动呈现 HTML 表单。 即使经过大量工作,与 Django 提供的功能相比,这还是非常初级的,基本上我正在编写自己的框架。

我认为您可能正在寻找 GUI 风格的工具来提供帮助,但您可能会发现在这种情况下,一个好的 PHP 框架会更有帮助。 至少,您是否尝试过创建自己的帮助程序库? 我知道这些对我帮助很大。

简单的例子:

function renderInput($name, $value="") {
    print "<input type=\"input\" name=\"" . htmlentities($name) . "\" value=\"" . htmlentities($value) . "\" >";
}
function renderRadios($name, $value="", $choices=array()) {
    for ($choices as $cvalue) {
        print "<input type=\"checkbox\" name=\"" . htmlentities($name) . "\" value=\"" . htmlentities($cvalue) . "\" " . ($cvalue == $value ? "checked" : "") . ">";
    }
}

然后从那里开始构建。 像这样的愚蠢的事情往往会让表单创建变得更快。 一个好的框架可以解决这个问题。 而且我确信上面有一些错别字,我还没有接触过 PHP。

如果这不是您要寻找的内容,您可以在问题中添加更多内容吗? 我很好奇。

I started using Django and it has very helpful features, esp. the built-in admin (for general CRUD stuff) and really great form-handling code & widget rendering. I'd suggest taking a look, even if you don't plan on using python, just to get an idea.

You mentioned that you don't want advice on "Use X framework", since this is more about RAD & UI/forms than system architecture. But I've found that a good framework helps just as much with the UI & forms side of things as it does the architecture. That means that while frameworks are great for big projects, they're also very helpful in reducing code redundancy. I started creating my own helper functions in PHP that I would copy from app to app that would automatically render an HTML form based on a few parameters. Even after a lot of work, this was very rudimentary compared to what Django offers, and basically I was writing my own framework.

I think you may be looking for a GUI-style tool to help, but you might find that a good PHP framework is more helpful in this case. At the very least, have you tried creating your own helper libraries? I know those helped me a lot.

Simple Example:

function renderInput($name, $value="") {
    print "<input type=\"input\" name=\"" . htmlentities($name) . "\" value=\"" . htmlentities($value) . "\" >";
}
function renderRadios($name, $value="", $choices=array()) {
    for ($choices as $cvalue) {
        print "<input type=\"checkbox\" name=\"" . htmlentities($name) . "\" value=\"" . htmlentities($cvalue) . "\" " . ($cvalue == $value ? "checked" : "") . ">";
    }
}

And build up from there. Stupid things like this tend to make form creation just that much faster. A good framework will blow this out of the water. And I'm sure the above has some typos, I haven't done PHP in a little bit.

If this isn't what you're looking for, could you add some more to the question? I'm curious.

留蓝 2024-08-05 22:26:59

虽然您要求使用 PHP + MySql,但我还是建议您尝试一下 OutSystems 敏捷平台。

您可以在不到 10 分钟的时间内创建一个简单的 CRUD 应用程序,并随着您进入更复杂的系统而扩展它。

请访问 www.outsystems.com 免费下载社区版。

最好的,

Although you're asking for PHP + MySql, I would like to recommend you to give a try to the OutSystems Agile Platform.

You can create a simple CRUD app in less that 10 minutes and grow it as you go to a more complex system.

Download the Community Edition for free at www.outsystems.com.

Best,

为你拒绝所有暧昧 2024-08-05 22:26:59

不确定,但看起来 Tibco 通用接口 (http://www.generalinterface.org ) 就是您所寻找的。

Not sure but looks like Tibco General Interface (http://www.generalinterface.org ) is what your looking for.

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