Skip to content
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

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Vgoncharova/mvc #184

merged 3 commits into from
Jan 15, 2024

Conversation

VGoncharova
Copy link
Contributor

Wishlist application for adding and removing wishes to Wishlist that uses FreeMarker templates and Exposed

Copy link

@github-advanced-security github-advanced-security bot left a 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.

@VGoncharova VGoncharova requested a review from e5l January 8, 2024 12:24
Copy link
Member

@e5l e5l left a 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

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")
Copy link
Member

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"
Copy link
Member

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

@e5l e5l requested a review from vnikolova January 9, 2024 13:40
Copy link
Contributor

@vnikolova vnikolova left a 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 :)

./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.
Copy link
Contributor

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:

import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
import org.jetbrains.exposed.sql.transactions.transaction

object DatabaseFactory {
Copy link
Contributor

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.

@@ -0,0 +1,13 @@
# MVC application for Ktor
Copy link
Contributor

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 {
Copy link
Contributor

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
@VGoncharova VGoncharova requested review from e5l and vnikolova January 11, 2024 11:51
Copy link
Contributor

@vnikolova vnikolova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@VGoncharova VGoncharova merged commit 70741be into main Jan 15, 2024
2 checks passed
@VGoncharova VGoncharova deleted the vgoncharova/mvc branch January 15, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants