我应该先设计应用程序还是模型(数据库)? [英] Should I design the application or model (database) first?

查看:25
本文介绍了我应该先设计应用程序还是模型(数据库)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正准备在空闲时间开始构建一个新的网络项目,以实现一个在我脑海中蹦蹦跳跳的想法.

I am getting ready to start building a new web project in my spare time to bring to fruition an idea that has been bouncing around my head for a while.

我从来没有因为先构建模型然后构建消费应用程序或其他方式更好而感到沮丧.

I have never gotten down whether I am better off first building the model and then the consuming application or the other way around.

最佳做法是什么?您会首先构建什么?为什么?

What are the best practices? What would you build first and why?

我想一般来说应用程序应该驱动模型,但是像许多网站一样的应用程序如果没有模型就没有太多作用.

I imagine that in general the application should generally drive the model, however the application like many websites really doesn't do much without the model.

出于某种原因,我发现有时从模型的角度考虑更容易,因为应用程序实际上只是对模型的操作.这是一种糟糕的思考方式吗?

For some reason I find it easier at times to think in terms of the model since the application is really just actions on the model. Is this a poor way of thinking about things?

每个选项有什么优点/缺点?

What advantages/disadvantages does each option have?

推荐答案

当你自己构建整个应用程序时,我会从用户开始.用户想要什么?他们需要什么信息?这应该推动应用程序和模型的设计,而不是相反.最初设计模型时,很容易让用户直接接触它,这几乎没有意义.

When you're building the whole application yourself, I would start with the user. What does the user want? What information do they need? That should drive the design of the application and model, not the other way round. When the model is designed first, there is a temptation to expose the user to it directly, which will rarely make sense.

这篇关于我应该先设计应用程序还是模型(数据库)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆