ASP.NET MVC Spark 视图引擎对于设计师来说,他们喜欢吗?

发布于 2024-08-12 10:19:00 字数 232 浏览 3 评论 0原文

我正在构建一个大型 asp.net Mvc 项目,并且有一个关于设计人员上下文中与 MVC Spark 引擎相反的默认渲染引擎的问题。

我完全赞成减少我的标签汤,并且可以看到火花发动机很整洁,非常整洁,我个人会欢迎它。然而,有人对他们的设计团队是接受还是反对有经验/意见吗?

我的设计师团队尚未使用 Mvc 框架进行开发,因此他们要么必须学习默认引擎,要么必须学习 Spark 引擎。

有人可以评论吗?

I am in the process of building a large asp.net Mvc project and have a question regarding the default rendering engine opposed to the MVC Spark engine in the context for designers.

I am all in favour of reducing my tag soup and can see that the spark engine is neat, very neat and I for one would welcome it. However does anyone have an experience/opinions on whether their design team has embraced it or been opposed against it?

My designer team has yet to develop using the Mvc framework so they are either going to have to learn the default or spark engine.

Can anyone comment?

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

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

发布评论

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

评论(3

梦里的微风 2024-08-19 10:19:01

您的设计团队根本不需要了解视图引擎的任何知识。他们只需要了解视图引擎的最终产品(即输出的 HTML、CSS 和 Javascript)。

您的设计人员可以使用普通的旧 HTML 和 CSS 制作模板,而无需看到一行渲染引擎代码。您只需告诉他们您要在模板中注入内容的位置即可。

CSS/HTML 模板的全部要点是在设计者和开发者之间提供分离。这使得这些模板可以外包给设计商店。您不希望设计车间弄乱您的开发代码。

设计师还将为您提供一组文本样式:h1、h2、h3、p 等。您将能够将这些样式插入到渲染引擎的模板代码中任何需要的地方,以实现所需的效果。如果您愿意,您可以让设计器规定有关这些样式的布局和使用的一些规则,但编写将输出呈现到设计器模板中的代码仍然是您的工作。

因此需要明确的是,设计人员的工作是为您创建一个 HTML/CSS 模板(包含示例内容和样式,以便你们双方都能充分了解布局)。您的工作是将设计器为您提供的 CSS/HTML 合并到视图引擎代码中。

Spark 只是 C#(或 VB)的 HTML 化版本。在所有其他条件相同的情况下,Spark 对于设计人员来说会更容易,因为它将所有 <% { %> 内容更改为 HTML 等效项。但这假设设计人员将为视图引擎编写模板代码,但他们不会。

You're design team should not need to have any knowledge of the view engine at all. They should only need to know about the final product from the view engine (i.e. the HTML, CSS and Javascript that is output).

Your designers can make templates from plain old HTML and CSS, without ever seeing a single line of rendering engine code. You just have to tell them the places in the template you are going to inject the content.

The whole point of CSS/HTML templates is to provide separation between the designer and the developer. This allows these templates to be farmed-out to a design shop. You don't want the design shop to have to mess with your development code.

The designer will also be providing you with a set of text styles: h1, h2, h3, p ,etc. You will be able to plug those styles in wherever you need them in the templating code of the rendering engine to achieve the desired effects. If you wish, you can let the designer dictate some rules about the layout and use of these styles, but it's still your job to write the code that renders the output into the designer template.

So to be clear, the designer's job is to create an HTML/CSS template for you (with sample content and styling so that both of you can adequately see the layout). Your job is to incorporate the CSS/HTML the designer provides you into the view engine code.

Spark is just an HTML-ified version of C# (or VB). All other things being equal, Spark would be easier for a designer, because it changes all of the <% { %> things to HTML equivalents. But that assumes that the designers will be writing the template code for the view engine, which they won't be.

白芷 2024-08-19 10:19:01

我知道这个问题被认为是“已回答”,但让我从“设计师”(我们称之为前端开发人员)的角度来回答。

我们有一个后端 (C#) 团队和一个负责 .NET MVC 应用程序的前端 (HTML/CSS/Javascript) 团队。 Spark 是一种更自然的 HTML 视图处理方式。 Sparks 通过添加“if”和“each”语句作为 HTML 元素的属性来添加执行 if 和循环的自然方法,而不是在 <% %> 中的 HTML 标记外部进行循环。标签。分部也可以通过直观的方式调用。 <仪表板>>将包含部分“_dashboard.spark”。

Spark 使所有视图标记看起来像 HTML,我认为这对于可维护性非常重要。它还通过在视图标记中保留尽可能多的逻辑来强制养成良好的 MVC 习惯。设计团队创建 HTML 标记,然后开发人员可以添加一点逻辑来生成内容。

借助 Spark,我们最大限度地减少了丑陋代码的问题,并使前端和后端工作保持独立,但仍保持流畅和可维护。

I know this question is considered 'answered', but let me answer from a 'designer' (we call it Front-end Developer) perspective.

We have a back-end (C#) team and a front-end (HTML/CSS/Javascript) team that works on .NET MVC Applications. Spark is a much more natural way to do HTML Views. Sparks adds a natural way to do ifs and loops by adding 'if' and 'each' statements as attributes of the HTML element instead of loops outside HTML tags in <% %> tags. Partials are also called from an intuitive manner. <dashboard /> will include the partial "_dashboard.spark".

Spark makes all View markup look like HTML, which I think is very important for Maintainability. It also forces good MVC habits by keeping as much logic as possible out of the View markup. The design team and create the HTML markup and the developers can then add the little bit of logic to get the content generation going.

With Spark, we have minimized the issue of ugly code and have kept front-end and back-end work separate, yet still fluid and maintainable.

凡间太子 2024-08-19 10:19:01

我认为设计师不喜欢使用 Spark。
使用和混合一些逻辑、变量定义太复杂了。
设计师不应该了解任何编程语言。
我更喜欢使用Velocity View Engine(VTL),这只是为了使用并且可以迫使程序员将逻辑与前端分离。

I don't think designer like use Spark.
It too complicate to use and mix some logic, variable definition.
Designer should not know any programming language.
I prefer use Velocity View Engine (VTL), this is simply to use and can force programmer to separate logic from front end.

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