Check patentability & draft patents in minutes with Patsnap Eureka AI!

A Method for Unified Management of Webpage Components

A web component and component technology, which is applied in website content management, network data retrieval, electronic digital data processing, etc., can solve the problems of js code redundancy and no advantages, and achieve the effect of reducing duplication.

Active Publication Date: 2021-08-13
厦门卓网信息科技股份有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, Require JS has no advantages in page rendering. It can only write original HTML page tags, and use repeated js codes to implement all operations of tags, many of which are repeatedly defined, resulting in redundant js codes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Method for Unified Management of Webpage Components
  • A Method for Unified Management of Webpage Components
  • A Method for Unified Management of Webpage Components

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017]以下结合附图及实施例对本发明进行进一步的详细说明。

[0018]本发明为了解决现有技术存在的引进顺序受限、代码冗余、资源浪费、容易报错、父子页面无法交互等不足,提供一种网页组件统一管理的方法,基于JS模块加载器RequireJS,将网页模板化为页面组件;在HTML元素上通过定义不同的配置项,得到不同逻辑的页面组件;将不同逻辑的页面组件的页面内容与指定的js操作逻辑一一关联,通过互相调用和统一操作逻辑,进行页面嵌套,实现动态嵌入的页面元素拼接。

[0019]本发明通过Require JS模块化管理页面,引进前端JavaScript对象继承的概念,在默认配置的基础上进行属性和方法的扩展。本发明中,网页模板化的页面组件根据配置项渲染得到不同的页面内容。搭配HTML标签中,将HTML标签中的、自定义属性作为配置项,通过灵活定义配置项,得到不同逻辑的页面组件。

[0020]同时,网页模板化的页面组件支持事件监听,允许在业务层阻止事件传递。即本发明支持灵活的事件监听和业务层阻止事件传递,可继承灵活渲染的组件配置,无限继承与监听事件进行业务绑定。

[0021]本发明所述的方法在实现页面嵌套时,根据得到页面内容和指定的js操作逻辑一一关联,以子页面的方式引进到父页面,同时子页面也是一种组件,方便互相调用和操作。具体地,进行页面嵌套时,以子页面的方式引进至父页面。子页面通过jsp文件的内容和对应的js操作逻辑一一绑定,父页面允许定位至子页面的页面组件,进行调用子页面方法;同时父页面将自身操作方法向下传递,在子页面直接访问父页面逻辑操作。其中,页面内容和执行操作逻辑的js文件通过ajax读取文本得到。

[0022]总结本发明与现有技术的技术特点与优缺点,如下表所示:

[0023]

[0024]

[0025]本发明基于Require JS模块管理和页面自动构建元素的思路进行管理网页组件,如图1所示的页面结构的实施例中,在头部系统信息中,可动态显示系统的基本信息。左侧菜单入口可以配置为树形构造;并且,具体页面的菜单入口将在右侧内容区域显示指定列表页面;对于多次进入的菜单,将直接显示已的打开的内容,也可配置成重新请求。右侧显示区域中,对应于左侧菜单入口,显示对应的菜单。

[0026]上述实施例仅是用来说明本发明,而并非用作对本发明的限定。只要是依据本发明的技术实质,对上述实施例进行变化、变型...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for unified management of web page components. Based on the JS module loader Require JS, the web page is templated into page components; by defining different configuration items on HTML elements, page components with different logics are obtained; The page content of the page component is associated with the specified js operation logic one by one. By calling each other and unifying the operation logic, page nesting is performed to realize the splicing of dynamically embedded page elements. The invention not only follows the Require JS modular management technology, but also achieves page component management, customizes different page contents according to different configuration items, and realizes similar logical operations. The implementation of the present invention greatly reduces the repetition of codes, and at the same time manages styles and interaction logic in a unified manner. At the same time, the method of binding the content of the page and the js file is used to solve the problem of difficulty in importing and interacting with the page embedded in the page, so that the page is also a component and the page is reused.

Description

technical field [0001] The invention relates to the technical field of webpage management, and more specifically, relates to a method for unified management of webpage components. Background technique [0002] The existing technologies of web component management probably include traditional js methods and methods based on Require JS. Among them, Require JS is a set of front-end modular management library. with traditional <script>标签加载方式不同,Require JS做到了异步加载之后形成模块化引用。传统的js代码,必须是先引进了某个js文件之后,后引进的文件才能用到之前js文件里面定义的工具或者方法,而且还要避免命名冲突造成的改写了之前js文件里面的代码。[0003]在不同页面中重复引用同一个js资源,传统的js页面加载方式将重复请求该js文件,造成带宽的浪费。而在Require JS配置里面定义过的资源,如果在之前的页面已经引用过该js文件资源,将会以模块方式引进到当前页面,不会从程序重新请求,减少带宽。[0004]但是,Require JS在页面渲染方面没有任何优势,只能写原始的HTML页面标签,并且用重复的js代码实现标签的所有操作,其中很多操作都是重复定义的,造成js代码冗余。发明内容[0005]本发明的目的在于克服现有技术的不足,提供一种沿用Require JS的管理方式,同时能够满足页面渲染需求的网页组件统一管理的方法。[0006]本发明的技术方案如下:[0007]一种网页组件统一管理的方法,基于JS模块加载器Require JS,将网页模板化为页面组件;在HTML元素上通过定义不同的配置项,得到不同逻辑的页面组件;将不同逻辑的页面组件的页面内容与指定的js操作逻辑一一关联,通过互相调用和...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/958G06F9/445
CPCG06F9/44526
Inventor 黄海良庄俊南郭超
Owner 厦门卓网信息科技股份有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More