Comments (6)
Guys, I am actually dont know what kind of task can it be where such module structure can be handy.
@AlexeyKashintsev , can you provide an example of such task? Cause I am completely confident that any task can be solved without recursive dependency.
from platypus-js.
Yes it's not quite common situation. But Platypus.JS have to handle such situation with normal work or by providing error message. Right now it just stops and do nothing.
from platypus-js.
Agree about error message in this kind of situations.
But still I am sure that using circular dependency is realy ugly practice in software design, so it must be avoided. Doesn't matter it is AMD or any other specification.
As an exception in some rare situations where this can't be avoided using some module in define()
dependency array argument is not really neccessary while require()
can be used any time. I think this can work fine. Try this, give us a note if this solution will work.
from platypus-js.
Can't disagree with @hcspidergrasp. Anyway it's not a question of architecture, it's only bug issue.
And I've found that there is a little holy war by the topic ;)
http://stackoverflow.com/questions/17146224/how-to-solve-circular-dependency-in-require-js
http://stackoverflow.com/questions/4881059/how-to-handle-circular-dependencies-with-requirejs-amd
...
from platypus-js.
The problem with error message regarding circular dependencies is detection of such references. AMD format is asynchronous and so it is hard to detect such references. If you have such reference there nothing to examine to produce an error message. The system simply stops and it is all.
A developer can detect if his project contains circular references with a tool. For example madge from the stackoverflow post mentioned earlier.
from platypus-js.
@AlexeyKashintsev, looks like this holy wars caused by closeness of deadline when there is no time for rethinking of software design %)))
from platypus-js.
Related Issues (20)
- Link and collection properties HOT 1
- Grid after form resize
- Инспектор модели данных HOT 1
- Ошибка применения пустых полей в SE клиенте
- Postgresql 10 support HOT 3
- Add CI
- File # New File # Database structure diagram. HOT 2
- Custom Widgets API HOT 11
- Session share feature HOT 2
- JavaFX HOT 1
- Grid get cell element HOT 2
- Unminified web client HOT 3
- Tomcat don't save new password HOT 1
- Dynamic Rpc.Proxy instantiation in HTML5 client HOT 4
- Validator Module HOT 16
- Designer. Explore from here feature HOT 1
- Custom annotations in queries HOT 2
- ModelTextArea editable option isn't working HOT 2
- model.save() works bad in queries with joined tables (CRITICAL BUG!) HOT 2
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 platypus-js.