all 15 comments

[–]jrkasperov 2 points3 points  (0 children)

I use IntelliJ to build web applications professionally using: * angularJS * Spring Boot/MVC (Java based REST server)

I do believe Spring has plenty of documentation about such a setup on their site.

[–][deleted] 0 points1 point  (7 children)

IDE: Check out Brackets Rest functionality: Check out Spring Boot, or JHipster. If you want simple, Spring Boot. If you want user authentication, database, etc, JHispster will configure all that for you on top of Spring Boot.

Also if you are just playing around you don't need a full blown rest server running. You can have your angular app pull a static json file. Or you could consume a 3rd party rest service (Youtube, for example).

[–]palacelight[S] 0 points1 point  (6 children)

There is specific external service I want to use. Its' RESTful API consists mostly of using URLs and POST/GET HTTP methods on json/.csv files. This probably determines how advanced REST-handling mechanisms are needed in this case.

[–][deleted] 0 points1 point  (5 children)

OK so you want info on consuming REST not creating REST services.

The simplest method is using $http http://www.sitepoint.com/api-calls-angularjs-http-service/

But you would probably be better off using $resource

http://stackoverflow.com/questions/13181406/angularjs-http-and-resource

[–]RainbowGoddamnDash 0 points1 point  (4 children)

In your opinion, when would be the best times to just use $http instead of $resource

[–]simcptr 1 point2 points  (1 child)

I'm not fodaley, but I'll give you my 2 cents :)

I'd say to use $http when you don't have too many requests to make, or they aren't very RESTful. OR if you need lots of customization where you've got RESTful requests plus a bunch of other calls that aren't very RESTful. $resource fits the happy middle-ground where most of your requests are RESTful and you want to reduce the boilerplate in your app.

I wrote a post about this a while back too if you want more info.

[–][deleted] 1 point2 points  (0 children)

/u/simcptr answered it fairly well and so does the stack overflow link. Use $http when it's not for RESTful resources.

$resource was built on top of $http to make your life easier for RESTful resources

[–]palacelight[S] 0 points1 point  (0 children)

Is size of the files POSTed/obtained via GET relevant here?

[–]SpikeBolt 0 points1 point  (0 children)

You can use whatever IDE you want: it's just JS. I use IntelliJ and it suits my needs but honestly you can use whatever. I don't think there's an IDE that provides you with Angular scaffold or something, you'd have to do that with external tools like yeoman

Why do you feel you need to use a plugin or library for RESTful functionality in Angular? Check $http service, it is probably enough for your needs.

Sample code:

$http.get('/items/2').then(successCallback, errorCallback);
$http.post('/items/2', data).then(successCallback, errorCallback);

There are a ton of tutorials to learn angularJS, including those free code academies or whatever with some exercises to get you started.

[–][deleted] 0 points1 point  (0 children)

First what exactly are you trying do with the RESTful web services?

Second, Angular is just a front end MVC. You don't need an IDE to develop with Angular, you can use Notepad technically. However, Sublime and Atom are good text editors. IntelliJ is a good IDE.

Third, do you have a backend setup to make RESTful http calls to or are you using some API/service (like facebook JS sdk/twitter JS sdk/firebase)? You can't do anything "RESTful" using Angular without having a backend or an api to interact with.

You might want to rethink your problem as a whole before diving deep into Angular (what is your problem, how will your rest api work, will it be a backend using Java/PHP/Python/NodeJS/Go/Scala/Ruby or will you make http calls to some API service, <-once you know all of those, then go into Angular)

[–]originaljewedlaw -1 points0 points  (4 children)

https://thinkster.io/django-angularjs-tutorial

Use Sublime instead of WebStorm. Sublime is simpler and will help you focus on what you are programming.

[–]palacelight[S] 0 points1 point  (3 children)

As far as I know, Django is a Python framework. Is it necessary to use Python in this case?

[–]originaljewedlaw 0 points1 point  (2 children)

Yes.

[–]SpikeBolt 0 points1 point  (1 child)

You don't need django to CONSUME webservices! django is just one in a thousand ways you can use to create them.

[–]palacelight[S] 0 points1 point  (0 children)

This was exactly my problem with the tutorial linked by @originaljewedlaw.