I would like to ask about best practiecs in creation of backend to Meteor.
I use Meteor js as Front End, and I am planning to use bunch of apache/php/yii framework/YiiMongoDbSuite at another port as backend(admin panel).
Maybe someone advices me the best practive for easy creation of admin part of meteor application?
It uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients without requiring the developer to write any synchronization code. On the client, Meteor can be used with any popular front-end JS framework, Vue, React, Svelte, Angular, or Blaze.
Meteor wird mit einem voreingestellten Front-End-Framework (Blaze) ausgeliefert. Dieses kann jedoch nach Belieben durch andere Front-End-Frameworks (u. a. Vue, React, Svelte, Angular) ersetzt werden.
Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node. js and general JavaScript community.
Meteor is a full-stack JavaScript platform for building web and mobile apps. Meteor makes it easier to create real-time apps, since it alone offers a full ecosystem to work with, instead of combining couple of different tools and frameworks to get the same effect.
If you've already built your backend in PHP/Rails,etc you could consider a DDP client or REST to relay messages between meteor and the backend. DDP has a couple of advantages over REST
its an open connection you could even get down live updates.
Im not sure of any DDP clients for PHP yet though. There are a handful:
You could use REST to communicate too, but you would be missing out on a lot of functionality. With DDP you could access Meteor.methods
and make subscriptions quite easily.
Finally, you could just connect straight to your mongodb and put your changes in. Meteor will handle them within 10 seconds.
But why not use Meteor itself as a backend? Using a seperat Meteor instance might make your admin area more secure. With Meteor as a backend, it would be far easier to maintain, you'd have compatible code to share between the two. You could use Meteor.connect to access the client instance.
If your motivation is security you could just do this. There's almost no benefit of using a separate language and stack when Meteor already makes it so easy.
UPDATE : Meteor 0.7.0 introduced oplog tailing so you wouldn't have to wait 10 seconds for the updates to appear anymore. They would be instant as if from meteor itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With