Code Monkey home page Code Monkey logo

Comments (10)

briancavalier avatar briancavalier commented on August 28, 2024

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.

biamontidv avatar biamontidv commented on August 28, 2024

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.

briancavalier avatar briancavalier commented on August 28, 2024

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.

briancavalier avatar briancavalier commented on August 28, 2024

@biamontidv,

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.

briancavalier avatar briancavalier commented on August 28, 2024

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.

biamontidv avatar biamontidv commented on August 28, 2024

Fantastic!
keep up to good work!

from wire.

briancavalier avatar briancavalier commented on August 28, 2024

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.

briancavalier avatar briancavalier commented on August 28, 2024

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.

briancavalier avatar briancavalier commented on August 28, 2024

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.

briancavalier avatar briancavalier commented on August 28, 2024

v0.8.0 just landed with Node and RingoJS support

from wire.

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.