Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Low fat backends for mobile guys
Search
Alexandru Simonescu
February 28, 2016
Programming
0
83
Low fat backends for mobile guys
Low fat backends for mobile guys:
Develop simple backends in Java in minutes
Alexandru Simonescu
February 28, 2016
Tweet
Share
More Decks by Alexandru Simonescu
See All by Alexandru Simonescu
Software Architecture Journey
alxsimo
4
700
Serverless mobile applications with Firebase v2
alxsimo
4
240
Serverless mobile applications with Firebase
alxsimo
5
290
!Smelly code - The origins
alxsimo
0
82
Cleaner code with Guava v2
alxsimo
5
500
Cleaner code with Guava
alxsimo
3
140
GIT: what else?
alxsimo
1
98
Other Decks in Programming
See All in Programming
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
180
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
620
Timeline エディター拡張入門
yucchiy
0
450
slow types ってなんだろう?
karad
0
210
Deep Dive into React Stream/Serialize
mugi_uno
4
860
TypeScriptコードの漸進的改善 / Progressive Improvement of TypeScript Code
medley
1
440
Try creating your own orderedmap
kazamori
1
280
Ruby on Fails - effective error handling with Rails conventions
talyssonoc
0
300
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
260
The Cutting Edge Of Versioning (LambdaConf 2024)
chriskrycho
0
250
RubyGems on ruby.wasm
kateinoigakukun
0
120
An adventure of Happy Eyeballs
coe401_
1
220
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
331
56k
The Art of Programming - Codeland 2020
erikaheidi
43
12k
What's in a price? How to price your products and services
michaelherold
238
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Building Your Own Lightsaber
phodgson
100
5.7k
Faster Mobile Websites
deanohume
300
30k
Code Reviewing Like a Champion
maltzj
515
39k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
15
1.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Transcript
Low fat backends For mobile guys
Alexandru Simonescu
[email protected]
@alexsimonescu http://blog.alexsimo.com “Do what you love. Love
what you do.” - Ray Bradbury
do you really need a backend? think twice
mbaas sometimes do the trick
mbaas cons not a golden unicorn _you depend on some
else infrastructure _normally can be cheap, related your needs _no full control, your data is not yours _sometimes hard to scale
and now what?
why not roll your own backend?
we all have a backend dev inside
backend cons or not :-) _custom backend is hard to
develop _can be expensive _i can’t setup infrastructure _i’m just a mobile guy
infrastructure AWS Digital Ocean VPS Dime ~ 5€ month
showtime create required entities, layers and configuration
kickstart 1. set project metadata 2. choose dependencies 3. download
4. import in favorite IDE 5. customize and run https://start.spring.io/
Rest controllers Data access layer Domain entities
hello world controller @Controller @RequestMapping("/status") public class StatusController { @RequestMapping(value
= "/", method = RequestMethod.GET) @ResponseBody public String status() { return "All looks ok from here! :-)"; } }
more complex controller @RestController @RequestMapping(value = "/movie") public class MovieController
{ @Autowired MovieRepository movieRepository; @RequestMapping(value = "/", method = RequestMethod.GET) public List<Movie> all() { return movieRepository.getAll(); } }
persistance entity @Data @Builder @Entity public class Actor { @Id
private Integer id; private String name; }
data access public interface ActorRepository extends JpaRepository<Actor, Integer> { }
rest data access @RepositoryRestResource(collectionResourceRel = "actor", path = "actor") public
interface ActorRepository extends JpaRepository<Actor, Integer> { }
run your backend @SpringBootApplication @Import(SecurityConfiguration.class) public class MoviecloudApplication { public
static void main(String[] args) { SpringApplication.run(MoviecloudApplication.class, args); } }
working project https://github.com/alexsimo/backend-low-fat