The invention provides a web page development method and device, in which the web page development device comprises a business data module, a control module, a display module and at least one plug-in module; the business data module is used to store the underlying business data and be accessed by each plug-in module; the plug-in module is a business function module encapsulated by at least one underlying function, and the control module is used to receive users. The display module is used to determine the data to be displayed according to the user's request. The display module sends the user's request instruction to the plug-in module. After receiving the instruction, the plug-in module calls the data from the business data module and sends the data to the display module for display. The present invention reduces the list of executable functions and provides a standardized and safe way to fetch data. It prevents code confusion and improves code flexibility.
【技术实现步骤摘要】
一种网页开发方法及装置
本专利技术属于数据处理
,特别涉及一种网页开发方法及装置。
技术介绍
在进行Web开发时,代码大多使用MVC架构。MVC模式是代码组织的一种方式。MVC全名是ModelViewController,是模型(model)-视图(view)-控制器(controller)的缩写,一种软件设计典范,用一种业务逻辑、数据、界面显示分离的方法组织代码。Model层负责业务数据调取,View负责界面展示,Controller做为控制层,负责接收请求,调取Models数据,将数据传递给特定的View进行展示。当View层动态变化时,如以下面的动态View场景为例说明,不同用户登陆网站后台,看到的页面完全不一样,这种差异是由用户高度自定义的。View代码由用户编写,而不是由网站管理员编写。比如A用户设置自己的首页展示最近访客、自己的登陆记录;B用户设置首页展示自己的博客列表,自己的博客分类等。这种View的差异化是不能提前预知的。针对这种场景,Controller在接到用户的请求时,由于预先不知道View层需要的业务数据及数据格式,所以并不知需要从M ...
【技术保护点】
1.一种网页开发装置,其特征在于,包括业务数据模块、控制模块、展示模块及至少一个插件模块;所述业务数据模块用于存储底层业务数据并供各插件模块调取;插件模块为由至少一个底层函数封装成的业务功能模块,所述控制模块用于接收用户请求指令,并将用户请求指令发送给展示模块,所述展示模块用于根据用户请求确定要展示的数据,所述展示模块将用户请求指令发送给插件模块,插件模块接收到指令后,从所述业务数据模块中调取数据并将调取的数据发送给所述展示模块进行展示。
【技术特征摘要】
1.一种网页开发装置,其特征在于,包括业务数据模块、控制模块、展示模块及至少一个插件模块;所述业务数据模块用于存储底层业务数据并供各插件模块调取;插件模块为由至少一个底层函数封装成的业务功能模块,所述控制模块用于接收用户请求指令,并将用户请求指令发送给展示模块,所述展示模块用于根据用户请求确定要展示的数据,所述展示模块将用户请求指令发送给插件模块,插件模块接收到指令后,从所述业务数据模块中调取数据并将调取的数据发送给所述展示模块进行展示。2.根据权利要求1所述的网页开发装置,其特征在于,插件模块将从业务数据模块中调取的数据放到缓存中,将调取的数据从缓存中发送给展示模块。3....
【专利技术属性】
技术研发人员:文帅营,
申请(专利权)人:郑州悉知信息科技股份有限公司,
类型:发明
国别省市:河南,41
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。