Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Cruddle is an Angular 2 library that provides functionality to generate generic CRUD(L) screens from ModelSafe data models. The huge benefit of this is that screens in a CRUDL-based application can have their fields and validations automatically provided by ModelSafe, so the actual work you need to do develop Angular components for CRUDL screens is minimal. CRUDL provides all of the functionality and information required for CRUDL screens - you just need write the HTML structure of your CRUDL components using the base Cruddle components.
The Cruddle library is made up of the following base components:
FormComponent
: A component to be used on a create or update screen.ReadComponent
: A component to be used on a view/read screen.DeleteComponent
: A component to be used on a delete screen.ListComponent
: A component to be used on a list screen.For explanation of how to use these components, see below.
npm install --save cruddle
Cruddle aims to separate the definition of each CRUDL screen from the actual structure. This means that you define the filters, sorting, permissions, contextual actions, fields, etc. separate to the HTML structure in Cruddle definitions and then your component's template turns this into an appropiate HTML structure.
There are four types of definitions in Cruddle and they correspond directly to the available components:
FormDefinition
: Defines the functionality of a create/update screen.ReadDefinition
: Defines the functionality of a view/read screen.DeleteDefinition
: Defines the functionality of a delete screen.ListDefinition
: Defines the functionality of a list screen.In most applications, a create or update screen will generally
act the same or extremely similar when it comes to UI. To encourage writing minimal code,
Cruddle's create and update component are merged into the one
component FormComponent
. You can still have two separate
components that both use the FormComponent
if you need functionality
specific to the create or update screen.
The selector for the form component is <cruddle-form/>
.
The form component takes a FormDefinition
, which describes
how the form component actually functions.
The selector for the read component is <cruddle-read/>
.
The read component takes a ReadDefinition
, which describes
how the form component actually functions.
The selector for the delete component is <cruddle-delete/>
.
The delete component takes a DeleteDefinition
, which describes
how the form component actually functions.
Note that some applications may have the delete screen as a popup on the list screen rather than a separate screen. If that's the case, then the delete component can just be ignored and a global action can be added to the list component.
The selector for the list component is <cruddle-delete/>
.
The delete component takes a DeleteDefinition
, which describes
how the form component actually functions.
The API documentation generated using TypeDoc is available online.
To generate API documentation from the code into the docs
directory, run:
npm run docs
To execute the test suite run:
npm run test
This project is licensed under the MIT license. Please see LICENSE.md
for more details.
FAQs
Simplifying CRUDL screen development using ModelSafe
The npm package cruddle receives a total of 2 weekly downloads. As such, cruddle popularity was classified as not popular.
We found that cruddle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.