Live data from Hacker News

AngularJS and MongoDB: Goodbye middle tier?

codebulb.ch

11–20 of 35 posts

Re: AngularJS and MongoDB: Goodbye middle tier?

#11
If you absolutely trust the db clients not to mess with data, then you can do this. Unfortunately it's usually not the case. Think about HN done completely client side. Everybody would have 1 million points ;-)

That's why we still have that middle tier in our architectures.

Re: AngularJS and MongoDB: Goodbye middle tier?

#13

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.

> stored routines in a cloud DB

Application code in stored procedures? Is this still a thing? SQL2003 standard was completely into it with Java as stored procedures and XML, etc. - but wasn't that just an enterprise fade with big expensive enterprise databases like Orcale/DB2/MSSQL?

It introduces a lot of headache if you update your code often - it's already hard enough with schema changes, especially if you would like to be able to roll back faulty updates. Normal code is maintained a source code repository (GIT/SVN), it can be edited, diffed and debugged using a common IDE.

Re: AngularJS and MongoDB: Goodbye middle tier?

#15
post #13

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.

> stored routines in a cloud DB Application code in stored procedures? Is this still a thing? SQL2003 standard was completely into it with Java as stored procedures and XML, etc. - but wasn't that just an enterprise fade with big expensive enterprise databases like Orcale/DB2/MSSQL? It introduces a lot of headache if you update your code often - it's already hard enough with schema changes, especially if you would li…

In what way aren't stored procedures "normal code"? Are you claiming Git can't handle SQL files? Or that they can't be tested? Or there are no debuggers or IDEs?

Here's a clue, a serious project will go through a dozen languages before it changes its database. You can reimplement your business logic that many times, or do it once, properly.

Re: AngularJS and MongoDB: Goodbye middle tier?

#16
post #15
post #13

Earlier quoted context omitted.

> stored routines in a cloud DB Application code in stored procedures? Is this still a thing? SQL2003 standard was completely into it with Java as stored procedures and XML, etc. - but wasn't that just an enterprise fade with big expensive enterprise databases like Orcale/DB2/MSSQL? It introduces a lot of headache if you update your code often - it's already hard enough with schema changes, especially if you would li…

In what way aren't stored procedures "normal code"? Are you claiming Git can't handle SQL files? Or that they can't be tested? Or there are no debuggers or IDEs? Here's a clue, a serious project will go through a dozen languages before it changes its database. You can reimplement your business logic that many times, or do it once, properly.

What I tried to point out it complicates the schema-update step a lot. Lot's code as stored procedures was counter productive at least in my experience. Several blog posts (post mortems) mention they avoid stored procedures as much as possible. I would debate that a "serious project" changes the code language at all. Even the old rusty SAP only switched from ASM to C and ABAP and reverted their Java misadventure. And Microsoft's products are still 90+% ASM, C and C++ code

Re: AngularJS and MongoDB: Goodbye middle tier?

#18
post #7

"I chose MongoDB because it’s considered by far the most widespread “NoSQL” databases at the moment." Pretty poor reason for choosing something.

Widespread usually means a lot of people are familiar with it and since the community is large, problems should arise and be fixed quickly - in the best case.

Not advocating Mongo here, just saying that adoption is not an irrational reason. I have mostly seen this with Java, when people tell me: We chose Java, because that's what they teach at universities and this is what developers know.

Re: AngularJS and MongoDB: Goodbye middle tier?

#20
post #7

"I chose MongoDB because it’s considered by far the most widespread “NoSQL” databases at the moment." Pretty poor reason for choosing something.

I'd rather use the technically good-enough solution with a large ecosystem than the technically perfect solution without one.
Post reply on HN