简体   繁体   English

创建从SQL数据库到GUI的映射的最佳方法是什么?

[英]What is the best way to create mapping from SQL database to GUI?

I think its quite usual task, but still solutions I saw look not so nice. 我认为这是很平常的任务,但是我看到的解决方案看起来仍然不太好。

For example in Qt used approach based on MVC pattern -- you must assign all connections manually. 例如,在基于MVC模式的Qt使用方法中,您必须手动分配所有连接。
Or I remember one PHP engine where pages were creating from DB schema. 或者我还记得一个PHP引擎,其中页面是根据数据库模式创建的。

Which are other approaches? 还有哪些其他方法? Which one you are prefer? 您更喜欢哪一个? What are the best practices? 最佳做法是什么?

Usually, there is not a one to one mapping from the database to the GUIThere are many subtle combinations that change between how you store the data and how that stored data is visualized and edited by the user. 通常,从数据库到GUI不存在一对一的映射。在存储数据的方式与用户可视化和编辑存储的数据的方式之间有许多微妙的组合。

however, you can automate a datamodel layer in your code with tools like Hibernate. 但是,您可以使用Hibernate之类的工具来自动化代码中的数据模型层。 You will still need to use the model as required to present your user interface. 您仍然需要根据需要使用模型来呈现用户界面。

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

相关问题 什么是创建此数据库的最佳方法 - what is the best way to create this database 从SQL数据库更新LUIS上实体的最佳方法是什么 - What is the best way to update an entity on LUIS from a SQL database 将数据从 rest api 推送到 sql 数据库的最佳方法是什么? - What is the best way to push data from a rest api to an sql database? 什么是实现SQL(数据库)侦听器的最佳方法? - What is the best way to implement a SQL(database) Listener? 什么是在sql数据库中管理位置的最佳方法 - What is the best way to manage locations in sql database 创建SQL多表的最佳方法是什么? - What is the best way to create SQL multiple Tables? 什么是创建SQL Azure对象的最佳方法 - What is the best way to create SQL Azure object 从数据库动态创建菜单的最佳方法 - Best way to create a menu dynamically from database 使用密钥将 SQL 服务器中的一个数据库从一台服务器迁移到另一台服务器的最佳方法是什么? - What is the best way to migrate one database from one server to another in SQL Server with the keys? 使用NHibernate在SQL数据库中存储字节数组的最佳方法是什么? - What is the best way to store byte array in SQL database using NHibernate?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM