What do you think about this project sample? and some questions...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What do you think about this project sample? and some questions...

neonds
Hi every one, I'm new here and newbie on Spring MVC


I want to know what do you think about this project? I'm trying to build sample project for me "like a template" for future projects in the enterprise where I work and I want to know what I missing.

Here's the project poscloud


I have a couple of questions.

   - It's a good idea to use fragments in thymeleaf like I do. See the config area in webapp?
   - It's my project well organized?
   - It's better if I use views with complete templates?
   - What do you recommend for AJAX? Jquery?
   - Using AJAX: It's better if controllers response JSON instead of html fragments?
   - Have Someone a example of well organized project using Thymeleaf with Spring 4 with annotations?


Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: What do you think about this project sample? and some questions...

Zemi
Administrator
Hello,

you posted a lot of questions, let me answer just a couple of them.

> It's a good idea to use fragments in thymeleaf like I do

About the layout, there is a full article on the different options, I think that it's the best source for that discussion
  http://www.thymeleaf.org/doc/articles/layouts.html

> It's my project well organized? 

At first sight, your code looks clean and elegant. I cannot give an opinion on the architecture of the application without knowing the problem that it is trying to solve, different architectures are best suited for different problems.

> What do you recommend for AJAX? Jquery?

JQuery is kind of default choice because it is stable and widely known. So yes, if no other considerations have to be taken into, like size or browser compatibility or team knowledge, jQuery is a good choice.

> Using AJAX: It's better if controllers response JSON instead of html fragments? 

Depends on what you are doing with the response. If it has to be understood by Javascript code, JSON is a simpler choice. If you are just pasting the result into the page markup, HTML is better.

Regards,
   Zemi