AngularJS with Java as server side

2,787 views
Skip to first unread message

Ashish Patha

unread,
Oct 27, 2013, 8:10:42 AM10/27/13
to ang...@googlegroups.com
Hi

Need a small tutorial how do we go ahead with angularJS with front end and java as back-end. googled a lot but did not get a correct tutorial where i can go ahead. Can any one please share your views or tutorials on how do start and go ahead with angular js as frontend and java as back-end.

Grant Rettke

unread,
Oct 27, 2013, 11:47:05 PM10/27/13
to ang...@googlegroups.com
If you use JSON as the data format then it will "just work".
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+u...@googlegroups.com.
> To post to this group, send email to ang...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Grant Rettke | ACM, AMA, COG, IEEE
gre...@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

KamBha

unread,
Oct 28, 2013, 1:28:16 AM10/28/13
to ang...@googlegroups.com
I have not really started looking at integrating java and angular, but I would look at using Jackson (http://jackson.codehaus.org/) or GSON (http://code.google.com/p/google-gson/) to generate your JSON objects. Both support the creation of JSON using annotations.

Grant Rettke

unread,
Oct 28, 2013, 8:36:41 PM10/28/13
to ang...@googlegroups.com
JEE 7 and JAX-RS should have decent brokering; can't wait to see.


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Tabuenca

unread,
Oct 28, 2013, 9:26:13 PM10/28/13
to ang...@googlegroups.com, gre...@acm.org
I find SpringMVC one of the easiest and most powerful frameworks for doing  REST applications using JSON. You can take a look at this example:

Grant Rettke

unread,
Oct 28, 2013, 9:33:33 PM10/28/13
to ang...@googlegroups.com
Spring is always a good option.

Still, I'm kind of intrigued what we'll be able to do with JEE 7 out of the box.

Thai

unread,
Oct 29, 2013, 6:40:45 AM10/29/13
to ang...@googlegroups.com
Do you need an example that just works (in this case I can give you a very simple working example if you use maven) or something that can be used in production?

About SpringMVC and JEE7 (this is my own opinion): JEE6 already supports REST but if you have a chance to use JEE7, it's very good for you. With JEE, you don't need any xml files (or java config) as in Spring, just put some REST-specific annotations in your class and then you go. SpringMVC is very good but it requires xml files (to declare all the context, mvc, ... namespaces) or java config (another way to tell Spring where to look for your Spring beans). I'm never able to remember how to write those Spring xml files or how to write the java config (always have to open the Spring reference documentation every time).

Aymen Kadri

unread,
Mar 27, 2014, 6:29:07 AM3/27/14
to ang...@googlegroups.com
@Thai : i need an example using maven and that can be used in prod. And can i use yo/grunt for webapp and maven for back?

Marc Loupias

unread,
Mar 27, 2014, 10:55:30 AM3/27/14
to ang...@googlegroups.com, Aymen Kadri
On 27/03/2014 11:29, Aymen Kadri wrote:
> @Thai : i need an example using maven and that can be used in prod. And can
> i use yo/grunt for webapp and maven for back?
>

Hi,

i have built a mysql/java/angular stack and published it on my github.

The front is at https://github.com/MarcLoupias/poc-angular-frontend
I use yo/grunt/bower too. Using generator-angular.

The back is at https://github.com/MarcLoupias/poc-play-rest-backend
It is with Play framework (Java) so no need of Maven but you could find
some usefull code (REST, Google Guice example, PoJo validation using
JSR-303, ...)

The demo app is on heroku at http://poc-angular-frontend.herokuapp.com
Reaching the website can takes some seconds because of low trafic and
heroku sleep mode :)

Marc.

Aymen Kadri

unread,
Mar 28, 2014, 4:28:50 AM3/28/14
to ang...@googlegroups.com, Aymen Kadri, li...@marc-loupias.fr
interesting poc !!
Thank you Marc

Michael Hopper

unread,
Mar 29, 2014, 7:50:39 AM3/29/14
to ang...@googlegroups.com
You should also check out jHipster, a community driven modern Web sample project. Technologies used include:
  • Client Side: AngularJS, Grunt, Bower, Karma, PhantomJS
  • Server Side: Maven, Java, Spring MVC REST and Jackson, Spring Security. Spring Data JPA, Liquibase
See http://jhipster.github.io/ and make sure to visit the presentation at http://jhipster.github.io/presentation/#/


On Sunday, October 27, 2013 8:10:42 AM UTC-4, Ashish Patha wrote:
Reply all
Reply to author
Forward
0 new messages