- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
据我所知,Aurelia 不支持提到的服务端渲染 here .
但问题是:是否可以通过一些技巧/解决方法来做到这一点?
最明显的想法是使用 Phantom、Nightmare.js 或其他任何工具在服务器上的 Chrome 中简单地呈现该页面并将其提供给客户端,但这很可能会导致很大的生产力问题。
谢谢!
根据 Rob Eisenberg 今天(2016 年 4 月 16 日)在 FDConf 上的回应,服务器端渲染将在 2016 年实现,有一个核心团队成员正在做这件事,这个功能有一个截止日期。
最佳答案
有一个open issue for Universal/Isomorphic Aurelia你可以监控。特别是 EisenbergEffect(即 Aurelia 的创建者 Rob Eisenberg)表示,他们正在逐步努力为 Aurelia 提供通用支持。他的这篇文章提供了大部分细节:
EisenbergEffect commented on Aug 25
We are trying to lock things down within the next month. That doesn'tmean we won't add anything after that, but we need to work towardsstabilization, performance and solid documentation withoutdistractions of lots of new features for a little bit.
Primarily, "isomorphism" isn't a use case we want to tackle for theinitial v1 release. Again, that doesn't mean we won't do it later.But, we want to have a solid framework for browser-based apps as wellas phone gap and electron/nwjs desktop apps first. That was ouroriginal goal and we want to make sure we handle those scenariosbetter than any other framework or library.
After that, we've got some other features we want to do, which arevaluable in their own right, but will also take us closer toisomorphism.
- Enable all aurelia libraries to run on the server. This enables somenew testing scenarios, so it's valuable if only from that perspective.
- Once code can run on the server, we can then implement server viewcompilation. This isn't isomorphic rendering, but rather the abilityto run Aurelia's view compiler as part of your build and bundleprocess. This enables more work to be done ahead of time, as part ofyour build, and then it doesn't need to be done in the browser atruntime. So, this will improve the startup time for all apps andreduce initial render times for all components. It also will make itpossible to store compiled views in browser local cache to improveperformance of successive runs of the application.
- After both of thosethings are in place, then we can look at doing a full server renderfor each route. This isn't quite isomorphic in the truest sense, butit solves the SEO problem without needing 3rd party libraries. So,it's nice to have a solution there.
- Finally, we can then "sync" aserver pre-rendered app with a stateful Aurelia app running inbrowser, giving us 100% isomorphic support. So, those are the stages.The first two would be beneficial to all developers, even those whoare not interested in isomorphic apps. The 3rd stage can be done todaywith 3rd party libraries, so this is a nice to have for us, for thosewho don't want an extra dependency. All of that leads into 4 whichadds the final pieces.
We have already begun some of the work on 1. That might get into ourfirst release. We aren't going to push it, but it's already inprogress and we're looking for the problem areas so we can make itwork. Steps 2-4 involve significant work. Really, we are talking abouta collection of features here, each one being rather complex. So,those will probably come in stages after v1, as point releases.
We really don't want to do what Angular 2 has done. They havemassively complicated their architecture...to the point that very fewpeople will be able to understand it and developing applications withit has become much more complicated, with many nuances. We reallydon't want that, so we're focusing on the developer experience we wantfirst, then we'll come back and see about isomorphic support (yes, wealready have ideas how to do this cleanly, but want to give thoseideas some time to mature). In all of this, our goal is to be modular.So, if you don't care about isomorphism, you don't have to think orworry about it. If you do, you would install the necessary packages,agree to the "constraints" of the system and be on your way.
So, to all who are interested in this topic, I would just ask youkindly to be patient. For those who aren't interested in isomorphism,don't worry, we aren't going to brake the developer experience on you.For those of you who want it badly, you will have to wait longer andit will come in stages and in modular pieces so as not to disruptothers.
关于javascript - Aurelia:同构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34153639/
据我所知,Aurelia 不支持提到的服务端渲染 here . 但问题是:是否可以通过一些技巧/解决方法来做到这一点? 最明显的想法是使用 Phantom、Nightmare.js 或其他任何工具在服
我目前正在开发一个在客户端和服务器之间使用一些共享 JS 的项目。技术堆栈包括 Node v6、Webpack、React 等。 有一个“共享”目录,服务器和客户端需要一个名为rules.js的文件。
我正在运行一个使用 React 和 webpack 的同构应用程序,一切都很好。不过,我正在努力处理的一件事是在渲染组件之前预加载 css。 我一直在尝试使用 导入我的 sass 文件(以便 webp
我找到了 2 个工具来解决服务器端模块加载器的问题:webpack-isomorphic-tools和 universal-webpack .有人可以向我解释这些东西如何工作的关键步骤吗?它如何捕获/
我基于 this repo 中的初学者工具包构建了一个同构 React 应用程序.它使用 webpack 构建生产代码。 问题是,我需要将服务器上的一些环境变量的值暴露给浏览器中的客户端代码,而无需重
我有一些同构的 JavaScript。我在客户端使用 RequireJS。 (function() { 'use strict'; function wrapper(require)
在 recursion-schemes 包定义了以下类型: newtype Fix f = Fix (f (Fix f)) newtype Mu f = Mu (forall a. (f a -> a
我正在努力了解服务器端路由和重定向与服务器端呈现/同构 javascript 之间的区别。如果它们不同,它们有何不同。 最佳答案 Universal (Isomorphic)Javascript 可以
我对 JavaScript 知识相当了解。我们计划使用 React、Redux、es6 等启动同构 Web 应用程序。我们有很多 API 调用需要集成。在开始之前,我想知道是否有可用的样板,或者最好一
我将应用程序重建为同构方法。在我的本地环境中一切正常(本地和在线 Node 版本相同)但不幸的是,将文件上传到我的网络服务器后,我收到以下错误消息: SyntaxError: .../index.js
我正在尝试创建一个 universal javascript (正式名称为同构 javascript)包。这意味着它应该作为 Node 模块工作,但也可以在浏览器中顺利运行 假设它看起来像这样: //
所以我几乎完成了我的第一个(同构)ReactJS,当我们部署它时,完成 build.js 有点慢。一个建议是使用 CDN 来分离 Assets 获取(cdn0、cdn1、cdn2...),我想知道如何
所以,我最近一直在摆弄一些同构的 React + Flux,说实话,发现一些概念相当令人困惑。我一直在研究有关如何构建同构应用程序的最佳实践并寻求建议。 假设您正在创建一个由同一 REST API 支
我正在 Next.js remote fetching 上做以下练习。我无法理解和适应的是练习从 http://api.tvmaze.com 获取数据。 . 数据如下: [ {"score":24,
我似乎遇到了一个奇怪的错误。我目前正在使用 Redux 同构,并且还包括 redux-thunk 作为异步操作的中间件。这是我的商店配置: // Transforms state date from
我在 CNTK 中调用 trainer.restore_from_checkpoint 时遇到以下异常。 'This' function is not equivalent (isomorphic)
我已经使用 nodejs 创建了库,并使用 webpack 将其捆绑,以便可以在客户端使用。 但如果我尝试将捆绑文件用于我的 Node 应用程序,它就无法工作。那么,我该如何创建同时适用于客户端和服务
我开始创建基于 Node.js 的同构 React/Redux 应用程序。该项目的一个要求是基于“移动”和“桌面” View 的特定组件的“自适应”渲染。我已经实现了 Redux Action 和缩减
关于同构通量应用程序中存储数据填充的问题。 (我使用的是 react、alt、iso 和 node,但理论适用于其他示例) 我有一个 flux 'store' ( http://alt.js.org/
我最近使用 React-Redux-Express-Mongoose 堆栈构建了一些同构/通用项目。 在我的 Mongoose 模型中包含很多业务逻辑。作为一个非常基本的示例(请原谅我的 ES6):
我是一名优秀的程序员,十分优秀!