6

We are developing an Enterprise application with the following technology stack:

  • Websphere Application Server
  • Spring (Webflow (Session in View pattern), JPA (Hibernate), Core)
  • DB2 osZ
  • Frontend (JSP Rendering HTML5 (CSS 2.0), Ajax in combination with webflow, JQuery)
  • Multiple Single Pages design combined by using webflow for supporting subflows

Development Methodology - Domain Driven/Component Driven Application - Test Driven Development

Current Situation Our domain model has very deep domain class hierarchy and therefore we decided to use webflow to allow deep class navigation in sub flows. We are using the “session in view pattern” because there are many screens reflecting the class hierarchy of the domain model. This worked very well because of having the backend managing session scoped data for the frontend.

What do we want to do next?

  • Single Page Design
  • Control User data in session
  • Control User data across screens
  • Support multiple instance of a browser in one user session
  • Want to be able to talk to the backend (Enterprise Java/Spring) to retrieve data and persist
  • Support more state-of-art user experience

Technology Stack

  • Websphere Application Server
  • Spring (Webflow (Session in View pattern), JPA (Hibernate), Core)
  • DB2 osZ
  • Frontend (Angular, JQuery, Bootstrap 3)

So the discussion internally is how to integrate Angular?

  • Should we give up Webflow and solve everything with Angular?
  • Does a mix make sense?

We have taken the following chart as a reference: http://vschart.com/compare/angularjs/vs/spring-framework

We know what both frameworks are able to do, and know how to make them work. We are interested in other teams experience on how to integrate Angular? Did someone ever mix Webflow and Angular? We are interested to see some best practices and how teams have transitioned to either framework or keeping both?

Thanks for input, Andrew

Andrew
  • 61
  • 1
  • 2
  • Comparing Spring to Angular is just laughable as is the chart you linked to. Do you have a **need** to use Angular or do you just want to use the new shiny? – Bart Feb 17 '14 at 18:08
  • Well first I would be interested why the comparison in your opinion in your opinion is not worth doing? Our first motivation was to go to single page design and implement more advanced, cleaner and faster frontend solution. We are expecting to get this out of Angular. The discussion started when we realized that Angular has some of the same capabilities as Webflow. Most backend developers prefer to continue to use webflow and just use angular as a pure HTML renderer. Furthermore Angular will allows us to do quick High Fidelity mockups to show to the customer without having a real backend. – Andrew Feb 17 '14 at 20:44
  • The comparison is not worth doing because they both have totally different areas. Angular is frontend while WebFlow is backend. Yes, on the surface it seems like you can achieve the same result with both. But the same goes for most other web technologies. Creating quick mockups is a valid point. Still, the fastest way to create mockups is with pen and paper :) Yes, it's still used – Bart Feb 17 '14 at 21:46
  • So would you agree that using Angular as HTML renderer and use Webflow as we are doing today? I think maybe this could give us the best out of both worlds! BTW Pater and Pen is also valid but when you do validation of UX design, you are forced at some point to show the user a high fidelity mockup. This a process step in User Centric Design ;o) – Andrew Feb 17 '14 at 22:52
  • Having the best of both worlds should great. Unless it makes things unnecessary complicated. Just have a go and see what happens. – Bart Feb 18 '14 at 14:59
  • What did you guys decide in the end? I was just googling exactly this question and your question came up. Care to share some experiences? – John Deverall Jan 29 '15 at 21:51
  • We are also looking for similar requirement for the application i am working on, but i dont see any accepted answers.Andrew if you could share your experience – abhi Nov 25 '16 at 11:42

2 Answers2

0

I suggest you to check the Java library thymeleaf in order to get directly the benefits of HTML5 which you can easily add AngularJS and build on top of it (with bootstrap if you need it), and use Spring Security for Auth & session management. As loose coupling at all levels (front-end included) is most of the times desirable, try to avoid technology mixing (WebFlow & AngularJS in this case) where doesn't makes sense.

Last thing, you and your team can discuss the possibility to develop an Angular based single page application which consumes a server side API coded in Java.

David
  • 130
  • 1
  • 1
  • 11
0

It is too late but might be useful for someone looking for this sort of answer.

I would recommend

  1. Angularjs SPA(single page application) and use html template instead jsp.
  2. Implement Token based authentication rather session based and implement restful spring web mvc api.
  3. web flow/navigation can be controlled using the Angular services or browser's localstorage. I would recommend Angular services to manage app state instead browser localstorage.

And obviously bootstrap 3 to make the UI pretty.

Example implementation: jhipster

seenimurugan
  • 464
  • 4
  • 19
  • What is the configuration to do a URL rewrite in web.xml or somewhere else. I have angularjs in a sub-directory and when doing a request the application breaks with 404 error. I want to use html5 mode and am not able to due to configuration of URL rewrite not being there. Any help? – Gary Aug 25 '16 at 14:30