如何开发MS CRM类型的应用程序 [英] How to develop MS CRM kind of application
问题描述
我曾与MS CRM。在那里,我们可以通过图形设计我们的自定义实体,然后我们也可以建立一个可视化的形式在该实体执行CRUD操作。
I have worked with MS CRM. There we can design our custom entity graphically and then we can also build a visual form to perform CRUD operations on that entity.
这种感觉从最终用户的角度那么简单。但是我想知道我怎么可以开发类似的应用程序种类,我设计我的表在飞行而设计的用户界面上飞。
This feels so simple from end user's perspective. However I am interested to know how can I develop the similar kind of application where I design my table on the fly and the design UI on the fly.
我想知道的是怎么样?他们动态地实现这一切的?如果我要在一个简单的表创建CRUD,我需要写code良好的数额。如何MS实现的一切对飞?任何指针,任何文件将是很大的帮助。
What I want to know is like how do they achieve all of this dynamically? If I have to create CRUD on one simple table, I need to write good amount of code. How MS achieves everything on the fly? Any pointers, any document would be of great help.
推荐答案
我不知道他们实际上如何做到这一点,但如果是我的话我会使用的属性和的反射。
I have no idea how they actually do it, but if it were me I'd use attributes and reflection.
下面就是我认为它很可能工作/或rougthly你如何能做到这一点......
Here's how I think it'd probably work / or rougthly how you could do it...
组件
,系统将需要一束组件或子系统;他们coudl要的东西,你自己写的或现有的库(使用现有的,如果你能库):
The system would need a bunch of components or sub-systems; they coudl be stuff you write yourself or existing libraries (use existing libraries if you can):
- somekind的的CMS,除非你想建立这样成系统,你已经离开。
- 在一个UI组件/控制,可以让用户使他们的对象。要做好这需要一个相当先进的用户界面(SilverLight的HTML5?) - 虽然我想你可以使用一些很基本的
- 存储用户的对象的一些方法 - 这是bascially数据,你会希望保持它储存在某种中性库
- 的东西,做实际的CRUD - 我在考虑某种形式的ORM工具如实体框架,光速,NHibernate的。您还需要一个数据源对象为CRUD操作本身。
诀窍是在点2和3;这就是我定义一组可用于定义用户创建的对象的属性的。这些属性是什么逻辑连接的处理一起。因为属性可以在运行时读取:
The trick is in points 2 and 3; this is where I'd define a set of Attributes that could be used to define the user created objects. These attributes are what logically joins the process together. Because Attributes can be read at runtime:
- 他们就可以推动,允许用户撰写的物的用户界面。
- 在准备就绪后,就可以生成物理上实现用户自定义对象的实际类 - 再装点这些对象与适当的属性
- 不知怎的,有ORM工具知道如何映射这些对象的属性(基于属性)的数据存储,或者自己编写DAL - ?也许你是DAL会换一个ORM
我用另一种方法是基于pretty的多少有关这一点,但它也利用了接口和数据存储为一个斑点XML的 - 不是专用离散元
Another approach I've used is based pretty much on this but it also makes use of interfaces, and the data is stored as a "blob" of XML - not specific discrete metadata.
这篇关于如何开发MS CRM类型的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!