Hacker News new | comments | show | ask | jobs | submit login

This feels to me a lot like how Rails felt back in 2005. A fundamental leap forward and an understanding of where web technology is going.

I haven't felt that way about Node.js or even its higher-level frameworks like Express or Batman. This feels like "The One", even though I've been absorbing the docs and screencasts only for the last 20 minutes.




I somewhat disagree. I want to preface my post by saying I'm smiling ear to ear—I loved the screencast, and I look forward to using this tomorrow on a project I've been thinking about for a while.

Here's my concern: If I use Meteor as it is intended, and I also want a my application to have API, I'll have to re-implement all of my logic server-side[1]. This seems like a step back, unless I'm misreading things.

I'd love for the Meteor team to address this. Does Meteor make writing APIs easier?

[1]: I'm aware that much of the "client-side" code is executed server-side too, but that's due to Meteor's magically transparent client-side framework.

-----


Hey, one of the Meteor authors here. Meteor's architecture makes it super easy to make an API. It's one of the advantages of building your architecture around sending data around rather than HTML.

We couldn't go into everything in the video (it was already too long!), but the piece you're missing is Meteor.methods(). This lets you define methods, which are functions that the client can invoke on the server by calling Meteor.call(). If you choose to also ship the code for these methods to the client (it's optional) then you'll get full latency compensation like we talk about in the video. (This means that Meteor can latency-compensate arbitrarily complex functions, like "read this record, then add 2 to X if this field is false, else create a new record Y.")

In fact, every Meteor app already has an API :) Your Meteor client can connect to any other Meteor server by calling Meteor.connect(), and can then subscribe to any realtime datasets that that server is publishing, or invoke any methods available on that server. This is done with a protocol called DDP, but we could map DDP to REST fairly easily.

-----


> every Meteor app already has an API :) Your Meteor client can connect to any other Meteor server by calling Meteor.connect()

What about a non-Meteor client connecting to a Meteor server? Does that client have to understand DDP, or is that what you mean by "we could map DDP to REST" - there's no support for non-DDP clients now, but it's planned?

The latency compensation and Meteor.call() interface sound great, but what I understood by the GP's question about an API was "how can other clients besides mine talk to my app?".

-----


Thanks. What does DDP stand for? I found several possible definitions.

-----


I think it might be "Dynamic Decoupling Protocol"

-----


From talking to deberg (matt debergalis) on #meteor, ddp stands for distributed data protocol and in his words "is a combination of remote method invocation and attribute pub sub, tied together in a way that [allows] latency compensation on the client by simulating server methods"

-----


I'm not sure about Meteor, but you may want to look into SocketStream. Last time I checked they were very interested in making web APIs easier to develop.

-----


Completely agree. I thought Backbone was the "missing piece", but this really is it.

Edit: to clarify I specifically meant a front-end tool to help me leap a level in personal development skill.

-----


I am sorry but there is no way to compare backbone with this one( but it looks very nice, too ), they aim at different things.

I am using backbone for a while and it's backend agnostic which is great !

This one have more resemblance to knockout.js( I am talking client side) and it's MVVM design, backbone doesn't even try to approach that problem.

-----


Very true. I wasn't very explicit that I didn't mean they were the same thing, apples to apples. I meant "missing piece" in terms of the front-end tool to help me leap a level.

-----


In my gut I was thinking "Great, another JS framework." I watched the video and was very impressed. And I consider myself a server guy.

-----


Backbone is almost at the top of the javascript toolkit levels. Let's put it in perspective:

- backbone - jquery - meteor <- the low level of the high level :)

You use meteor as a foundation to build your application as backbone is more or less your application itself. Think "CoreFoundation" vs "AppKit" kind of difference.

-----


Interested to see how they'll handle file uploads, authentication, etc. Especially authentication, seeing as clients have full access to the database right now.

-----


This is built with Node.js.

From the docs: "A Meteor application is a mix of JavaScript that runs inside a client web browser, JavaScript that runs on the Meteor server inside a Node.js container..."

-----


I think he's saying this could be the Rails of Node.js.

Node.js is very low level and is more analogous to Ruby than Rails.

-----


Or Node.js == Rack? Something like that. Agreed.

-----


I know. I meant that Node.js itself wasn't the fundamental leap that this is. And previous frameworks based on Node haven't attained "The One" status either.

-----


I felt that way when I first learned about Kanso JS.

-----




Applications are open for YC Summer 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: