Comments (6)
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
- models
- picking
- models
- routes
- picksheet
- services ...
- models
- receiving
- models
- proof-of-delivery.model
- models
- 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.
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.
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.
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.
@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.
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)
- Tests not running fully under PhantomJS HOT 2
- Protractor and lazy load tab pages HOT 1
- You need to include some adapter that implements __karma__.start method! HOT 8
- Add support for multiple languages HOT 4
- Ionic deeplinks HOT 3
- Different tsconfig.json for ionic? HOT 4
- Update to latest HOT 1
- Update GIF HOT 1
- Deploy live version HOT 8
- Getting a '404' for -> http://lathonez.com/2017/ionic-2-unit-testing/ HOT 1
- Undesirable Warning: Critical dependency: the request of a dependency is an expression HOT 1
- Questions about E2E test cases for Ion-menu component HOT 1
- Error: Uncaught (in promise): invalid link: rootPage in case of lazy loading unit test cases HOT 1
- Usage of Greenkeeper HOT 1
- Help needed to manually trigger Swipe gesture on DIV in E2E tests HOT 3
- Question: Translation R to L Support HOT 1
- Setup insufficient to test apps dependent on external APIs
- when i compiling the ng serve it was display warning and uncompiling files
- Burh test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clicker.