Coder Social home page Coder Social logo

Comments (13)

mindjuice avatar mindjuice commented on August 29, 2024

You can find an example @jordangarcia gave of how Optimizely does async stuff in issue #5.

It's not exactly "built-in" to Nuclear, but it's pretty straight-forward.

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

Thanks for the link to the issue @mindjuice.

I do plan on releasing a standardize RestApi module that can easily be plugged into Nuclear.

Would this be something that both of you would be interested in? If there is a lot of interest I can prioritize it to come out shortly after 0.6.0 is released.

from nuclear-js.

rattrayalex avatar rattrayalex commented on August 29, 2024

It's certainly something I would be interested in! I haven't played around
with the linked example (thanks for sharing!) but I think it looks like
it's in the right direction at least.

I may be interested in contributing if you think an outsider / Nuclear
newcomer could be useful to that project.

On Sat, Apr 25, 2015 at 12:19 AM Jordan Garcia [email protected]
wrote:

Thanks for the link to the issue @mindjuice https://github.com/mindjuice.

I do plan on releasing a standardize RestApi module that can easily be
plugged into Nuclear.

Would this be something that both of you would be interested in? If there
is a lot of interest I can prioritize it to come out shortly after 0.6.0 is
released.


Reply to this email directly or view it on GitHub
#26 (comment)
.

from nuclear-js.

bunkat avatar bunkat commented on August 29, 2024

I'd be interested in it as well.

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

@rattrayalex I am very open to others contributing to this project. Shoot me an email at [email protected] and we can discuss more.

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

For those interested I have started work on making an example app using a generic Rest API module.

https://github.com/optimizely/nuclear-js/tree/rest-api-example/examples/rest-api-example/src/modules/rest-api

Ignore everything outside of modules right now as some of it was copied over from another project.

from nuclear-js.

rattrayalex avatar rattrayalex commented on August 29, 2024

Awesome! Sent.

On Sat, May 2, 2015 at 10:42 PM Jordan Garcia [email protected]
wrote:

@rattrayalex https://github.com/rattrayalex I am very open to others
contributing to this project. Shoot me an email at [email protected]
and we can discuss more.


Reply to this email directly or view it on GitHub
#26 (comment)
.

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

Updated the README with a more in-depth description of the architecture and added a User module example.

Would love feedback.

https://github.com/optimizely/nuclear-js/tree/rest-api-example/examples/rest-api-example/

from nuclear-js.

mindjuice avatar mindjuice commented on August 29, 2024

Looks good, except: http://i.imgur.com/X4Fsf96.jpg :-)

I know it's only an example, but most people tend to stick closely to the examples. I discourage people from jQuery in general, but especially in React apps. It's a lot of overhead just for the ajax() method (~34K vs ~3.7K for Superagent).

Maybe Superagent instead?

https://www.npmjs.com/package/superagent

Even XmlHttpRequest or perhaps a promisified version:

https://www.npmjs.com/package/xhr-promise

There are some Superagent promise wrappers too:

https://www.npmjs.com/package/superagent-promise
https://www.npmjs.com/package/superagent-bluebird-promise

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

@mindjuice that's a good point. I am used to using jQuery at work, I understand it's not ideal for most React apps. I will update the examples using a more lightweight ajax library..

from nuclear-js.

jtremback avatar jtremback commented on August 29, 2024

Can I suggest you use the fetch API? It's about as clean as any alternatives and is a browser API.

from nuclear-js.

mclouvem avatar mclouvem commented on August 29, 2024

Hi @jordangarcia, first of all, congrats for your job with nuclear-js. I've just started use nuclear-js for an volunteer project. I'm interested in rest api feature. Do you have plan to create the V2 of rest-api example?

from nuclear-js.

jordangarcia avatar jordangarcia commented on August 29, 2024

@mclouvem it's not a huge priority now.

If you'd like to implement i'd happily accept PRs :)

from nuclear-js.

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.