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
750
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
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
580
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
350
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
400
役立つログに取り組もう
irof
27
8.7k
CSC509 Lecture 08
javiergs
PRO
0
110
Identifying User Idenity
moro
6
7.9k
CSC305 Lecture 13
javiergs
PRO
0
130
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
370
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Building Applications with DynamoDB
mza
90
6.1k
BBQ
matthewcrist
85
9.3k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Building Your Own Lightsaber
phodgson
102
6.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Six Lessons from altMBA
skipperchong
26
3.5k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
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