简体   繁体   English

Seaside编程与其他web编程有什么区别

[英]What is the difference between Seaside programmming and other web programming

To me it seems the main point of Seaside is that it is more like normal "desktop" programming.对我来说,Seaside 的主要观点似乎是它更像是普通的“桌面”编程。

The control flow looks much more like "traditional" programming instead of "web" programming.控制流看起来更像“传统”编程而不是“网络”编程。 Is that a correct impression?这是正确的印象吗?

I know it's about Web programming but it's does not looks like it from the programmers side.我知道这是关于 Web 编程,但从程序员的角度来看,它看起来不像。 It looks much more than driving "desktop" applications.它看起来不仅仅是驱动“桌面”应用程序。 Does this clarify the question a bit?这是否稍微澄清了这个问题?

The point of Seaside is not really to be like desktop programming, though it does try to take much of the pain out of web development. Seaside 的重点并不是真正类似于桌面编程,尽管它确实试图从 web 开发中消除很多痛苦。 Seaside is known for two things which you might consider "desktop-application-like": Seaside 以您可能认为“类似桌面应用程序”的两件事而闻名:

  1. using continuations to allow you to write multi-step processes that prompt the user for information使用延续来允许您编写提示用户输入信息的多步骤流程
  2. using blocks (closures) to provide event-handler-like "callbacks" into your code whenever links are clicked, forms submitted, etc.每当单击链接、提交 forms 等时,使用块(闭包)在代码中提供类似事件处理程序的“回调”。

These things vastly simplify certain web development tasks, though the first ends up being used fairly infrequently in practice.这些东西极大地简化了某些 web 开发任务,尽管第一个最终在实践中很少使用。

Seaside provides many other things, though:不过,Seaside 提供了许多其他功能:

  • The ability to write web applications in Smalltalk (very productive and pleasant)在 Smalltalk 中编写 web 应用程序的能力(非常高效和愉快)
  • Composable, reusable "components"可组合、可重复使用的“组件”
  • Components can delegate to other components, which replaces just that part of the page组件可以委托给其他组件,它只替换页面的那部分
  • Easy management of session state and certain state can be marked to be rolled back whenever the user uses the Back button so it always has the correct value when callbacks are executed易于管理 session state 和某些 state 可以标记为在用户使用后退按钮时回滚,因此在执行回调时它始终具有正确的值
  • A very nice Canvas API for programatically generating HTML, JQuery, Scriptaculous一个非常好的 Canvas API 用于以编程方式生成 HTML,Z6A2D7208853DAFFCB76FB5A7382B0 脚本
  • The ability to debug and fix errors live on a running site能够在运行的站点上实时调试和修复错误

Most of these are not unique to Seaside but they are somewhat unusual.其中大多数不是 Seaside 独有的,但它们有些不寻常。 So how is it different from other web programming?那么它与其他web编程有什么区别呢? You get to write in Smalltalk.你可以在 Smalltalk 中写作。 You don't have to mentally context-shift back and forth between code and a templating language.您不必在代码和模板语言之间来回转换上下文。 You don't have to worry about form field names, URLs, etc. unless/until you want to.您不必担心表单字段名称、URL 等,除非/直到您愿意。 You probably won't hate web programming as much if you use Seaside.如果您使用 Seaside,您可能不会那么讨厌 web 编程。

People may discover Seaside because of its "desktop programming features" but they usually hang around for all the other stuff.人们可能会因为 Seaside 的“桌面编程功能”而发现它,但他们通常会为所有其他东西闲逛。

Your impression is correct.你的印象是正确的。 Seaside is designed for what I call a tree-like control flow, as desktop GUI apps have. Seaside 是为我所说的树状控制流而设计的,就像桌面 GUI 应用程序一样。 Comparing to the Aida/Web , another Smalltalk web framework, which is meant for graph-like control flow, and that is actually what you have on the web.Aida/Web相比,另一个 Smalltalk web 框架用于类似图形的控制流,这实际上是您在 web 上所拥有的。

But tree-like control flow is very useful in such cases like confirmation dialogs, or for popups like those very frequent on Facebook these days.但是树状控制流在诸如确认对话框之类的情况下非常有用,或者对于这些天在 Facebook 上非常频繁的弹出窗口非常有用。 That's why we are introducing the tree-like control flow in Aida/Web too, that is, we are combining both control flows together.这也是我们在 Aida/Web 中引入树状控制流的原因,也就是说,我们将两个控制流结合在一起。

Seaside is an app framework for developing web apps written in smalltalk. Seaside是一个应用程序框架,用于开发用 smalltalk 编写的 web 应用程序。 What do you mean by it looks like "traditional" programming看起来像“传统”编程是什么意思

Edit -编辑-

Seaside architecture is different from in which its web pages are built as trees of individual, stateful components, each encapsulating a small portion of a page Seaside 架构不同于它的 web 页面构建为单个有状态组件的树,每个组件封装页面的一小部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM