Live data from Hacker News

AngularJS and MongoDB: Goodbye middle tier?

codebulb.ch

1–10 of 35 posts

Re: AngularJS and MongoDB: Goodbye middle tier?

#2
For really small projects, a proper backend is not always necessary and talking directly to the db can speed up development. I wouldn't dare do that for anything serious though.

Couchdb is also a really nice way to do this, since it provides you with an extensive (an extensible) rest api out of the box, serves your site and even gets you a nice heroku like deployment workflow with the Couchapp project (https://github.com/couchapp/couchapp). Sticking it behind varnish is really easy too.

Re: AngularJS and MongoDB: Goodbye middle tier?

#3
post #2

For really small projects, a proper backend is not always necessary and talking directly to the db can speed up development. I wouldn't dare do that for anything serious though. Couchdb is also a really nice way to do this, since it provides you with an extensive (an extensible) rest api out of the box, serves your site and even gets you a nice heroku like deployment workflow with the Couchapp project ( https://githu…

I prototyped something exactly that way, including using Couch. It was really great, and quick as you describe, but ultimately still required a proper middle tier since the gap between a prototype and something deployable is often a lot bigger than one realized, and I ended up having to do a lot of work to get one situated in the middle. Though that ended up being an enterprise app, which adds complexity.

Re: AngularJS and MongoDB: Goodbye middle tier?

#5
post #2

For really small projects, a proper backend is not always necessary and talking directly to the db can speed up development. I wouldn't dare do that for anything serious though. Couchdb is also a really nice way to do this, since it provides you with an extensive (an extensible) rest api out of the box, serves your site and even gets you a nice heroku like deployment workflow with the Couchapp project ( https://githu…

I prototyped something exactly that way, including using Couch. It was really great, and quick as you describe, but ultimately still required a proper middle tier since the gap between a prototype and something deployable is often a lot bigger than one realized, and I ended up having to do a lot of work to get one situated in the middle. Though that ended up being an enterprise app, which adds complexity.

Yep, enterprise apps definitely fall under the "serious" umbrella :).

If a middle tier is a foreseeable requirement then this architecture does lose a lot of its charm.

I do think there has to be a way to easily strangle out the prototype but I haven't done much thinking about that yet. Maybe start reading from a pouchdb instance and proxy writes through a middle tier?

Re: AngularJS and MongoDB: Goodbye middle tier?

#8

i'm admittedly not a big web dev, but as a side question: how does the Mongo+RestHeart stack in the article compare to something like Meteor (which also works well with Mongo)? when would you want to use one or the other?

The point the article is trying to make is that their application has so little server-side business logic, they can avoid it all together and not write any server-side code.

Meteor, despite its ease of syncing subsets of data to users, gives you full control to execute RPCs and run custom logic, talk to other backends, send emails, etc.

Re: AngularJS and MongoDB: Goodbye middle tier?

#9
Well, at the end of the day you always need server side biz logic, I'm afraid!

Still, stored routines in a cloud DB might be more interesting than a full blown middle tier.

The biggest problem with cloud DBs I find actually isn't so much their architecture, but rather the fuzzy rules around charging access to them.

Post reply on HN