-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vgoncharova/mvc #184
Vgoncharova/mvc #184
Conversation
… that uses FreeMarker templates and Exposed
… that uses FreeMarker templates and Exposed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @VGoncharova, good job!
Could you please address the comments?
@vnikolova, please also take a look
mvc-web/build.gradle.kts
Outdated
implementation("org.jetbrains.exposed:exposed-core:$exposed_version") | ||
implementation("org.jetbrains.exposed:exposed-dao:$exposed_version") | ||
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version") | ||
implementation("com.h2database:h2:2.1.214") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please extract the version in the properties file?
|
||
object DatabaseFactory { | ||
fun init() { | ||
val driverClassName = "org.h2.Driver" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the DB configuration keys to the application.yaml
or application.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice example! Just a few details that need updating :)
mvc-web/README.md
Outdated
./gradlew run | ||
``` | ||
|
||
Then, navigate to [http://localhost:8080/](http://localhost:8080/) to see the sample home page.localhost:8080/](http://localhost:8080/) in a browser to create, edit, and delete articles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing at http://localhost:8080/. This line should say:
"Then, navigate to the following pages:
- http://localhost:8080/wish/list to view and modify the wishlist.
- http://localhost:8080/wish/topwishes to see the top three wishes in the list."
import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction | ||
import org.jetbrains.exposed.sql.transactions.transaction | ||
|
||
object DatabaseFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other examples, we renamed "DatabaseFactory" to "DatabaseSingleton". I think we should keep the names consistent.
mvc-web/README.md
Outdated
@@ -0,0 +1,13 @@ | |||
# MVC application for Ktor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"MVC application with Ktor Server"
application { | ||
configureRouting() | ||
} | ||
client.get("/").apply { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test would fail. Can we either remove it or add another valid test?
…to the application.yaml , changed routes and project description at README.md , DatabaseFactory renamed to DatabaseSingleton for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Wishlist application for adding and removing wishes to Wishlist that uses FreeMarker templates and Exposed