您团队中前端和后端之间的工作流程是怎样的?
您与前端开发人员和后端开发人员合作的最佳实践(在 MVC 内)是什么?
举个例子:3人团队(1个前端和3个后端)有10个模块要在主页上开发。所有模块都需要 HTML、CSS、图像以及控制器和模型。
- 您通常如何设置工作流程?
如果我作为前端开发人员设计一个没有适当控制器和模型的模块,我如何最好地使用虚拟变量?最好不要使用变量,而只是将“lorem ipsum”放入我的视图中?或者我应该创建一个带有设置值的临时模型,以便在后端开发人员完成后不必编辑视图?
作为前端开发人员,是否最好等到拥有所需的所有模块和控制器,或者同时在主页模块上工作?
感谢分享!
Whats your best practice (within MVC) with how you work with front-end-developers and back-end-developers?
Take this example: The team of 3 (1 front-end and 3 back-end) have 10 modules to develop on a homepage. All modules require HTML, CSS, Images as well as controllers and models.
- How would you usally set up your workflow?
If I as a front-end-developer design a module without a proper controller and model, how do I best work with dummie-variables? Best to not use variables and just put "lorem ipsum" in my views? Or should I create a temp-model with set values to not have to edit the view after the back-end-developers are done?
Is it better as a front-end-developer to wait until you have all the modules and controllers you need OR maybe work at the same time on a homepage module?
Thanks for sharing!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对我来说,后端是域和服务层,它们位于单独的程序集中。前端是控制器、视图模型和视图。因此,后端开发人员首先定义模型对象和服务接口,并向前端开发人员提供此组件。他们还可以提供服务接口的虚拟实现,仅返回硬编码值。因此,前端开发人员现在可以开始设计使用服务的控制器,将域模型映射到相应的视图模型,并将它们传递给视图。一旦后端开发人员完成服务接口的实现,他们就会向前端开发人员提供新版本的程序集,而前端开发人员只需切换其 DI 框架以指向新的实现而不是虚拟的实现即可。
您还可以让一些前端开发人员致力于 HTML 帮助程序、扩展方法等可重用框架,...这些框架将在整个项目中使用。
For me backend is the domain and the service layer which comes in a separate assembly. Frontend is Controllers, ViewModels and Views. So backend developers start by defining the model objects and service interfaces and provide the frontend developers with this assembly. They could also provide a dummy implementation of the service interface which simply returns hardcoded values. So the frontend developers could now start designing the controllers which would consume the services, map the domain models to their corresponding view models and pass them to the views. Once the backend developers have finished implementing the service interfaces they provide the frontend developers with the new version of the assembly and the frontend developers simply switch their DI framework to point to the new implementation instead of the dummy one.
You could also have some frontend developers working on a reusable framework of HTML helpers, extension methods, ... which will be used all along the project.
我的工作流程如下:
My workflow goes as follow: