Advanced Components – Resource Components by Duncan Mills

image
Introduction

In the last couple of articles in the Custom Web Component series I’ve been looking at JET packs – a way of managing supported groups of components as a single logical unit. Once you start to use JET Packs you can then take advantage of a new type of component, a resource. The idea behind resource components is pretty obvious, when you have several components developed, it’s likely that you might start to see repetition in your code which you’d want to refactor into some common class, or perhaps you want to share a common resource bundle or CSS file amongst the components. This is exactly what a resource component is for, so let’s take a look.

What Is a Resource Component?

Fundamentally, a resource component is just a bucket, you can put whatever you like into it using whatever disk layout you like, so  can be used for js/ts files, common css, shared images and so forth, as required. The thing is, of course, that it’s a no use on its own.  A user would never “install” a resource component directly, it will be installed as a downstream dependency of a standard UI (composite) component.  A resource component has no UI itself and would not (for example) appear in the component palette of Visual Builder.

Defining a Resource Component

Resource components are very easy to define – essentially the only required file is a component.json file and that can be very simple, e.g. at a minimum: Read the complete article here.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.