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'm learnig Spring framework. I want ask about configuration style.
If XML configuration is not deprecated. When better option is using annotation config and xml config?
I read for bigger beans better is xml, but it was five years ago.
XML configuration is still officially supported by Spring. However, in practice, you can see it here and there, but in general its considered outdated by the community (ok this can be an arguable statement, so I'll state that its solely my opinion to be "on the safe side").
One example where XML configuration is still in use is large old projects (usually enterprises) that were started long time ago in the XML configuration era.
In a nutshell, for the learning purposes annotation based configurations is the way to go.
The good news are that spring is way more than the configuration, so if you'll understand how it works and what can be done with this framework, you'll be able to quickly switch from XML based configurations to Java config or annotations and the other way around
Related
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 2 years ago.
Improve this question
We have a pretty large codebase developed on Spring Boot and over the course of time, we have kept adding starters as required. I am going through a bit of housekeeping and have noticed that there are quite a bit of overlap in the dependencies provided by the starters. For eg. for creating a REST API, we started out with the spring-boot-starter-web and later added spring-boot-starter-data-rest. But I just noticed that spring-boot-starter-web is a direct dependency of spring-boot-starter-data-rest.
Now I know that as a best practice, if my code is using a library directly, that library should always be a direct dependency instead of relying on another library depending on it. But Spring Boot starters are just a BOM so I am wondering if there is a better practice here.
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
What is the best solution to configure rdf/owl database for spring web mvc applications?
I am searching a solution to orm for owl in spring application.
Have you looked into Stardog? I'm not sure what your exact goal is with the database, but this is what I use for creating/accessing/querying/etc. triple stores programmatically. They have an API called SNARL - here is a good example of how to use it with Java. They actually have a section in their docs for Spring Programming and use some different beans. I use a combination of the spring programming (for querying) and the method in the first link (for setting up dbs and loading files).
Downside is OWL/XML and Owl Functional Syntax are not supported file formats, but you can just convert your file to RDF/XML (esp. easy if you're using Protege). If you're not using Protege, there are other ways to do it.
If you have any further questions I'm happy to help out.
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
A Java developer (with lots of experience in sophisticated, high-performance environments) very recently commented that "composition is not used much anymore." I was surprised by this comment. Is this true?
On the one hand, other answers on this forum indicate that difference between composition and aggregation can be ambiguous (can the whole exist without the part; does the part exist throughout the life of the containing object?). But perhaps in all of these cases the question stands--how to add behavior to an existing class or class hierarchy.
The context of his comment was a discussion of possible alternatives to inheritance. If this developer is correct, what has replaced composition in working practice? Mix-ins through added interfaces?
Any perspectives are welcome!
If anything, it's probably used now more than ever thanks to dependency injection frameworks like Spring. The model that all of the Java developers I know use is to build classes that relate to one another in functionality more by interface and purpose and to use Spring to inject them according to a particular configuration (ex the ability to replace entire security frameworks just by changing a spring configuration file and adding a few new JAR files).
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 9 years ago.
Improve this question
I'm trying to implement modularity system (J2EE) to allow changes of the type modules/plugins/add ons.
I want to know how to start, what approach I should follow.
Are there any new design patterns for this type of system ?
or do I need a new technology (message bus, osgi) ?
Thanks in advance
Mhadjis
Spring would be a good starting point. Spring context files let you specify most of the architecture in XML and the replace them later. This makes for a very modular architecture. Now in terms of being able to write "plugins" like where a user can provide a jar file and it hooks into the app dynamically that is something you'd have to roll yourself. However, Spring could help you there again by providing a lot of tools for abstracting out the configuration of plugins and loading them (loading them as Spring contexts).
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 recently followed some spring related tutorials and I get the feeling that I will forget the concepts learnt so far quickly, since projects I am engaged in at the moment, do not use spring.
I would love to consolidate the things I have learnt and stay in touch with spring. My question is what kind of a project should I start in order cover most of the concepts that I learnt in spring?
Thanks.
Think of a Project for yourself. A photo sharing app for example. This is how I do it. I think of a project for myself and code it in my free time - thus stay in touch with Spring for example.
btw, my last project using spring has now over 100 registered users, which I did not expect and they all demand other functionality - this way you have to improve also.
I might suggest openshift as your deploy environment - it's free with plugins for eclipse.
You might also ask/answer spring related questions here on SO - this is always helpful of course.
Think about some examples and try to resolve with spring, Write blogs about spring, contribute some open source projects that use spring. This is the way that I learn spring and still doing. :)