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
94
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
760
Serverless mobile applications with Firebase v2
alxsimo
4
250
Serverless mobile applications with Firebase
alxsimo
5
300
!Smelly code - The origins
alxsimo
0
87
Cleaner code with Guava v2
alxsimo
5
510
Cleaner code with Guava
alxsimo
3
140
GIT: what else?
alxsimo
1
100
Other Decks in Programming
See All in Programming
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
Better Code Design in PHP
afilina
PRO
0
130
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
subpath importsで始めるモック生活
10tera
0
320
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
A Tale of Four Properties
chriscoyier
156
23k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
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