Comments (10)
Hey @biamontidv,
Thanks! We agree that using wire.js in node will be really powerful :)
Although I haven't tried it, it's likely that wire.js v0.7.3 would work in node if you use RequireJS. I'm guessing that getting the requirejs config right would be the trick. Have you tried it? If so, I'd be very interested to hear your experience!
At a high level, our plan for wire.js has always been to allow it to use whatever loader is provided by the environment. Since we come from the browser world, that originally meant any AMD loader. Wire already has some internal abstractions for dealing with differences (namely DomReady) between AMD loaders in the browser, so our plan is to expand those abstractions to also handle node's built in require().
Basically what that will mean is that developers won't need to do anything special to use wire.js in node. It'll just work :) And yep, we're targeting v0.8.
If you have any other thoughts about using wire in node, please feel free to add them to this thread!
from wire.
Hi @briancavalier,
fantastic! The idea I had was to start an enterprise integration patterns module (maybe you've heard of Apache Camel and wire.js is similar to Spring) for node (called donkey or node-donkey), but of course there were a number of challenges at several layers (and I was not 100% satisfied how the solution turned out) and now that I've heard of wire.js, I definitely think it can help.
Yes, I tried to run wire.js with requirejs on node with just the most basic config. Even though I could load other libraries (e.g. your when.js, sitting in the node_modules folder) by themselves, when trying to load wire.js I got an error saying:
Calling node's require("wire") failed with error: TypeError: Cannot read property 'defer' of undefined
mmh, an error passed through by requirejs, it has something to do with how when.js is loaded in wire.js?
I haven't tried anything else so far.
Any idea of a possible release date? Oh, and plans for including wire.js in npm?
Thanks :)
from wire.
Bummer! I was kinda hoping it would just work :) Thanks for trying it, and for the info about the error, though. I'm sure it will come in handy soon, since we're getting close to starting on node compatibility.
Your idea sounds very interesting. I'm familiar with Camel (I used it at a previous job a few years ago, with Spring), and I'd be interested to see your approach for bringing something similar to JS. It could make for some really cool patterns that are easy to implement via wire plugins! We've done some similar things with wire at my current client (LifeIMAGE), but we haven't abstract our patterns it into something quite as comprehensive as Camel. We have learned, though, that codifying patterns via wire plugins is quite powerful.
As for a timeline, it's hard to be specific with the holidays, but mid-late January seems like it could happen. I don't see any reason not to get wire into npm :)
from wire.
It's still early, but just wanted to let you know that we got wire loading in node today in a quick test. There's still plenty of work to do, especially for all the bundles wire plugins (followed by plenty of testing!), but it was easier than I thought it would be to take this initial step. I guess our abstractions are paying off :)
I'll leave this issue open to track progress.
Brian
from wire.
We just hit another milestone for node compatibility! We've converted all the non-browser-specific wire plugins to work in node, and wired a small test app that uses them.
from wire.
Fantastic!
keep up to good work!
from wire.
If you want to live on the bleeding edge, or just want to try it out in node, feel free to pull the dev-080 branch. It works with both RequireJS and Node. There is a paths problem that prevents it from working with curl.js in the latest commit, but we'll have that working again soon as well.
from wire.
Thanks to some late night heroics by @unscriptable, the dev-080 branch now runs in curl.js, RequireJS, and node! Be sure to update submodules if you want to run the unit tests. They run in both curl and requirejs, and we're working on unit tests for node as well.
from wire.
Today we merged the dev-080 branch back into dev. That means the dev branch now runs in node and AMD. The node support seems solid, so feel free to play with the dev branch in node. We're just working on pulling together other things and shooting for a release within the next couple weeks.
from wire.
v0.8.0 just landed with Node and RingoJS support
from wire.
Related Issues (20)
- wire/builder/cram interprets any property called "create" as a factory HOT 1
- duplicate wire/dom wire/dom HOT 1
- Wire does not work with 'when' 3.0.0. HOT 3
- Empty `create: {}` should cause a loud error
- Add when 3.0 compat HOT 6
- Context Usage HOT 5
- BDD + CujoJS HOT 5
- wire/builder/cram should call require.toUrl() before fetching modules HOT 1
- 'import' a context into another HOT 4
- Allow import of a context-spec into another. HOT 5
- Remove artificial dot traversal limit HOT 2
- Container Compilation? HOT 1
- wirejs and dojo using the dojo build system seems impossible
- AOP plugin causing potentially unhandled rejections HOT 2
- Using properties or methods of other modules or components as components
- Using components from child and sibling contexts
- create factory should invoke function with context if module is a method of an object
- Dependencies when destroying a context?
- Bundling with Webpack doesn't work well HOT 3
- Not es6 ready - does not work with es6 classes 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 wire.