创建动态 Web 应用程序
考虑数据注册应用程序(注册事件、检查等);人们将如何建造它?您可以定义 n 个数据字段,例如 Date_Of_Event、Event_Description 等。或者可以构建一个动态应用程序,其中存在某种定义可用表/列的元数据。
那么我的问题是:这种实现有什么好的例子吗?也许有框架可以帮助我创建这样的应用程序?
仅供参考:我以前曾是此类应用程序的开发人员,因此我对如何完成它有相当多的了解,但我正在寻找更好的方法来做到这一点。
Consider a data registration application (register events, inspections etc.); how would one go about building it? You could define n-number of data fields, such as Date_Of_Event, Event_Description etc. OR one could build a dynamic application where there is metadata of some sort that defines what tables/columns are available.
My question is then: Are there any good examples of such implementations? Perhaps there are frameworks that can assist me in creating such an application?
FYI: I have been a developer on such an application previously and so I have a fair bit of knownledge on how it can be done, but I am looking at better ways of doing this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这完全取决于它的动态程度。如果动态数据字段的数量非常大,那么,当然,您可以创建或使用一些框架,但如果可能的话,我真的会考虑研究更精确的数据模型的定义。当您需要一些灵活性时,通用方法很好,但如果您需要大量定制,那么与具有更严格数据模型的系统相比,这种动态字段灵活性可能会带来很多痛苦的维护。
编辑:如果您想基于某些元数据模型(例如UML图)构建一些应用程序,那么您可以查看一些MDA工具,例如AndroMDA。
It all depends on how much dynamic is that. If the number of dynamic data fields is very big, then, of course, you may create or use some framework, but I would really consider looking into definition of more precise data model if it is possible. Generic approach is nice when you need some flexibilty, but if you need a lot of customization, then this dynamic field flexbility can bring a lot of painful maintenance comparing to a system with more strict data model.
EDIT: If you want to build some application based on some meta data model e.g. UML diagram, then you can look into some MDA tools like AndroMDA.