Rapid software development platform design ideas and implementation (b)

       Connect platform to talk about pieces of content description design ideas and methods. The previous simple introduction about the overall implementation of ideas. It began from the beginning of this section explains how the introduction of the database table views, etc., because we do not care what kind of project software, design time can bind directly to the page controls to the specified field, as follow-up operation will be very convenient. As for the method to achieve, there are many, each person may have different ideas, I do not judge others is how to do, I only talk about their own ideas to achieve, because this idea in subsequent actual use, after many large verification of the project is indeed feasible, but it does not mean that the way to achieve this is the best, most complete, and certainly there are many shortcomings, to be honest, limited technology, it is impossible to satisfy everyone's idea realized.

     Data collection : the introduction of this concept, our aim is to achieve the mapping database tables, views, and why is it called mapping it, because it just plays a transit role, what other function itself is not achieved.

     Because it is design and development tools, so users certainly contain different levels of developers, such as fresh graduates and so on, a set of software projects are generally more people through collaborative division of labor to achieve, then we certainly have to do these division a rule-making, so that all the people involved can understand the intent and meaning of the previous step design of the operator, thus eliminating the need to understand a very long time to digest.

     Tables, views in the database can be directly established, but I want to use page design, you definitely need to get a table or view from the database to use to bind. I directly call the general tables, views, can not I? You can not achieve this functionality? The answer is yes, you can do that, but if the table is done A staff, B staff page design, he needs to call the table, but the table structure directly view the field is impossible to know what is the meaning, the value of a control should be saved to which field, and if we will table name directly exposed to the WEB front-end, then the risk factor is not very high? To solve this problem, we can propose a new concept, data collection, this set of data with other data we are talking about is not a set of meanings, just the same name.

     Achieve the purpose of: (a few pictures on the first realization for instructions)

 

 

            1, the database table or view to establish a direct mapping to generate a set of data recorded on the associated table name, is generally desirable to set the data labeled as described Chinese Chinese table name meanings,

                  同时对表或视图中的字段也标注上中文,因为我们大部分人还是习惯看中文,这样能一目了然。方便使用者查看。

            2、隔离真实的表名或视图名,实现变相的替换,可以先解决前端WEB不允许直接操作表或视图,降低安全风险,但这样就牺牲了一点

                 点的性能,因为后台进行与数据库交互时,就需要根据配置名来获取真实的表、视图名,再来执行实际的操作,这样就多了一步。为了

                 安全,我认为这点性能的牺牲是值得的。

                 唯一遗憾:我当初也想将字段进行别名化,这样进一步加强安全系数,但是当初设计时很多同事说那样建立数据源和后台处理时就麻烦了,

                 每次需要中转遍历字段对应才能处理,虽然以前没这样实现,我相信后续还会继续补充上去。

             3、实现通过视图来进行数据保存的功能。我们在开发ERP等项目时,经常会碰到 例如物料信息,在真实的出库业务中,可能只保存物料编码、

                 批次、计量单位编码、数量等信息,但是在页面显示中还必须要显示出物料名称、规格型号等其他不保存的信息,为了解决这样的问题,我

                 想可以通过数据集合的保存表名来进行处理,这样不就即解决了显示问题,又解决了保存问题。并且设计操作就便捷了。

             4、实现SQL(存储过程等) 语句建立数据源(此功能当初设想了,但是到目前来说还没有好的模式来实现,因为不单单建立数据源,还会关联到

                  的Tree 、Grid 、Combobox 、List、输入感应等后续根据数据集合取值问题,后续我相信肯定会有办法来处理,这样就能解决数据集合多样

                  化建立的问题了)

             5、实现页面数据增、删、改、查等的中转载体,所以的数据的通用的存储,全部采用依据数据集合,这样能从一个源头来进行控制。

 

                     6、实现页面设计中,页面数据保存查询权限过滤条件设计的载体,例如:目录树、下拉选择、输入感应、数据列表等等,

                        因为既然是通过JS 来执行,那么前端设置的条件可以通过JS来跟踪到,但是我们可以在后端设计时,针对集合设置权限条件

                        这样WEB前端就永远不会获取到我设计端设计时候的权限条件,那样就有效的控制数据的横向或纵向权限。

                   7、快速定义列表中的查询字段,这样便于设计人员针对不同的列表,只要勾选一下,就可以快速增加了

                        此字段的组合查询。

 

                     通过以上几个要点的描述,那么我们就将数据集合需要实现的功能描述出来了,下面就是我们自己通过掌握技术,来分别实现。

                    只要实现的方法其实很简单,我们是通过C/S来实现的,那么就建立一个数据集合设计页面,通过同步功能将字段显示出来,分别

                    填写上对应的中文标题,执行保存。

                           我建议每个集合保存后,如果要让WEB页面调用时候,请将信息发布保存为JSON格式字符串,最好能加密,这样前端WEB只

                   有解密后才能获取到。至于WEB端组合查询页面的设计与制作在后续的页面设计中进行叙述。

                   

 

 

 

 

 

 

 

 

 

 

 

    

  

Guess you like

Origin www.cnblogs.com/szzzzn/p/11200492.html