Apr 07 2019

Is Spring still relevant?

Category: TechnicalIuliana @ 13:39

This Friday I’ve had a debate at the company with a colleague of mine which is known to be a straight up genius about the topic in the title. Obviously, I was arguing that Spring is still relevant, and my colleagues was arguing that it is not. How did I end up in this position? Well, since I’ve written so many books about Spring, why not? I’ve written books about how it can be used, explained its under-the-hood internals to others, I could talk to others about it, right? Well, turns out… not really. I am really bad at debates with geniuses, that happened to study computer science. Because I’m an engineer, I’m practical, I get down in the dirt to make sense of things and fix them up. I build things from scratch, and although I do overthink and design things, my overall direction is practicality. And this is what being relevant is for me. Can it make my work easier, faster, stable and can in the end produce revenue? Then it is relevant. So yeah, for me being needed and being useful means being relevant.

For him, being relevant, means change, means driving the domains toward innovation.

And because, our definition of relevant was different, the debate was a cluster-fuck. Funny as hell, but a cluster-fuck nonetheless.

Here is my take on this.

Continue reading “Is Spring still relevant?”

Tags: ,


Oct 15 2017

Spring Stereotype Annotations

Category: TechnicalIuliana @ 21:18

Having finished writing my third  Spring book, it was about time I should start writing technical posts as well. Being an accessible online person, quite a few people that read my books find mistakes or have interesting questions. I am really happy when people find mistakes, this means that they are actually reading the books, taking them seriously, including reading the references to the official documentation, which is more on point and more detailed than a book written by an “external” will ever be.

And I am happier when questions that question my own understanding of the framework are risen as well. Because this motivates me to dig deep into the documentation, to ask other technical people I know what their opinion is. It is an opportunity for communication and debate.

The last question I had from a reader was about the @Configuration annotation. He asked why is this annotation not mentioned as being a stereotype annotation in the book and if this is not a mistake on my part. He gave me some links to some official documentation and his opinion about the matter. After I queried  multiple resources, including my technical reviewer, who is a Spring  trainer for Pivotal this is the answer I came up with.
Continue reading “Spring Stereotype Annotations”

Tags: ,


Sep 05 2017

I love writing technical books…

Category: TechnicalIuliana @ 23:23

… and messages like the ones below make all the effort worth it.

Tags: ,


Mar 10 2016

Awesome Feedback for my technical book

Category: TechnicalIuliana @ 1:34

In case you do not know I wrote a technical book, about Spring Web. From time to time, I receive emails from people reading my book and working with the code, but the email received tonight made my day:

What attracted me to your Pivotal Certified Spring Web Application Developer Exam Guide is the fact that you used Java configuration for the Spring Web Flow, and to the best of my knowledge, that is the only book in the market that currently used Java Config for Spring Web Flow. As I look further into the book I see how you encouraged the use of current and most prevalent tools for development. I love your approach, it is very upwards looking, and has the tendency of yielding a great and lasting result.
(That’s what Tim said)

So yeah, I’m a pioneer in using Java Config for Spring Web Flow. Ta da! So in case you had doubts about buying my book, I hope there are less of them now.

Stay safe, stay happy!

Tags: ,


Nov 08 2012

Learning Spring, part VI

Category: TechnicalIuliana @ 15:44

This won’t be a post  about a problem or a question, but about an observation.

When I took the spring Core course in Belgrade this June, in the Chapter about data access the jdbcTemplate instance was created like this:
Java code:

//random DAO class
private JdbcTemplate jdbcTemplate;
@Autowired
public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
}

Xml configuration:

<bean id="dataSource" class="..." />

After that I read Spring in Action, then the Spring reference and everywhere when given an example on how to use jdbcTemplate, the instance was created and injected like that.

And I am confused. If jdbcTemplate instance is thread-safe once configured, is recommended to not create one for each use and is stateless (does not maintain any conversational state) why don’t we just create it as a singleton bean and use it as such?
Sample of my code:

//random DAO class
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("jdbcTemplate")
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
    this.jdbcTemplate = jdbcTemplate;
}

Xml configuration:

<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
   <constructor-arg ref="dataSource" />
</bean>

Tags: ,


Nov 06 2012

Learning Spring, part V

Category: TechnicalIuliana @ 10:37

<ref local=””/> vs. <ref bean=””/>

So here is the conclusion of this post, which was debated with my friend MARIANUL also.

The only difference between the two is syntax and  behaviour at application design time, when each of them helps you , the developer, in its own way, to figure out if the references are valid or not. At run time, there is no difference: all beans are created and reside in the same application context so the references are correctly solved.

So yeah, this is it. Simple as that. So ignore all the blog posts where you are told that code does not compile because of XML parser errors and if you doubt my findings too, dare to test and draw your own conclusions. This is what I did. :)

Tags: , , ,


Nov 05 2012

Learning Spring, part IV

Category: TechnicalIuliana @ 13:05

<ref local=””/> vs. <ref bean=””/>

So, when should we use one or the other and why?

First, I’ll offer you a link to the official Spring reference documentation related to this subject.  Basically:

Specifying the target bean through the bean attribute of the tag is the most general form, and allows creation of a reference to any bean in the same container or parent container, regardless of whether it is in the same XML file. The value of the bean attribute may be the same as the id attribute of the target bean, or as one of the values in the name attribute of the target bean.

And:

Specifying the target bean through the local attribute leverages the ability of the XML parser to validate XML id references within the same file. The value of the local attribute must be the same as the id attribute of the target bean. The XML parser issues an error if no matching element is found in the same file. As such, using the local variant is the best choice (in order to know about errors as early as possible) if the target bean is in the same XML file.

Then we will play with some source code.
Continue reading “Learning Spring, part IV”

Tags: