Похожие чаты

Why I don't see people these days learning java servlets

and JSPs ?

7 ответов

17 просмотров

Because servlets are very low-level, and too basic for building applications. JSP is pretty old technology, which has better successors. And many frameworks are built on top of servlets (thought not JSP). Including spring boot, though you can switch it from servlets to non-servlet netty if I remember correctly. In other words, it's like comparing hand saw (servlets) and woodcutting vehicle (spring boot). In the end, vehicle uses same "metal teeth" to cut the wood, but includes much more

Dmytro Buryak
Because servlets are very low-level, and too basic...

So dude i need to learn spring then jump into springBoot right?

"very fast" is quite debatable)) but that's not very important in the end. To add to your description: from a learning standpoint, spring boot is spring that "just works", with pre-configurarions and an ecosystem of modules that are easily pluggable. And is runnable with zero effort with single command. In other words, spring boot = spring + auto-configuration + auto-integration. That's from practical standpoint. You'll simply get much faster from "let's create project" stage to "here's my first code is running" with spring boot.

Dmytro Buryak
"very fast" is quite debatable)) but that's not ve...

hi, did u custom anything in Spring boot, my boss said we should use Vertx to easily customize it

Yep, I did. Both are very customizable. The key difference in regards to customization is that spring has DI but vertx does not. Spring usually just works out of the box with minimal configuration, because spring boot libs also contain code that performs configuration, and that code is auto-discoverable. While vertx needs you to create way more initialization and configuration explicit code, lots of glue. Vertx is much more low level, you need to do more with it to get same results. Imho, customization is not that important when you're picking the framework. Personally, I believe in opposite actually: the less hassle you need to run things, the better is the framework. Spring boot is much better in this regard. Important differences of vertx: disadvantages: - no DI in the framework, all the dependency injection needs to be done manually; this wastes time, and often people may do it differently and even in wrong way, more place for mistakes and bugs - parallelism model (async single-threaded, same as nodejs) is unusual for java developers, it takes quite some time to wrap your head around it - most of popular libraries are incompatible with vertx because of that unusual parallelism model; historically java was always "thread-per-request" world, frameworks tend to use threads for parallelization; and this impacted the way how lots of now mature java technologies were designed - most are blocking, and even futures included in sdk have that blocking ".get()" method from the very initial design, which is incompatible with vertx; example - hibernate is not compatible, even jdbc is not compatible, servlets - are not compatible, thus any classic mechanisms that rely on sessions in servlets (i.e. in "thread-per-request") won't work (particularly, spring security), sdk api for reading/writing files (working with file system) - not compatible, classic database clients - not compatible, you need to search for reactive/async database clients, and so on. - no alternatives for spring-data - all the db code needs to be written from scratch advantages: - it's very fast, probably one of the fastest java frameworks; async single-threaded parallelism is probably the most performant model possible - doesn't have bottlenecks that servlet based (i.e. "thread-per-request") frameworks have, - it degrades gracefully under load, has more predictable response times - very minimal memory requirements, and no extra startup time, i.e. lower costs of running it in prod especially for really small microservices, especially IO bound ones - encourages "actors model", which is virtually infinitely parallelizable, very friendly to auto-scaling by design

Dmytro Buryak
Yep, I did. Both are very customizable. The key di...

But I think Spring boot also use Multithread, but not async

Похожие вопросы

Обсуждают сегодня

коллеги привет. уже второй день бьемся об заклад с одной ошибкой, может вы сталкивались с таки странным поведением? есть тестовый сервер, на который паблишим релизную версию W...
Magzhan
11
Комрады, посоветуйте, куда копать? Стал прикручивать кастомизацию тем. В OnShow главной главной формы пытаюсь загрузить из файла настроек и применить тему (на скрине, как долж...
Ed Doc
13
Какие дистрибутивы Linux чаще всего работают в качестве серверов и почему?
Alex
27
OnShow один раз вызывается? или возможен Hide?
Iluha Companets
14
Такс, блин, таки кто-то знает, каким образом работают макросы stdin/stdout/stderr? Я влез в stdio.h, там определения нет, отладил через асмокод - вызывается функция со странны...
The Bird of Hermes
18
А кто-то пробовал, уезжая из Эстонии получить э-рез и продолжить вести предпринимательскую деятельность внутри Эстонии, используя свой OÜ?
Lalalashechki Lalala
62
Ребят, привет! Я портируюсь с войда на генту Читаю гентувики В разделе про разбивку диска указана xfs файловая система, а не ext4, как обычно Xfs имеет какие-то преимущества ...
Андрей Дыбов
21
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Lol is just wrote a long text about tokenomics etc and it was directly deleted, no curses or similar so i write it again in shorter. Hey Ben 600m eco system tokens, around 30...
. Duss
6
Is Kadena onto something special? No one really knows. Good luck!
Bright Uncle Stephen EqualBet
40
Карта сайта