FBML + FBJS == XFBML?
我想了解 fbml 和 xfbml 之间到底有什么区别! XFBML 与结合 java 脚本的 FBML 相同吗?
I am trying to understand what exactly is the difference between fbml and xfbml! Is XFBML same as FBML combined with java script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
FBML 是 Facebook 的专有标记语言,最初所有应用程序视图都是在 FBML 中静态呈现的。开发人员希望使他们的 facebook 应用程序视图更加动态,但他们无法在 FBML 中使用 javscript,因此 facebook 创建了 FBJS 来允许开发人员使他们的页面动态化。
后来,他们添加了对 iframe 视图的支持,而 iframe 视图最初只是 HTML。最后,他们添加了对使用 XFBML 在常规文档中嵌入 FBML 标签的支持。因此,使用上面的类比,它更像是 HTML + FBML = XFBML。
无论如何,静态 FBML 和 FBJS 都已被弃用,任何一个最终都会被完全删除,因此使用它们中的任何一个都不是一个主意。 XFBML 仍然可以使用 Facebook Javascript API 进行渲染,因此使用 XFBML 并不是一个坏主意,但仍然不是最好的主意。常规的 HTMl 和 javascript 与 Facebook Javascript API 相结合可以完成 XFBML 可以做的所有事情,而且可以做得更干净。
FBML is a facebook's propriety mark-up language, and originally all app views were static rendered in just FBML. Developers wanted to make their facebook app views more dynamic though, but they couldn't use javscript in FBML, so facebook created FBJS to allow developers to make their pages dynamic.
Later, they added support for iframe views, which originally were just HTML. Finally, they added support for embedding FBML tags in a regular document using XFBML. So using your analogy above, it's more like HTML + FBML = XFBML.
In any case, both static FBML and FBJS are both being deprecated any will eventually be removed entirely, so it would be a bad idea to use either of them. XFBML can still be rendered using the Facebook Javascript API, so it's not as bad an idea to use XFBML, but still not the best idea. Regular HTMl and javascript combined with the Facebook Javascript API can do everything XFBML can do, and it can do it more cleanly.
不
。FBML 是旧的标记语言,它通过 Facebook 服务器代理并重新写入 HTML,然后呈现为您的应用程序。 FBJS 是 JS 的子集,您可以在 FBML 页面中使用。它也被 Facebook 服务器代理和重写。 FBML 已被弃用一段时间了。
XFBML 是直接从服务器在 iframe 中提供给最终用户的代码,然后由 Facebook 提供的 JavaScript 在客户端进行处理,以生成 Facebook 特定的 UI 元素。它减少了 Facebook 服务器上的页面加载时间和 CPU 负载,因为它们不必代理和处理所有内容。
No.
FBML is the old markup language which was proxied through Facebook servers and re-written into HTML that was rendered as your app. FBJS is a subset of JS that you could use in FBML pages. It was also proxied and rewritten by the facebook servers. FBML has been deprecated for some time.
XFBML is code that is served directly from your server to end users in an iframe, then processed client-side by Facebook-provided javascript to generate facebook-specific UI elements. It reduces page load time and the CPU load on Facebook's servers because they don't have to proxy and process everything.