2

I have an application like Amazon, where there is a login page, product search/display ,bill payment, order status/history and wishlist ..etc. And the applicaion is implemented on

UI : JSTL (JSTL + jquery + Ajax), some of the UI pages consume REST based services.
MVC framework : Spring MVC

DAO : Hibernate

DB : Mysql

I do not know about AngularJs, but I know It is a MCP (Model-View-Presenter) design pattern. Could anyone please help me to understand where can I use AngularJs in the above application?

Thanks in advance!

EstevaoLuis
  • 2,422
  • 7
  • 33
  • 40
Isabel Jinson
  • 8,541
  • 16
  • 59
  • 75

2 Answers2

1

Angular is a javscript framework and is used at the U.I side of you application for making application MVC based. you would use it where you are going to use jquery i.e. at the client side, so your angular code will be running on a browser.

here is some more information on why Angular:

What does AngularJS do better than jQuery?

http://www.sitepoint.com/10-reasons-use-angularjs/

https://docs.angularjs.org

Community
  • 1
  • 1
Naeem Shaikh
  • 15,331
  • 6
  • 50
  • 88
1

AngularJS is a javascript framework using the MVC pattern. You could use it to implement any functionality you have listed above.

E.g. There is the concept of a "router" in which you can define the routes (login page, billing, product search) for your application including information about if somebody is allowed to see the page or not (keyword: resolve-tag). In your views you could then define where people get when they click on links/buttons.

AngularJS works well with JQuery and JQueryUI, so you would need to adopt your views a little bit in order to make use of AngularJSs capabilities e.g. two-way model-binding, repeaters, evaluation statements and so on. If you dont want to do that you could use AngularJS to do the logic part and just send AJAX requests to a server and process the result, so that you use JQuery to do something with the result.

AngularJS has not capabilities to directly access databases except in-built browser database. So you would need a webservice to get some JSON or XML back. Which backend you are using doesnt matter. I have done projects using a .NET or Java or Ruby backend. In the end its all about AJAX and JSON, right?

Generally spoken: I am using AngularJS to build front-end logic and sometimes even the basic UI content. If I need special controls I make use of third-party UI libraries. Because of the easy model binding I get all the values reflected in my controllers easily. So for me AngularJS is a great framework to build web applications easily.

Hope that helps. Cheers

SLi
  • 60
  • 1
  • 5