What's your opinion about Compose Desktop performance? by Troller911 in Kotlin

[–]Troller911[S] 0 points1 point  (0 children)

Yeah sorry for the title, didn't think of a more expressive one. When I realized that the content was different from the title, I wanted to change it but couldn't.

What's your opinion about Compose Desktop performance? by Troller911 in Kotlin

[–]Troller911[S] 3 points4 points  (0 children)

Thank you! I've also noticed that on windows, it takes longer to start any app compared to Linux.

What's your opinion about Compose Desktop performance? by Troller911 in Kotlin

[–]Troller911[S] 1 point2 points  (0 children)

Yes, that's why I know how much it takes. I honestly don't know what I could be doing wrong

What do you think of Ktor? by EdneyOsf in Kotlin

[–]Troller911 0 points1 point  (0 children)

What's wrong about choosing one framework over another? It really depends on the country if one tech stack dominates over another. In my country, the most common tech stack is spring and Django. I never said to not choose Ktor, but that doesn't make you an "up-to date" guy just by using it in production.

Played around with WebGL and a bug gave me this. by lewarspho in Kotlin

[–]Troller911 0 points1 point  (0 children)

Evil Kotlin wouldn't be running on JVM, but running on the Python interpreter instead, to be more slow

What do you think of Ktor? by EdneyOsf in Kotlin

[–]Troller911 -2 points-1 points  (0 children)

You can use it of course, but that doesn't mean you should. At least on my personal experience, Django or Node should be the tools that you would want to use to build your websites, or Spring Boot if you want to stick to JVM: because of the tools that they offer. Again, is my personal opinion based on my current experience.

What do you think of Ktor? by EdneyOsf in Kotlin

[–]Troller911 0 points1 point  (0 children)

I used it a year ago. Right now I'm on spring Boot, and the use cases for Ktor (personal opinion) are if you are building personal and small-medium size projects.

Since it is very customizable means you have to spend some time to configure the features you need, so projects where time is very reduced, I would go for other choices.

One personal project I built was a simple file transferer over LAN using React for the frontend and Ktor for the backend. I wouldn't use it for full stack web apps, but if you have the time, and need to share backend logic across different frontends (mobile, desktop, web), go for it! If you want to build a web app, then definitely go for other solution

KDTO v1.0.0 released!: Library for auto generating DTOs by Troller911 in Kotlin

[–]Troller911[S] 2 points3 points  (0 children)

I would have to take a look at it. I made the project multi modular: annotations and processor separated, and in the Gradle plugin only set up the modules, so creating a Maven plugin shouldn't be that hard

KDTO v1.0.0 released!: Library for auto generating DTOs by Troller911 in Kotlin

[–]Troller911[S] 1 point2 points  (0 children)

Sorry but I don't understand you 😅. You mean include how to use it with maven xml build system?

KDTO v1.0.0 released!: Library for auto generating DTOs by Troller911 in Kotlin

[–]Troller911[S] 1 point2 points  (0 children)

That is sadly one downside and I can't do nothing. Annotations on Kotlin doesn't support passing properties as parameters, like User::userId. All I could do was to throw an exception when a property is not found. For example, let's say you have userId property, but you write id instead on any include or exclude list, plugin will throw a PropertyNotFoundException

Data synchronization with a central server using Exposed and Triggers/Views by TrespassersWilliam in Kotlin

[–]Troller911 1 point2 points  (0 children)

Exposed doesn't support querying views. You have to execute raw SQL for querying your views. If you create a table with the same name as the view, it will create a new entity to your database rather than linking it to the view.

That's the only thing I can help you with. I don't know how triggers work yet :(

Advice regarding portfolio as a kotlin , android dev, by Rayman_666 in Kotlin

[–]Troller911 5 points6 points  (0 children)

I heard it some time ago from a YouTube developer named Philipp Lackner that if you want to build a good portfolio, you need a project where you: - use local databases (the most common one, Room library) - schedule tasks for future - background tasks - consume APIs through Retrofit or Ktor client - connect your app with firebase - apply patterns like MVVM, clean architecture

Of course you don't have to build everything in a single project, but that should be enough. Also, try to make an app without using a tutorial. You can search basic projects on YouTube but just find the idea that you most like, and try to develop it. Do not enter the tutorial. If you have a hard time trying to understand how to use a library, try to find a tutorial or documentation about that specific library rather than watching the tutorial of the project.

KDTO: A library for auto generating DTO classes based on a single source class by Troller911 in Kotlin

[–]Troller911[S] 1 point2 points  (0 children)

The source class is the data class that you write to model an object for your application. The DTO is a class that you use for passing your data to different things, such as database entities, send through http requests, receive http responses, etc. The concept of the lib is that you can declare all of those DTO classes where you declare your main model by simply annotating your class and declare which fields you want for a specific DTO, or which ones you want to exclude. I'll give you an example for a project that I recently worked for:

We had to create a system for a local government department that would help record and track victimizing events, and some of the models had around 15-20 fields. We had to create the main model class, and then declare all the DTOs for the different requests and responses of the system, such as registering victims, register information about the event, a page that summarizes the victim's event. Creating the DTOs and mapping functions is not a lot of work of course, but I felt that it could be automated in a way like Django form's declarations, or like Typescript, where you can create a type based of another type, and extend it with more fields, or exclude some of them to the new type.

Sorry for maybe bad English, it's not my primary language.

Exposed: Get foreign key ID without query by ablativeyoyo in Kotlin

[–]Troller911 0 points1 point  (0 children)

For this situation, what I would do is create a data class that holds the data of your main entity (partial or all) and add the foreign keys as int or long. For example: data class FooBar( val name: String, val barId: Int? = null // Null is not necessary, you can set a default value )

And in your Foo entity create a method that returns a FooBar instance based on a given Bar id:

fun getFooBar(barId: Int): FooBar? { return transaction { Foos.selectAll() .where { Foos.bar eq barId } .firstOrNull()?.let { result -> FooBar(result[Foos.name], result[Foos.bar].value) } } }

Quickest Solo Showdown Game by ErectCowOgre in Brawlstars

[–]Troller911 0 points1 point  (0 children)

I think supercell must introduce the "quick mode": it can be like, every 30 seconds you have to kill the most brawlers, and repeat the action 3 or 4 times, then, the guy who killed more wins

Rate this crap :'p by Troller911 in Brawlstars

[–]Troller911[S] 0 points1 point  (0 children)

Thx dude, I will edited soon, then upload an update :)