https://kotlinlang.org logo
Title
s

Sam

09/03/2019, 4:32 AM
Hello everyone, I have some dump question about Web Application, I’m newbie in Web industry . I have used
Ktor
for building my own API . But I’m so curious about Web Architecture between Java and Ktor. So what different Web Application between building base on `java`(Spring Java EE) and
Kotlin
(Ktor) ??? What is the relationship of Java and Kotlin when developing web? What different ? what the same things? Thanks
g

gildor

09/03/2019, 5:30 AM
Ktor core doesn't use Java EE APIs Also Spring is not a part of Java EE, tho can be compatible and used together Anyway, if you use Ktor and you do not integrate with existing Java ee API or you don't need any integration, just don't worry about it. Ktor is standalone framework
👍 1
Tho Ktor supports deployment as servlet, so can be run on any servlet container. I would just recommend you to read what particular technology provides if you want to be familiar with it, but also you can just use Ktor and follow Ktor documentation
s

Sam

09/03/2019, 6:39 AM
@gildor: thank you so much about it . But
Ktor
must follow the same architecture diagram such as Application Server, Web Server, Web containers. right ?
g

gildor

09/03/2019, 6:41 AM
No
This diagram of Java EE framework
s

Sam

09/03/2019, 6:42 AM
@gildor: Do you have any book’s name or link to read the whole picture about Ktor Architecuture diagram which look like above picture Java EE.?
g

gildor

09/03/2019, 6:43 AM
Ktor can be run as a servlet on this diagram
Why do you need this? Just curious
There is Ktor documentation that covers features and request/response flow
s

Sam

09/03/2019, 6:44 AM
I want to study Web development and choose the Ktor for my feature. So I need to have a knowledge about web architecture and Ktor Architecture.
g

gildor

09/03/2019, 6:45 AM
I mean web architecture != java ee
Java ee just set of libraries and standards
s

Sam

09/03/2019, 6:45 AM
Do you have any idea to go through this knowledge ? or roadmap to Ktor developer/ Web developer ?
Sure, I know Java EE != web architecture.
g

gildor

09/03/2019, 6:46 AM
What kind knowledge? If you gonna learn Java EE, than read Java EE docs/tutorials, it will not help you with Ktor, it's just particular technologies stack
If you need general knowledge about server development or web services architecture there is a lot of material in Google, but it also not directly related to Ktor, it's just one more framework go build web services
s

Sam

09/03/2019, 6:50 AM
ohm, ok ., I got it
What kind knowledge?
the knowledge relevant to how Engine and Server work together, or general knowledge for Backend.
woww, thanks @gildor, really appreciated your explanation.
g

gildor

09/03/2019, 6:52 AM
Engine?
s

Sam

09/03/2019, 6:53 AM
this httpClient engine
g

gildor

09/03/2019, 6:55 AM
Http client is not a server, it's http client
Like any other http client library, just an API to simplify http requests
❤️ 2
s

Sam

09/03/2019, 6:57 AM
And these things is an environments to run Application Standalone ,right?
g

gildor

09/03/2019, 6:58 AM
Actually it's covered very well 8n official documentation https://ktor.io/clients/http-client/engines.html
s

Sam

09/03/2019, 6:59 AM
Thanks @gildor
I’m reading it
g

gildor

09/03/2019, 7:01 AM
run application standalone
Yes for Netty/Jetty/CIO, not for tomcat, where you run Ktor as war container
s

Sam

09/03/2019, 7:14 AM
This can be used standalone, and does not need a running Tomcat server
Ref : https://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html => You mean we shouldn’t use tomcat for Application Standalone, because you must include
Tomcat
in package ( (war/jar) right?
g

gildor

09/03/2019, 2:35 PM
Not sure that cited phrase related to Ktor war packaging, it looks that it related on providing tomcat dependencies as part of war
s

Sam

09/03/2019, 5:42 PM
thanks @gildor. You know, I’m newbie so I’m have some confuses about We can not run application standalone with Tomcat. Can you explain more about that?
n

napperley

09/03/2019, 9:58 PM
henry - Do you really need to use a servlet container? Would recommend going with a web server like Netty ( https://ktor.io/servers/configuration.html#netty ), or Jetty ( https://ktor.io/servers/configuration.html#jetty ) with Ktor.
1
g

gildor

09/03/2019, 11:22 PM
Or even CIO engine
👍 1