Comments (10)
Initial work for this checked in under addyosmani/backbone-aura@4a233fc. I'll continue working in branch on this. Happy for anyone else to pitch it.
Current status is that the demo app renders but we're getting a bunch of type errors. I assume this is related to some breakage occurring in how components are now being pulled in.
from aura.
I'm tempted for us to drop the idea of Aura being a single library. On the contrary I feel like the developers using us are already using RequireJS, like the idea of modularity and pulling in our dependencies isn't a pain point. We could be opinionated in that way and instead focus on providing a great architecture, better support for the feature RequireJS does expose under the sheets (or plugins which help with that).
@sindresorhus @gersongoulart what do you think?
from aura.
I absolutely agree. There's a good reason jQuery is going the opposite way single-file -> modular.
from aura.
Glad to hear you agree :)
from aura.
I've tackled a similar tricky plumbing for a library that I'm currently working on. If you don't mind, I can take a stab at this for 1.0. The way I've done it is, the library in question works identically minified, or as exploded sources, just as yet another library sitting inside the lib
folder from an application's perspective. I think Aura should act like a library instead of a scaffold.
The Aura project can be restructured as follows:
+-- <src>
| +-- aura.js
| +-- <aura>
| +-- base.js
| +-- core.js
| +-- sandbox.js
| +-- permissions.js
+-- <samples>
| +-- <todos>
| +-- <css>
| +-- <js>
| | +-- <widgets>
| | +-- app.js
| | +-- permissions.js
| | +-- config.js
| +-- <lib>
| | +-- <requirejs>
| | +-- <underscore>
| | +-- <backbone>
| | +-- ...
| +-- <nls>
+-- <doc>
+-- <test>
To be honest, I was mildly confused as to what file was for what, and what the boundaries of Aura were, when I first started looking at this project. I think a folder organization like the above could help clear things up.
All the sample application assets would clearly be enclosed inside the samples
folder. src
would be reserved for Aura code only.
The aim of the redundant aura
folder inside src
is to allow the modules to be located using the same paths both in minified and non-minified distributions.
I don't have an answer for where the Backbone extensions should reside. Are they a part of Aura? Should they come with the sample todos application? Or should extensions lie inside an entirely different extensions
folder, or even their very own repos?
from aura.
Thanks for kickstarting off this discussion again. I think there are a few parts to this.
- I agree that the current folder structure is confusing and do prefer the suggested changes.
- In my mind, the Backbone extension should exist as a separate file (or plugin). That said, I see this as not being as important as most people should be using Aura with a build process.
- If we're able to offer up a single-file 'build' version of the library whilst still offering modularity, that would be the best of both worlds and I'd certainly be up for us landing that.
I have concerns about us trying to tackle this for 1.0, even though I would love that. I remember how long it took me to get the POC put together in a way that many of the parts actually worked sans RequireJS and I'd worry that we might end up spending a lot of time working on this that could be spent landing other 1.0 features, docs or tests.
For now, would we be down for the directory structure changes once incoming PRs for the rest of our milestone land? :)
from aura.
@addyosmani I agree. A change to both the project structure and build process could be very upsetting during the 1.0 crunch. I could still work on a PoC when I find the time...
Off-topic question: Me having direct write access to this repo -- does it mean I can take the liberty to directly make changes for minor, low risk stuff like typos? Or should I always stick to the PR process?
from aura.
Yes! Any minor changes can be made directly. Please feel free to.
from aura.
@addyosmani I guess we can close this one now ?
from aura.
Yes!
from aura.
Related Issues (20)
- Doubt about duplicate element and maintain the associated events HOT 3
- Framework design flawed! Removing dependencies jQuery and Underscore. HOT 12
- Requirejs repair Tons of issues. HOT 1
- Mediator dependency removal Event Emitter HOT 3
- Support for loading of individually optimized components? HOT 15
- Asynchronous/dynamic loading of components? HOT 3
- Does Aurajs compatible with IE6? If not, how should I do to make it support?
- Error when manually loading a component
- Data management HOT 4
- ideas or plans about aura's job in relation with polymerjs HOT 5
- Can't go past a Grunt Task referring component initialize
- hi guys did you abandon the aura project? HOT 2
- Access to parent(super) methods within component HOT 1
- how to Concatenate the files of the decoupled modules HOT 4
- External links not working with Android webview HOT 1
- [BUSINESS CRITICAL] aurajs.com - github pages site is inaccessible HOT 6
- How to use jQuery and Flot with AuraJS ?
- Lightening component built upon aura js
- The project's domain is advertising some pocker stuff :)
- Aura
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 aura.