Giter Site home page Giter Site logo

Feature modules about clicker HOT 6 CLOSED

stonelasley avatar stonelasley commented on June 10, 2024
Feature modules

from clicker.

Comments (6)

stonelasley avatar stonelasley commented on June 10, 2024 1

Sure. I would argue that clickers are a feature. It gets a little cloudy with the nature of this app as it's a demo but in a larger app we may have clickers, poppers, clappers and each of those would have its own components, services that may or may not be exported. Common (or perhaps shared is a better name) has any items that are shared across the app and it reexports external dependencies that will be used site wide. So Clicker, Poppers, Clappers all import CommonModule and then as we add a translate package, a pipes package etc we just import it into common and then re-export those items we want to use rather than importing each new module into each feature module. The name Common I just stole from Angular as they use this same approach. Also, I could make the argument that Page2 doesn't belong in common and may muddy the waters. It probably should exist in its own module but I couldn't come up with a meaningful name.

Application Structure:
https://angular.io/guide/styleguide#application-structure-and-ngmodules
https://angular.io/guide/styleguide#folders-by-feature-structure

Perhaps a better example is the largest project I work on is an app that allows business to interact with their ERP via an API. The rough feature modules are below: * most modules have models and services at minimum but I haven't written out the entire directory structure.
src/

  • app
  • auth
  • common
    • models
      • item.model // ALL modules use item either directly or extend
      • barcode.model // Most modules have scanning capability and use barcodes
    • services
      • item.service
      • barcode.service// Most modules have scanning capability and use barcodes
    • components
      • scanner.component
    • pipes
      • barcode.pipe
  • picking
    • models
      • routes
      • picksheet
    • services ...
  • receiving
    • models
      • proof-of-delivery.model
  • delivery
  • sales

For this specific project, it's been very convenient as our modules align with licensing so we grant access per module.

from clicker.

lathonez avatar lathonez commented on June 10, 2024

Can you explain the common vs clicker? A link to a blog / style guide will suffice.

I'm not convinced, will think on it. May want you to come on as a maintainer..? It's a big change and I'm pretty short on time here these days. Will get around to #270!

from clicker.

stonelasley avatar stonelasley commented on June 10, 2024

Just want to reiterate that this isn't a PR yet for a reason, I'm looking for an interesting discussion more than anything.

from clicker.

stonelasley avatar stonelasley commented on June 10, 2024

I'm currently reading the angular2 style guide a little closer and I've already started to change my mind to some degree. I think all the modules should be under app and the common should be called Core. @lathonez if you aren't interested in reorganization I'm completely fine with that and feel free to close this.

from clicker.

lathonez avatar lathonez commented on June 10, 2024

@stonelasley - interested in the discussion for a closed source project - possibly not re-organising clicker - I still think it would add a load of complexity for the uninitiated.

I started off here with the ng2 style guide, but haven't been back in a while, will re-read.

If anyone else watching the repo wants to give an opinion it would be very welcome.

Cheers

from clicker.

lathonez avatar lathonez commented on June 10, 2024

Im going to close this now. I don't want to implement anything in clickers and there doesn't seem to be any discussion.

from clicker.

Related Issues (20)

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.