Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a Java web project with JSP as frontend and Java for backend. I want to convert this project to Angular Frontend and Java backend. I tried googling but didn't get anything. I am really stuck on how to do this.
Can anyone tell how can I achieve this?
You can change your project to MVC structure. May be you have separate service layer in your current project. Try to implement Controller layer. It will be better If you use REST controller. REST API is more suitable for Angular. You need to change bindings with JSP UI. Try to convert it with REST controller. And make service layer and dao layer separate. So Structure will be like this:
UI->Controller -> Service->Dao
I dont know your project is spring based or not. If spring based then you can covert your project with Spring boot project. There are many sample is now currently available for Spring based project.
If your project is not spring based you just need to implement REST API to your codebase and remove JSP bindings.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am new to the angular 2 framework, recently I decided to work with this framework, after looking at this, many questions arose, my first attempt was to create an angular project with the angular cli, which worked, but when I decided to see How to include jsp files instead of html files I did not know how to do it, and I'm coming to you to find out if anyone has done it.
Since I use Spring and actions to send the information to jsp and display it, if someone could help me I would appreciate it.
Angular2 is a single page framework that does not need server side page rendering. Using JPS along with Angular2 does not provide any benefits. You best bet is to use HTML with Angular2 Javascript and make REST calls back to your Spring based server side code.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am creating a simple web application using Spring MVC and Spring Data that will relate to a database.
What are the first steps that I should take when designing/programming this?
Set up database?
Create simple project using maven?
Follow the Quick Start on Spring Boot: http://projects.spring.io/spring-boot/
Spring Boot will let you fire up a Spring MVC application very quickly and easily.
If it were me, I would take this opportunity to use Gradle instead of maven (http://gradle.org/getting-started-gradle-java/).
Once you have the basic MVC setup and tested, then you can move on to setting up the database and Spring Data. You can get more information on how to setup Spring Data for Spring Boot in section 29 here:
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am new bee to spring. I am trying to build an application using JSP and Hibernate with Spring. Is it a good practice to use jsp, servlets and use spring to declare the database connectivity and beans in xml or should i use spring mvc please guide me.
You can use whatever part you need from spring. That is one of the best thing about springframework. If you need to use spring just for data access layer then that is fine use it just for that. If you will use it dependency injection frawework for your project then you can use it that way.
Spring MVC is just a presentation layer part of spring. I have been using springframework for last 12 years and I haven't used SpringMVC until last year. So I recommend you to use what you know best for presentation layer but I also strongly recommend using spring for back-end layer.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We are currently developing an enterprise web application (Java backend + HTML/JS frontend). This application shall provide cloud-based data analysis functionality to a variety of users. Now, we have decided to use AngularJS for creating the web-frontend. The communication to the backend is realized with REST webservices (implemented in java using jersey, and jetty as webserver).
Some time ago, I have already developed simple java web apps using apache wicket just for examplary reasons. Since I am new to AngularJS, I am wondering if there is any reason why it could still be necessary for us to use a java web-framework (such as wicket, gwt, etc.) additionally to Angular JS?
The other way around: since we use Angular for developing the web-frontend, we do not need any web-framework on the java side any more, right?
I am quite new to java web applications, so any help would really be appreciated :-)
Regards
AngularJS has the $http service which should be able to handle all your GET/POST requests that you need to make to your Java backend. The docs for it are here:
https://docs.angularjs.org/api/ng/service/$http
As long your return data is properly formatted JSON or whichever format you want, Javascript should read it just fine. AngularJS should be fine for your project.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I like the way JAX-RS represent URLs.. and find it very easy to be used.
I am thinking of making the JAX-RS works instead of my Servlets, so I can write some JSPs that interact directly with these RESTful resources ...
What do you think?
It's not a decision about your model programming, is a decision about architecture and requirements of your application.
My first experience with JAX-RS was very positive. I used the framework to provide some server side functionality to a desktop app. But I wouldn't see the value of using REST if you are creating a traditional Web app where each client action results in a new Web page getting loaded by the user's browser. If you are building an AJAX app, then I can see how REST might be cleaner to code than Servlet.
What is the nature of the project?
Actually it doesn't matter servlets or even use PHP/HTML front end as you JAX-RS use HTTP request. I would suggest you to use JAX-RS reference implementation for building RESTful Web services call jersey. It provide more goodies ..