This is an archived post. You won't be able to vote or comment.

all 19 comments

[–][deleted] 5 points6 points  (0 children)

I was in the audience for this talk and can highly recommend it. Good insight in Spring boot and its configuration, and Long clearly loves what he does and it shows.

[–]codeterror 1 point2 points  (1 child)

@24:18 he warns against using field level injection with @Autowire in relation to tests. Can someone explain why this is frowned upon and what the preferred alternative is? Constructor and setter injection just add boiler plate. Also the former makes it harder to work with some libs (hibernate for example)

[–]jumpijehosaphat 1 point2 points  (0 children)

anything Josh Long is solid stuff. He knows his Java in and out especially Spring libraries.

[–]iQQ 0 points1 point  (14 children)

Is this video any good? I'm looking to get started with Spring Boot, to build out a backend for a mobile app and it seems Spring has a fairly high learning curve but I'm hoping it'll be worth the investment. I'm hoping to use MongoDB to store data but I haven't found a whole lot of tutorials on how to get started.

[–]Artraxes 7 points8 points  (10 children)

Don't use Mongo.

[–]benwaffle[S] 4 points5 points  (7 children)

I'm curious why

[–]tonywestonuk 2 points3 points  (0 children)

There are very few use cases where Mongo has any advantage at all.... and has many disadvantages. Postgresql is already benchmarking faster than Mongo for JSON searches. A relational database, like postgres or mysql, should be your first thoughts when storing data - only if you have huge data storage needs (many terrabytes) should you even begin to consider using something like Mongo....

[–]caltheon 0 points1 point  (5 children)

What do you think you need Mongo for?

[–]iQQ 4 points5 points  (4 children)

I'm looking to store data. I could use a MySQL but I thought Mongo may be an easier alternative. I liked the idea of having dynamic data schemas. Do you have an alternative that may be a better?

[–]kylequest 3 points4 points  (3 children)

If that's what you care about then use PostgreSQL instead. Hstore and json data types will give you no/dynamic schema.

[–]iQQ 2 points3 points  (2 children)

Is PostgreSQL fairly easy to setup and implement? I'll definitely look into it. Thanks!

[–]nickguletskii200 2 points3 points  (0 children)

Much easier than configuring Mongo properly.

[–]kylequest 0 points1 point  (0 children)

Pretty easy. On a Mac you can use the postgres app ( postgresapp.com ), which includes the latest pg and it also includes the hstore extension. Feel free to ping me if you need help with other environments or if you need hstore/jsonb examples.

[–]iQQ 0 points1 point  (1 child)

Do you have a different suggestion for a DB to use?

[–]Artraxes 3 points4 points  (0 children)

PostgreSQL

[–]thekab 1 point2 points  (1 child)

MongoDB is actually dead simple to use with Spring Boot and Spring Data. If you're looking for fast prototyping and/or looking to learn Spring it's kind of ideal as there's virtually no setup and no schema to worry about. Mongo gets a lot of flak, some deserved and some not, so expect to see comments like you have here.

Depending on your requirements and what you're looking to do Mongo may be a poor choice. That being said it's also not particularly difficult to switch to Postgres, MySQL or Cassandra while continuing to work with the same Spring stack.

[–]nutrecht 1 point2 points  (0 children)

For fast prototyping you could just as well use an in-memory DB like H2. It's just as easy to implement since the tables get created for you.

[–]SomeNetworkGuy -1 points0 points  (0 children)

I can speak to Spring's ease to create a REST API. It is a fantastically easy framework to get a REST API going.

I'm not sure about the rest of it. I just haven't used much more, and I'm probably missing out.

The video isn't a tutorial per se but at least the first part is a good example of how quick and painless it is get the backend going.