• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

I'm here sitting at my desk and for past 3 hours, I can't decide: Spring MVC or Boot?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently started working at a place and they are handling there Java back-end in old 'servlet' style and java scriplet all over the JSP page.

I told one of the person I report to I can do this in Spring MVC as the current product is extremely hacky. He sounded enthusiastic and told me it would be a really good thing to do.

Now, for past three hours, I just can't decide what to use, Spring MVC or Spring Boot? The only reason I want to use Spring MVC is because I'm a bit more familiar with it and I feel by coding more on it, I know what's going on even with the boiler code it comes with. The only thing which is stopping me from using Spring MVC is `@RestController` is giving me huge problems. Because of it, I'm procrastinating and not moving onwards. If I go with Spring Boot, I'm going in for a nose dive because I feel it's wayy too abstract.

Now thinking back, I should go with Spring Boot even if I'm not familiar with it. But I honestly really want it to be done in Spring MVC.  There is so much more code involved in that which would make easy to debug, I think.

This is my first time working at a company if that helps. My job is to build an API for a product.
 
Saloon Keeper
Posts: 10310
217
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend you go with MVC. You are more familiar with it, and this is your time to shine. Get more familiar with Boot when working on a hobby project.

What problem is @RestController giving you?
 
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second @Stephan Van Hulst response. If time frame is not in your favor, I suggest you go with what you feel most comfortable with. However, In my opinion I suggest you do a Proof Of Concept on both and see which works  best for the company as far as performance, value, security et cetera goes. I've had to do something similar in my company and the POC did go a long way to helping me come up with a better technology that best fits the business values of the company.
 
Abdu samed
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I recommend you go with MVC. You are more familiar with it, and this is your time to shine. Get more familiar with Boot when working on a hobby project.

What problem is @RestController giving you?



Thanks. I went with Spring MVC and just managed to get bare bone version of it running. @RestController was leading an issue to the servlet-context file. Initially, it took me forever why the import of restController wasn't working eventhough I had a library of it imported. Turns out, I had to tweak the version of it which is used in Maven. I'm working with Maven the first time too which was was another battle to figure out how the file works. But, now I know and know what's going on. The last issue was Java Compiler wasn't set to 1.8 and instead was a 1.6. That also took me a long time to crack.

Now, finally, I can build the thing I'm suppose to with a solid foundation and using a framework I'm happy with, using the annotation which I was introduced by doing Spring Boot tutorial in Spring MVC 4.
 
Abdu samed
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I just realized the sub form is for Swing, not Spring.
 
Bartender
Posts: 20849
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
¿Por que no los dos? as the saying goes these days. I wouldn't think that Spring Boot and Spring MVC were mutually exclusive.

Unless I misunderstand, Spring Boot is for making self-launching webapp servers with pre-deployed web applictions, but Spring MVC is simply one of many web application frameworks.

In other words, I would expect the be able to write a webapp using JSF, Struts, Spring MVC, etc/ and package it up with Spring Boot.
 
Abdu samed
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:¿Por que no los dos? as the saying goes these days. I wouldn't think that Spring Boot and Spring MVC were mutually exclusive.

Unless I misunderstand, Spring Boot is for making self-launching webapp servers with pre-deployed web applictions, but Spring MVC is simply one of many web application frameworks.

In other words, I would expect the be able to write a webapp using JSF, Struts, Spring MVC, etc/ and package it up with Spring Boot.



Yes, you are correct. Through the Spring Boot Wizard, you are able to select the 'web app' out of many options it has. Web app is itself, Spring MVC.
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Spring MVC is 'dance' then Spring Boot is the 'dance floor' where Spring-MVC will dance.
Spring MVC has its own dance floor by the way, but Spring Boot is an amazing evolution I believe, it has simplified many things, you will realise as you begin.
 
Master Rancher
Posts: 451
6
IntelliJ IDE Spring Fedora
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there a big misunderstanding in that if you use spring boot, you can't use spring mvc.  All spring boot does is help with configuration.. that's it.  The real question is do you want to do all of the configuration yourself or have the basic stuff setup for you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!