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
99
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
840
Serverless mobile applications with Firebase v2
alxsimo
4
250
Serverless mobile applications with Firebase
alxsimo
5
300
!Smelly code - The origins
alxsimo
0
90
Cleaner code with Guava v2
alxsimo
5
520
Cleaner code with Guava
alxsimo
3
140
GIT: what else?
alxsimo
1
110
Other Decks in Programming
See All in Programming
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
0
160
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.5k
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
190
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
120
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
620
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
230
OpenNext + Hono on Cloudflare でイマドキWeb開発スタックを実現する
rokuosan
0
110
PT AI без купюр
v0lka
0
200
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
240
從零到一:搭建你的第一個 Observability 平台
blueswen
0
220
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Balancing Empowerment & Direction
lara
1
89
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Unsuck your backbone
ammeep
671
58k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Adopting Sorbet at Scale
ufuk
76
9.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
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