Code Monkey home page Code Monkey logo

joaossmacedo / inputcomponentization Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 1.73 MB

Componentized Input for Ionic/Angular.

Home Page: https://joaossmacedo.github.io/InputComponentization/

JavaScript 4.18% TypeScript 79.30% HTML 8.45% SCSS 8.07%
ionic ionic-framework input input-validation input-output inputs input-mask component components componentization concept angular angular-material angular-material-design material-design material-ui material mask masking validation

inputcomponentization's Introduction

Input Componentization

What is the objective of the project?

Create an input component that receive values such as type, placeholder and initialValue, creates an input field based on those parameters and then return the value and errors whenever there is a change on the field.

Input Component Logic

Why should I use this concept?

  1. Maintainability and reuse
    Since all the code regarding inputs is in the same place it's much easier to maintain and edit your code. One change affects the whole code. This way it is much easier to fix bugs and you ensure that once a bug is fixed the same bug won't pop out elsewhere(if you repeat the type of an input a lot it's pretty common to forget to fix the bug somewhere).

  2. Low coupling
    As long as you always return the value of the input and which errors it contain, doesn't matter how you implement it. Suppose you are using Ionic w/ Angular and you want to change from ion-input to mat-input, if you are using this concept you only need to make a single change.

When should I use this concept?

  1. Big projects or medium/small project with a high number of inputs.

When should I not use this concept?

  1. Medium/small project with a low number of inputs.

How to see a demo of this project?

  1. Open either the 'angular' or the 'ionic' folder of this project in the terminal/bash.
  2. Run 'npm install'.

If you selected 'angular'

  1. Run 'ng serve'.
  2. Open 'localhost:4200' at your browser.

If you selected 'ionic'

  1. Run 'ionic serve'.
  2. Open 'localhost:8100' at your browser.

inputcomponentization's People

Contributors

dependabot[bot] avatar joaossmacedo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

inputcomponentization's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.