Where are spring tutorials without spring-boot? [closed] - spring

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
All the tutorials on spring.io are now all spring-boot centric. I'm not interested in converting existing projects to boot, and am not particularly interested in using boot for new projects, the "Takes an opinionated view of building Spring applications..." project statement isn't particularly encouraging.
Given this, I'm wondering where all the tutorials are for using spring without boot. Sure, the docs are great but those old tutorials were great.

Hopefully, with Google help, it is easy to find the excellent tutorials from mkyong. The reference manual (ok, not a tutorial) contains also a good deal of examples.
But you are right, it is easy to find javadoc and reference manuals for older Spring versions, but I could not find any tutorial on spring.io without spring-boot.
Edit (per m4rtin's comment) :
For a true beginner that would want to avoid spring-boot (want to deploy to a real container for example), they can be used alone. They can be used also as a way to skip the spring-boot part along with a more up to date tutorial from spring.io. I mean : spring-boot is just a way to automagically build a skeletal application including application contextes, and it is used for that in recent tutorials. But you can always create the skeletal application without spring-boot (with the use of the older mkyong tutorials) and then add the other components to follow a newer tutorial. Of course, it is a more advanced use, but it is the way I did for recently try some parts of Spring (other than the basic framework) because I am used to my old own tomcat and do not really like boot.
Of course if you only want to try something that you will throw away as soon as completed, the right way is probably to fully follow the new tutorials and use boot.

One can never please everyone.
When adding plain Spring samples people will start asking question why DataSources don't work or their activemq setup doesn't work (people usually don't takes days to figure it out, if it doesn't work < 5m a guide/project/sample is crap even if the error is their own).
The same for XML and JavaConfig for years the argument was that Spring == XML Hell (just take a look at their samples was often overheard/-read) now that is Java based config (a road that even Java EE is taking) it isn't ok either.
The Spring Boot guides allow you to focus on the core content at hand, instead of all the necessities/complexities around them. Nonetheless I do agree that some basic plain Spring Framework guides should exist. You might wan to comment on this issue

Related

Automate generation of API documentation in Spring Boot [closed]

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 1 year ago.
Improve this question
I want to automate the generation of the API documentation in a spring-boot project, for which I see two options:
springdoc-openapi: works by examining an application at runtime to infer API semantics based on spring configurations, class structure and various annotations
OpenAPI Generator: generates code from an OpenAPI specification - at least the models and interfaces that will be implemented by the REST controllers
What I don't like about springdoc-openapi is that it pollutes the code with a bunch of annotations to describe the API.
On the other hand, I don't feel quite comfortable with OpenAPI Generator generating the models as a special requirement could come up where I'd have to customize the models in such a way that I wouldn't have control to do it.
I know there is not such thing as a best approach, but I'd like to know what other people think works best for them.
This is borderline opinion-based, but this is my take on this. I always use springdoc and rely on the generated documentation based on the annotations. The main reason is that it is easier to maintain the documentation if it is side by side with the code itself. If you change the code then it is easier not to forget to change the documentation. If you are worried about polluting the code, you could use an interface where you would add all the needed annotations, but then you would increase the possibility of forgetting to update the documentation.
The other approach I don't really like is because I prefer to have the code "generating" the documentation and not the other way around. To me, code is king and as such, it should lead the way.

JSF with Hibernate without Spring - is it the right choice? [closed]

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
I am going to develop a new web application of medium complexity. Right now I am somewhat comfortable with JSF and hibernate, but I have never used JSF and hibernate together before.
I just wanted to ask if it is good practice to use JSF (for both the view layer and handling business logic) and hibernate (for persistence) without Spring as a middle layer.
The reason why I am asking this is I don't know anything about the Spring framework and my customer wants development of the application to start as early as possible.
There are many ways to use Hibernate. Using JSF together with CDI beans, EJB and accessing the database via JPA (in other words doing things the Java EE 7 way) just works. I've worked with both EclipseLink + JSF & Hibernate + JSF and they're basically the same.
Hibernate can sometimes cause troubles with Lazy Initiliazation, where EclipseLink works just fine. This actually happened to me. But this issue has been already fixed from certain version, you only need to add a single property in persistence.xml.
I used EclipseLink on Glassfish and right now I am shortly using Hibernate with WildFly.
I don't think its a good idea to use only JSF and Hibernate. Spring at least gives some help towards persistence and other things you might need.
There are a lot of boilerplate have to write. This has become better with the later versions of JSF though.
But if you don't want to use Spring, take a look at Delta Spike which will provide some glue and more which makes integration a lot easier.

What is mean by a lightweight framework? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
What is a lightweight framework? Why it is saying that codeigniter is lightweight?
Here is a post i found on coderanch.com :
The term "lightweight" refers to the conceptual weight of a framework.
Lightweight frameworks like Spring have minimal impact to an
application. That is, it does not require as many code changes to
incorporate them into your application as does the more heavyweight
frameworks like EJB. When you create an EJB, you have to deal with
several interfaces and it is pretty clear by looking at the code that
an EJB is tightly coupled to the J2EE framework. On the other hand, a
POJO is usually blissfully unaware that it is being used in the Spring
Framework. Spring is minimally-invasive. There are also claims that it
should not be a very difficult task to take Spring out and replace it
with another similar framework.
With lightweight frameworks, you do not have to think too much about
the underlying framework because there really isn't much code to write
that explicitly ties you in with the "plumbing". On the other hand,
traditional J2EE development with EJB entails writing a lot of
"plumbing" code which weighs you down conceptually.
Hope it helps.

Spring vs Java EE 7 [closed]

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
Now I am reading "Begining Java EE 7". And I was wondered that Java EE 7 is a good stack of technologies, it includes CDI, bean validation, JSF for web tier and other specifications.
So I got a question:
Why should I study Spring framework if Java EE 7 exists and covers all capabilities which Spring implements?
I will share little bit of what I know about using Spring. You are right by saying that Java EE 7 has all the technologies to help solve the problems.
Well Spring just enhances these capabilities and makes life more easier for a developer.
As an example when you use Spring MVC framework you can use Spring UI tags to create your JSP and those tags in turn can help you map the values directly to your controller. By controller I mean the Java class which is invoked when you do form submit. It also helps you to validate the form data.
This can be achieved using the Servlet technology also but Spring lets you focus on business logic and it takes care of these.
In my experience as a developer its good to know and understand Java EE 7 but frameworks like Spring utilize some of the best practices and patterns to make life easier for developers.
Would like to hear the opinions from others as well.
Hope this helps.
I think that one simply should know both of them. Spring has a huge community and is used widely, but Java EE is now going forward too, using many technologies that are in Spring in its latest versions.
However, it is incorrect to say that Java EE covers all the fields that Spring does. In my opinion Spring still has something that could make the difference, if you work in particular domains, such as mobile (Spring mobile), social (Spring social), navigation flows management (Spring Webflow) and others.

Spring or CDI or EJB3 [closed]

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 3 years ago.
Improve this question
I am pretty new to the concept of dependency injection and we are currently writing an web app using JSF and maybe Primefaces. We are currently evaluating whether to use Spring or EJB3. I was realy close to choose Spring, but then I heard about CDI. Can you give us some hints, which could be the best for the following situation:
We are currently pretty new to the J2EE world and don't know if we will use Glassfish or JBoss (or can simply stick to Tomcat).
The web app is basically a prototype for an enterprise CRUD application that needs to be able to handle complex business logic. We want to focus on "adaptability", as some requirements are not clear and will be decided about a year later (when we know if we can still use the prototype).
We can't use Hibernate, as we will have to write pretty complex SQL Statements. Currently we made good experiences with the SQL abstraction in Spring.
Maybee I am currently comparing apples and oranges, but there are just too many information's, if you are new to j2ee. I think that EJB's are the standard defined through JCP, Spring is the standard defined by the market and CDI is a standard that is also defined by the JCP to do what Spring can do. But I am most certainly wrong ;-).
Thx,
iuiz
Lincoln Baxter does an excellent job explaining the technical differences in this article: http://ocpsoft.com/java/spring-to-java-ee-a-migration-guide-cdi-jsf-jpa-jta-ejb/ Long story short: both Spring and CDI will both be able to provide dependency injection. One is a Java EE standard, the other a commonly known technology. Glassfish and JBoss both run Spring apps and CDI apps without problem. As far as not being able to use Hibernate, it's not the case that you cannot use native SQL within Hibernate. Save your team a lot of extra dead-simple CRUD code if you can.

Resources