您何时首先设计GUI,稍后设计后端代码,反之亦然?

时间:2021-01-31 18:17:30

When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but other times I'll do the opposite and make the GUI once I have the system working. How do you choose which way round to code and are there any particular types of project or circumstances that would lean you either way?

当我在一个项目上工作时,有时我会首先设计GUI,然后编写后端代码以使其工作,但有时我会做相反的事情并在系统工作后制作GUI。您如何选择哪种方式进行编码,是否存在任何特定类型的项目或环境,无论哪种方式都倾向于您?

9 个解决方案

#1


11  

You need to create something which would let your testers start immediately. Try to think from that prospective.

您需要创建一些可以让测试人员立即开始的东西。试着从那个角度思考。

If they are working on manual UI testing give them a shell of UI with stubs for all the functionality. If there is an interface to be tested make sure it works (even if it returns dummy data) so they could start working with it, etc.

如果他们正在进行手动UI测试,请为他们提供一个UI,其中包含所有功能的存根。如果有一个要测试的接口,请确保它正常工作(即使它返回虚拟数据),这样他们就可以开始使用它了,等等。

Most of the time it's the UI. You could show it to your users and get immediate feedback which is really useful.

大部分时间都是用户界面。您可以向用户展示并获得真正有用​​的即时反馈。

#2


9  

They really go hand-to-hand. You can't design your UI without having at least basic design of the back end for the features that UI will cover. And a new back-end feature is added, part of the design is to figure out how that feature is exposed to the user and how it fits in the existing workflow.

它们真的是相辅相成的。如果UI将覆盖的功能至少没有后端的基本设计,则无法设计UI。并添加了一个新的后端功能,该设计的一部分是确定该功能如何向用户公开以及它如何适应现有工作流程。

Btw, I really don't like the quick and dirty UI "just to give the testers access to the feature". Once you build the UI, you will rarely have the time later in the project to rebuild it from scratch (assuming it's a project on a schedule :-)). If you are building an UI, build it pixel perfect, the way you would like it to look when shipped to the customer.

顺便说一句,我真的不喜欢快速和脏的用户界面“只是让测试人员访问该功能”。一旦你构建了UI,你将很少有时间在项目中从头开始重建它(假设它是按计划进行的项目:-))。如果您正在构建UI,请将其构建为完美的像素,以便在将其发送给客户时将其显示。

Otherwise you end up with something like this monstrosity. :-)

否则你最终会得到像这样的怪物。 :-)

Btw, if you need to build UI prototype for usability testing, make sure it's built with something that cannot be integrated in the production code. For example, build the prototype in Flash if you are writing C++/C#/Java code.

顺便说一下,如果你需要为可用性测试构建UI原型,请确保它是用无法集成到生产代码中的东西构建的。例如,如果您正在编写C ++ / C#/ Java代码,请在Flash中构建原型。

#3


3  

I would assume that this depends on the type of project, and yes, i am aware that is not really an answer as they all do. But usually you can visualise how the front end wants to look from the back end aswell.

我认为这取决于项目的类型,是的,我知道这并不是真正的答案,因为他们都这样做。但通常你可以想象前端想要从后端看的样子。

I would always have an eye on the front end myself, as at the end of the day that is the part that wil be visible. Also, it usually helps get an idea of what is expected by visualising, even if in block form or via post it notes what you want to see as to what it is you are indeed coding.

我自己总是会注意前端,因为在一天结束时,这部分将是可见的。此外,它通常有助于了解可视化所期望的内容,即使是以块形式或通过帖子记录您想要了解的内容,您确实在编码。

Of course, it always helps if it is for a client and they give you the visuals before hand :) That way as long as you match the visuals you can still go to town with non visual related back end fun.

当然,它总是有帮助,如果它是一个客户端,他们提前给你视觉效果:)这样,只要你匹配视觉效果,你仍然可以去城市与非视觉相关的后端乐趣。

#4


3  

Neither, nor. We usually split up the project into tasks. Some tasks are part of building the requested UI and some are part of implementing the necessary functionality behind it. Different people work on different tasks, thus part of the team is doing the UI and another part is implementing functionality behind it. So we work in parallel on both, UI and functionality.

既不也不。我们通常将项目分成任务。有些任务是构建请求的UI的一部分,有些是实现其背后必要功能的一部分。不同的人处理不同的任务,因此团队的一部分正在执行UI,另一部分正在实现其背后的功能。因此,我们在UI和功能上并行工作。

It's only important to get the tasks into the right order. It's useless if we have functionality ready, but the UI to use it will take another two weeks. It's also useless to have the UI for something ready, but it won't be functional for another two weeks, as the backend functionality is missing.

让任务进入正确的顺序非常重要。如果我们已准备好功能,那么它将毫无用处,但使用它的UI将需要两周时间。将UI用于准备就绪也没用,但由于缺少后端功能,因此它将在两周内无法运行。

That's why we try to specify small milestones. Nobody starts working on another milestone till all his tasks of the current one are finished. A milestone always groups frontend and backend functionality together. So if a milestone has been reached, the frontend for every implemented functionality must be ready and every implemented backend functionality must have a frontend to test it.

这就是我们试图指定小里程碑的原因。在完成当前任务的所有任务之前,没有人开始研究另一个里程碑。里程碑始终将前端和后端功能组合在一起。因此,如果已达到里程碑,则必须准备好每个实现的功能的前端,并且每个实现的后端功能都必须有一个前端来测试它。

However, in some sense you can say we do first backend code and then UI, since when saying a milestone needs to offer UI to test functionality, it doesn't mean that this is the final UI we will ship. Usually near the end, when almost all backend functionality is ready and tested, we often do a UI overhaul. This is because UI for testing needs to be ready for a milestone, but it may not always be nice looking or the UI we will finally ship. Often the UI would slow down the whole project (our apps usually are very UI intensive, since we don't like to produce apps with boring standard UIs, we want lovely looking UIs that make you say "Wow, that looks awesome!"), thus we often need to implement an intermediate UI to have a UI ready for the milestone and for testing. More often than less we then revamp the UI as final step before release. As we already have UI for everything, it's no big deal if we can't revamp some parts of it (because of time constrains), after all, there is a UI, it's just not beautiful, but it's working and tested. So we will try to revamp as much as possible within the given time frame, knowing all the time that if we must stop the revamp process tomorrow, we have a fully working, shipable application. The UI revamp is just polishing, IOW it's nice to have, but you could also release without it.

但是,在某种意义上,您可以说我们首先执行后端代码然后是UI,因为当说里程碑需要提供UI来测试功能时,并不意味着这是我们将发布的最终UI。通常接近结束时,当几乎所有后端功能都准备好并经过测试时,我们经常进行UI大修。这是因为用于测试的UI需要为里程碑做好准备,但它可能并不总是很好看,或者我们最终会发布的UI。 UI通常会降低整个项目的速度(我们的应用程序通常非常密集,因为我们不喜欢生成带有无聊标准UI的应用程序,我们希望看起来很漂亮的UI让你说“哇,看起来很棒!”)因此,我们经常需要实现一个中间UI,以便为里程碑和测试准备好UI。我们通常会在发布之前将UI作为最后一步进行修改。因为我们已经拥有了所有内容的UI,所以如果我们无法改进它的某些部分(因为时间限制),这没什么大不了的,毕竟有一个UI,它只是不漂亮,但它正在工作和测试。因此,我们将尽可能在给定的时间内尽可能地进行改造,因为我们知道如果我们必须在明天停止改造过程,我们就会拥有一个完全可用的可运输应用程序。 UI修改只是抛光,IOW很高兴,但你也可以在没有它的情况下发布。

#5


2  

I think writing the GUI first and showing a quick prototype to the end-user helps both to share the same vision of the final product. IMHO, I consider server-side code as not dependant on GUI code.

我认为首先编写GUI并向最终用户展示快速原型有助于两者分享最终产品的相同愿景。恕我直言,我认为服务器端代码不依赖于GUI代码。

#6


2  

There are two questions to ask to determine this: a) which one is most important b) which one is hardest.

要确定这个问题有两个问题:a)哪个是最重要的b)哪一个最难。

If you are writing an order processing application then clearly it's success is going to depend more on the user interface than the backend code. So you should probably design that first, get some level of approval for it from your customers, and then design the backend to fit in with it.

如果您正在编写订单处理应用程序,那么显然它的成功将取决于用户界面而不是后端代码。所以你应该首先设计一下,从客户那里获得一定程度的批准,然后设计后端以适应它。

It should also be said that the design isn't finished until both are designed, and whichever you do second may involve redesigning whichever you do first.

还应该说,设计在设计之前都没有完成,无论你做什么,你可能需要重新设计你先做的设计。

#7


1  

I often prefer to start with the backend code when the project is "data intensive" (create, read, update and delete elements, show lists of data).

当项目是“数据密集型”(创建,读取,更新和删除元素,显示数据列表)时,我通常更喜欢从后端代码开始。

GUI first when developing quick prototypes.

GUI首先开发快速原型。

#8


0  

My way is:

我的方式是:

  1. Write on paper very specifically what I want the app to do
  2. 非常具体地在纸上写下我想要应用程序做什么

  3. Draw on paper the basic views of the app, based on what I want the app to do
  4. 根据我希望应用程序执行的操作,在纸上绘制应用程序的基本视图

  5. Think of the basic elements that are needed to be on the app
  6. 想想应用程序需要的基本元素

  7. Prototype a basic view of the app, either on the SDK I am using or a prototyping app (a prototyping app is better because this way you will save time just in case you see in the process that what you have thought is not helping with the usage of the app)
  8. 原型应用程序的基本视图,无论是在我正在使用的SDK还是原型应用程序(原型应用程序更好,因为这样您将节省时间,以防万一您在过程中看到您认为没有帮助的使用该应用程序)

  9. Transfer the prototype to your SDK and write the code
  10. 将原型转移到SDK并编写代码

  11. Study the UX "laws" and apply to the design... this is the point that you may have to change your code accordingly
  12. 研究用户体验“法律”并应用于设计......这可能需要相应地更改您的代码

#9


0  

You should first start by collecting user or customer requirements, then analyse them. after that, you can follow the following general model of the design process:

您应首先收集用户或客户要求,然后进行分析。之后,您可以按照以下设计过程的一般模型:

您何时首先设计GUI,稍后设计后端代码,反之亦然?

So, to do a professional design you should follow these three layers as it declared in Software Engineering book of Ian Sommerville.

因此,要进行专业设计,您应该遵循Ian Sommerville的软件工程书中声明的这三个层次。

In summary and if we shorten the answer, We can say the best answer is working on both GUI and database design almost simultaneously. And after doing many changes on both of them; finally, both of the designs will be produced almost in the same time.

总而言之,如果我们缩短答案,我们可以说最好的答案几乎同时处理GUI和数据库设计。在对它们做了很多改变之后;最后,两种设计几乎会在同一时间生产。

#1


11  

You need to create something which would let your testers start immediately. Try to think from that prospective.

您需要创建一些可以让测试人员立即开始的东西。试着从那个角度思考。

If they are working on manual UI testing give them a shell of UI with stubs for all the functionality. If there is an interface to be tested make sure it works (even if it returns dummy data) so they could start working with it, etc.

如果他们正在进行手动UI测试,请为他们提供一个UI,其中包含所有功能的存根。如果有一个要测试的接口,请确保它正常工作(即使它返回虚拟数据),这样他们就可以开始使用它了,等等。

Most of the time it's the UI. You could show it to your users and get immediate feedback which is really useful.

大部分时间都是用户界面。您可以向用户展示并获得真正有用​​的即时反馈。

#2


9  

They really go hand-to-hand. You can't design your UI without having at least basic design of the back end for the features that UI will cover. And a new back-end feature is added, part of the design is to figure out how that feature is exposed to the user and how it fits in the existing workflow.

它们真的是相辅相成的。如果UI将覆盖的功能至少没有后端的基本设计,则无法设计UI。并添加了一个新的后端功能,该设计的一部分是确定该功能如何向用户公开以及它如何适应现有工作流程。

Btw, I really don't like the quick and dirty UI "just to give the testers access to the feature". Once you build the UI, you will rarely have the time later in the project to rebuild it from scratch (assuming it's a project on a schedule :-)). If you are building an UI, build it pixel perfect, the way you would like it to look when shipped to the customer.

顺便说一句,我真的不喜欢快速和脏的用户界面“只是让测试人员访问该功能”。一旦你构建了UI,你将很少有时间在项目中从头开始重建它(假设它是按计划进行的项目:-))。如果您正在构建UI,请将其构建为完美的像素,以便在将其发送给客户时将其显示。

Otherwise you end up with something like this monstrosity. :-)

否则你最终会得到像这样的怪物。 :-)

Btw, if you need to build UI prototype for usability testing, make sure it's built with something that cannot be integrated in the production code. For example, build the prototype in Flash if you are writing C++/C#/Java code.

顺便说一下,如果你需要为可用性测试构建UI原型,请确保它是用无法集成到生产代码中的东西构建的。例如,如果您正在编写C ++ / C#/ Java代码,请在Flash中构建原型。

#3


3  

I would assume that this depends on the type of project, and yes, i am aware that is not really an answer as they all do. But usually you can visualise how the front end wants to look from the back end aswell.

我认为这取决于项目的类型,是的,我知道这并不是真正的答案,因为他们都这样做。但通常你可以想象前端想要从后端看的样子。

I would always have an eye on the front end myself, as at the end of the day that is the part that wil be visible. Also, it usually helps get an idea of what is expected by visualising, even if in block form or via post it notes what you want to see as to what it is you are indeed coding.

我自己总是会注意前端,因为在一天结束时,这部分将是可见的。此外,它通常有助于了解可视化所期望的内容,即使是以块形式或通过帖子记录您想要了解的内容,您确实在编码。

Of course, it always helps if it is for a client and they give you the visuals before hand :) That way as long as you match the visuals you can still go to town with non visual related back end fun.

当然,它总是有帮助,如果它是一个客户端,他们提前给你视觉效果:)这样,只要你匹配视觉效果,你仍然可以去城市与非视觉相关的后端乐趣。

#4


3  

Neither, nor. We usually split up the project into tasks. Some tasks are part of building the requested UI and some are part of implementing the necessary functionality behind it. Different people work on different tasks, thus part of the team is doing the UI and another part is implementing functionality behind it. So we work in parallel on both, UI and functionality.

既不也不。我们通常将项目分成任务。有些任务是构建请求的UI的一部分,有些是实现其背后必要功能的一部分。不同的人处理不同的任务,因此团队的一部分正在执行UI,另一部分正在实现其背后的功能。因此,我们在UI和功能上并行工作。

It's only important to get the tasks into the right order. It's useless if we have functionality ready, but the UI to use it will take another two weeks. It's also useless to have the UI for something ready, but it won't be functional for another two weeks, as the backend functionality is missing.

让任务进入正确的顺序非常重要。如果我们已准备好功能,那么它将毫无用处,但使用它的UI将需要两周时间。将UI用于准备就绪也没用,但由于缺少后端功能,因此它将在两周内无法运行。

That's why we try to specify small milestones. Nobody starts working on another milestone till all his tasks of the current one are finished. A milestone always groups frontend and backend functionality together. So if a milestone has been reached, the frontend for every implemented functionality must be ready and every implemented backend functionality must have a frontend to test it.

这就是我们试图指定小里程碑的原因。在完成当前任务的所有任务之前,没有人开始研究另一个里程碑。里程碑始终将前端和后端功能组合在一起。因此,如果已达到里程碑,则必须准备好每个实现的功能的前端,并且每个实现的后端功能都必须有一个前端来测试它。

However, in some sense you can say we do first backend code and then UI, since when saying a milestone needs to offer UI to test functionality, it doesn't mean that this is the final UI we will ship. Usually near the end, when almost all backend functionality is ready and tested, we often do a UI overhaul. This is because UI for testing needs to be ready for a milestone, but it may not always be nice looking or the UI we will finally ship. Often the UI would slow down the whole project (our apps usually are very UI intensive, since we don't like to produce apps with boring standard UIs, we want lovely looking UIs that make you say "Wow, that looks awesome!"), thus we often need to implement an intermediate UI to have a UI ready for the milestone and for testing. More often than less we then revamp the UI as final step before release. As we already have UI for everything, it's no big deal if we can't revamp some parts of it (because of time constrains), after all, there is a UI, it's just not beautiful, but it's working and tested. So we will try to revamp as much as possible within the given time frame, knowing all the time that if we must stop the revamp process tomorrow, we have a fully working, shipable application. The UI revamp is just polishing, IOW it's nice to have, but you could also release without it.

但是,在某种意义上,您可以说我们首先执行后端代码然后是UI,因为当说里程碑需要提供UI来测试功能时,并不意味着这是我们将发布的最终UI。通常接近结束时,当几乎所有后端功能都准备好并经过测试时,我们经常进行UI大修。这是因为用于测试的UI需要为里程碑做好准备,但它可能并不总是很好看,或者我们最终会发布的UI。 UI通常会降低整个项目的速度(我们的应用程序通常非常密集,因为我们不喜欢生成带有无聊标准UI的应用程序,我们希望看起来很漂亮的UI让你说“哇,看起来很棒!”)因此,我们经常需要实现一个中间UI,以便为里程碑和测试准备好UI。我们通常会在发布之前将UI作为最后一步进行修改。因为我们已经拥有了所有内容的UI,所以如果我们无法改进它的某些部分(因为时间限制),这没什么大不了的,毕竟有一个UI,它只是不漂亮,但它正在工作和测试。因此,我们将尽可能在给定的时间内尽可能地进行改造,因为我们知道如果我们必须在明天停止改造过程,我们就会拥有一个完全可用的可运输应用程序。 UI修改只是抛光,IOW很高兴,但你也可以在没有它的情况下发布。

#5


2  

I think writing the GUI first and showing a quick prototype to the end-user helps both to share the same vision of the final product. IMHO, I consider server-side code as not dependant on GUI code.

我认为首先编写GUI并向最终用户展示快速原型有助于两者分享最终产品的相同愿景。恕我直言,我认为服务器端代码不依赖于GUI代码。

#6


2  

There are two questions to ask to determine this: a) which one is most important b) which one is hardest.

要确定这个问题有两个问题:a)哪个是最重要的b)哪一个最难。

If you are writing an order processing application then clearly it's success is going to depend more on the user interface than the backend code. So you should probably design that first, get some level of approval for it from your customers, and then design the backend to fit in with it.

如果您正在编写订单处理应用程序,那么显然它的成功将取决于用户界面而不是后端代码。所以你应该首先设计一下,从客户那里获得一定程度的批准,然后设计后端以适应它。

It should also be said that the design isn't finished until both are designed, and whichever you do second may involve redesigning whichever you do first.

还应该说,设计在设计之前都没有完成,无论你做什么,你可能需要重新设计你先做的设计。

#7


1  

I often prefer to start with the backend code when the project is "data intensive" (create, read, update and delete elements, show lists of data).

当项目是“数据密集型”(创建,读取,更新和删除元素,显示数据列表)时,我通常更喜欢从后端代码开始。

GUI first when developing quick prototypes.

GUI首先开发快速原型。

#8


0  

My way is:

我的方式是:

  1. Write on paper very specifically what I want the app to do
  2. 非常具体地在纸上写下我想要应用程序做什么

  3. Draw on paper the basic views of the app, based on what I want the app to do
  4. 根据我希望应用程序执行的操作,在纸上绘制应用程序的基本视图

  5. Think of the basic elements that are needed to be on the app
  6. 想想应用程序需要的基本元素

  7. Prototype a basic view of the app, either on the SDK I am using or a prototyping app (a prototyping app is better because this way you will save time just in case you see in the process that what you have thought is not helping with the usage of the app)
  8. 原型应用程序的基本视图,无论是在我正在使用的SDK还是原型应用程序(原型应用程序更好,因为这样您将节省时间,以防万一您在过程中看到您认为没有帮助的使用该应用程序)

  9. Transfer the prototype to your SDK and write the code
  10. 将原型转移到SDK并编写代码

  11. Study the UX "laws" and apply to the design... this is the point that you may have to change your code accordingly
  12. 研究用户体验“法律”并应用于设计......这可能需要相应地更改您的代码

#9


0  

You should first start by collecting user or customer requirements, then analyse them. after that, you can follow the following general model of the design process:

您应首先收集用户或客户要求,然后进行分析。之后,您可以按照以下设计过程的一般模型:

您何时首先设计GUI,稍后设计后端代码,反之亦然?

So, to do a professional design you should follow these three layers as it declared in Software Engineering book of Ian Sommerville.

因此,要进行专业设计,您应该遵循Ian Sommerville的软件工程书中声明的这三个层次。

In summary and if we shorten the answer, We can say the best answer is working on both GUI and database design almost simultaneously. And after doing many changes on both of them; finally, both of the designs will be produced almost in the same time.

总而言之,如果我们缩短答案,我们可以说最好的答案几乎同时处理GUI和数据库设计。在对它们做了很多改变之后;最后,两种设计几乎会在同一时间生产。