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
110
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
870
Serverless mobile applications with Firebase v2
alxsimo
4
260
Serverless mobile applications with Firebase
alxsimo
5
310
!Smelly code - The origins
alxsimo
0
95
Cleaner code with Guava v2
alxsimo
5
530
Cleaner code with Guava
alxsimo
3
150
GIT: what else?
alxsimo
1
120
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.2k
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
250
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
460
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
190
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
660
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
200
ゆくKotlin くるRust
exoego
1
210
Architectural Extensions
denyspoltorak
0
220
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
540
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.7k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
150
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
340
Featured
See All Featured
Between Models and Reality
mayunak
1
170
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
The SEO identity crisis: Don't let AI make you average
varn
0
55
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
79
The untapped power of vector embeddings
frankvandijk
1
1.5k
HDC tutorial
michielstock
1
330
How to Think Like a Performance Engineer
csswizardry
28
2.4k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Making Projects Easy
brettharned
120
6.6k
How to Talk to Developers About Accessibility
jct
1
110
Product Roadmaps are Hard
iamctodd
PRO
55
12k
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