简体   繁体   English

使用Umbraco托管HTML5应用程序?

[英]Using Umbraco to host a HTML5 application?

I haven't used Umbraco as yet, however I here good things about it - how it's structured and how easy it is to write "applications" that can be hosted within it (if that is the correct term). 我还没有使用过Umbraco,但是我在这里有很多好处-它的结构以及编写可托管在其中的“应用程序”的难易​​程度(如果这是正确的说法)。

From what I have seen, .NET usercontrols seem to be the way to host "applications", because you can pass down membership info or other params from Umbraco to your hosted usercontrol. 从我所看到的情况来看,.NET用户控件似乎是承载“应用程序”的方式,因为您可以将成员信息或其他参数从Umbraco传递到托管的用户控件。

If I want to write a pure HTML5/Javascript (jQuery) app that is to be hosted within Umbraco, what options are available? 如果我想编写要在Umbraco中托管的纯HTML5 / Javascript(jQuery)应用程序,可以使用哪些选项? I heard that you can create a razor based page (cshtml).. however just wondering how params would be made available from Umbraco to the HTML page itself (I'm not that up on asp.net mvc either, but I am guessing if a razor page, the viewbag could be used?) 我听说您可以创建一个基于剃须刀的页面(cshtml)..但是只是想知道如何从Umbraco向HTML页面本身提供参数(我也不在asp.net mvc上,但是我正在猜测是否剃刀页面,可以使用Viewbag吗?)

Any pointers would be much appreciated! 任何指针将不胜感激!

Umbraco sounds like a good fit. Umbraco听起来很合适。 It lets you use whatever HTML markup you like so you're free to build with it what ever you like. 它使您可以使用所需的任何HTML标记,因此可以随心所欲地随意构建它。

Umbraco has the idea of Templates for rendering whole pages. Umbraco具有用于渲染整个页面的模板的想法。 Templates can be nested additionally each template can have multiple reusable Macros which can render out snippets of HTML/XML/JSON. 模板可以另外嵌套,每个模板可以具有多个可重用的 ,这些可以呈现HTML / XML / JSON片段。

If you want to do some snazzy JSON calls then they have a RESTful api (not 100% REST though) called /Base which does some goodness. 如果您想执行一些令人眼花乱的JSON调用,则它们具有一个称为/ Base的RESTful API(虽然不是100%REST),但这样做有些好处。

The juicy bit about Umbraco is the package/plug-in eco-system, there is a great REST package called uREST which gives you some uber power if you need it (http://our.umbraco.org/projects/backoffice-extensions/urest) 关于Umbraco的最有趣的地方是软件包/插件生态系统,有一个很棒的REST软件包称为uREST,可以在需要时为您提供更强大的功能(http://our.umbraco.org/projects/backoffice-extensions / urest)

Out the box 4.7+ use Razor for their macros (or XSLT or .net User Controls) so plenty of options. 开箱即用4.7+将Razor用于其宏(或XSLT或.net用户控件),因此有很多选择。

Give it a go. 搏一搏。 The community forums are supper helpful too (http://our.umbraco.org) if you have a specific problem. 如果您有特定的问题,社区论坛也对晚餐很有帮助(http://our.umbraco.org)。

Cheers 干杯

Pete 皮特

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

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