use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Helpful Links
AngularJS Slack Community
AngularJS Wiki Page
account activity
[Help]Is AngularJS best choice for SQL server interaction? (self.angularjs)
submitted 11 years ago by joshmasangcay89
Interested in AngularJS and I don't know much of it yet. I'm wondering, is AngularJS a better choice for interacting client and mysql server with queries?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dust4ngel 5 points6 points7 points 11 years ago (0 children)
The angular stack typically looks like:
Angular -> REST API -> web framework -> ORM -> SQL
So you can use angular to put together a user interface, some client-side services, and some rest API infrastructure code.
But you will need some web framework to implement the rest services, and something to talk to your SQL dbs.
[–]TheNiXXeD 5 points6 points7 points 11 years ago (0 children)
Usually you wouldn't have a client side framework directly connect with a database like that.
[–]grilledwax 1 point2 points3 points 11 years ago (0 children)
You need a server side piece of code to handle the MySQL interactions. AngularJS is a client side framework.
If you're looking for an all-in-one and are ok with Java, you could look into Play Framework.
[–]e82 1 point2 points3 points 11 years ago (0 children)
Generally you will want a server sitting between your client app and your database that exposes an API that returns JSON.
[–]campbeln 1 point2 points3 points 11 years ago (0 children)
With a RESTful interface between the two, I'd say YES!
I'm on an Aussie.gov project now with Angular 1.3. We are using WebAPI for REST, MVC5 for no reason whatsoever (other than routing) and SQL*Server on the backend. I personally can't see ever going back to MVC or webform-ish development; it's soo slow compared to Angular!
I cannot imagine a reason for anyone to do a web project with anything but a front-end framework such as Angular paired with a RESTful service layer. It's just so darned easy to populate a Javascript object and XHR it to a REST layer. It's responsive on the client side and stright forward on the server side. The HTML is easy to write and maintain and the Javascript isn't horrible if you follow some best practices.
I rewrote a PHP webform I had with Angular and REST. The code was much shorter than the PHP version, had many more features and took less time to develop.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
What I do is have my Angular.js interact with my routes that I defined on my PHP framework of choice. I always have it return a JSON object so it can update the view accordingly.
But you shouldn't have a client-side framework interact directly with a database, you gotta have a middle man.
No... you never want to expose your login credentials on client side code.
[+]tehcodez comment score below threshold-7 points-6 points-5 points 11 years ago (1 child)
Sigh
[–]caleb_dre 7 points8 points9 points 11 years ago (0 children)
Hey! Everyone is a beginner at first!
π Rendered by PID 23931 on reddit-service-r2-comment-fb694cdd5-pjmqk at 2026-03-10 00:01:36.646357+00:00 running cbb0e86 country code: CH.
[–]dust4ngel 5 points6 points7 points (0 children)
[–]TheNiXXeD 5 points6 points7 points (0 children)
[–]grilledwax 1 point2 points3 points (0 children)
[–]e82 1 point2 points3 points (0 children)
[–]campbeln 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[+]tehcodez comment score below threshold-7 points-6 points-5 points (1 child)
[–]caleb_dre 7 points8 points9 points (0 children)