I would like to ask some advice/opinion about maki...
# opensource
t
I would like to ask some advice/opinion about making my project ready for the public (KMP, open source of course). It is a green-field, pure-Kotlin, full-stack KMP application framework. It already works and I have pilots running in production since last year, the experiences are good so far. My basic problem is that it is somewhat big (85 K lines Kotlin, 10 K lines Markdown). Documenting and cleaning up everything properly is an immense task and I'm struggling with the decision to do it. My question is not about the feasibility of the project itself, I'm happy to talk about that as well, but that's not the point. What I would like to decide if the effort to make it usable by others would worth it. Please note that the web site is not mobile friendly yet (desktop browser would be the best) and that it is in-development. https://adaptive.fun https://github.com/spxbhuhb/adaptive
👀 1
c
I've built, and subsequently abandoned, several open source projects in my career as a developer, and I've built many more projects that are single purpose for my clients for just for my own personal use. In my experience, the two methodologies of development end up being way more different than you might expect, and they each have their own set of challenges and unique rewarding results. I think my advice would be to really carefully consider whether this is a project that you will maintain for many, many years. While it might sound like a nice idea to share something you made with others, the harsher truth is that once someone else adopts it, they are now trusting and depending on you to keep the project going. Speaking a bit cynically, it's not as easy as it once was to build a community of contributors because the open source market has become very saturated, so it's going to be your responsibility to maintain the project even years down the road, even when you've gotten bored with it and would like to move on to something else. If you're running a business and building this framework primarily for your own company, then publishing it may make sense as the business does have a many-year outlook, and building a community around the tech can help drive traffic to the business as well. But seeking to take a personal project and open it up to the community has the potential to turn into a bigger commitment than you initially thought your side project would be, with difficulty turning the project into a product that could support a company (and thereby the significant amount of time you spend on it).
thank you color 1
t
I actually do run a business and build products based on this project. Also, this project is ongoing for 2 years or so and as I build our core business on it I plan to maintain it out of necessity.
(Also, my company is not a startup, it's been around since 2006.)
But you are right about those point, those are valid concerns. This is why I'm struggling with the decision.
c
With that said, I've been building a full stack side project recently, and have had the same kinds of thoughts on the framework I've built for it. I think I have some unique ideas that others might benefit from, so why not release it as an open source project? We'll, after thinking about it, I've decided that I just don't have the time to support this work as a proper open source project, so for me it makes more sense to keep it just as a personal project. But now I have the freedom to not worry quite so much about things like documentation, or maintaining compatibility with older versions, or building functionality that others might want that I don't need myself. I can focus more on building exactly the tool I want, which I'm finding to be quite freeing as there's less pressure and responsibility for it. So that's just my 2 cents. I hope that gives you some things to think about, to help you make the right decision for you and for Adaptive!
thank you color 1
l
If you publish it, I'd certainly be happy to try to add i to my project. It already has at least 5 different UI's to the same underlying tool, so it's not a huge risk for me to implement another one, and maybe I'd be able to provide some useful feedback.
thank you color 1
t
It is actually published on Maven central, with version is 0.25.705-RC1, but still changes quite frequently. The example project uses this version and it should be compile and run: https://github.com/spxbhuhb/adaptive-mpw-example
The web site is for this version IIRC (I really should display that info somewhere).
l
Thanks. I'm checking it out now. It doesn't seem to start properly on my machine, do you have an idea what's going on? I just tried opening
localhost:3000
, and I get this error in the browser console:
Copy code
Firefox can't establish a connection to the server at <ws://localhost:3000/adaptive/service-ws>
t
What have you started?
I mean which gradle tasks
My guess would be that the JVM task is not running.
l
Indeed. You were absolutely right.
It now connects, but all I get is a blank screen with the following in the console log:
Copy code
[webpack-dev-server] Disconnected! index.js:485:22
[webpack-dev-server] Trying to reconnect... index.js:485:22
[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled. index.js:485:1
[HMR] Waiting for update signal from WDS...
[service.transport] WS-CONNECT <ws://localhost:3000/adaptive/service-ws> (attempt # 1) null
t
Technically it is possible to start JS only but it is a bit of a hassle when you use the application framework. Sandbox-js can run standalone but that's just a sandbox for trying things fast.
That is correct, WS-CONNECT means that the browser connected to the server.
Let me start the example.
l
Yeah, it seems to start, but the browser window is completely blank.
Ah, now it works.
Perhaps there is an issue if the jvm server isn't started fully when the page is initially loaded.
t
Phew... 😅
Yes, if you start jsBrowserDevelopmentRun first, you have to refresh. There are a few kinks like this, that's why I call it not ready for public use. But thank you for trying it out, it is very important to get some feedback.
Actually, there is a channel #C07JZ4Q6THB It is not really active because so far I've been unsuccessful communicating the project.
l
I'm looking at the code now. This thing with the toolbar to the left is part of the framework itself? Where do I find the code that lays out the "options" panel?
t
Everything you see is part of the framework, no libraries used at all.
l
I can't even find the code that adds the "TODO" message. I must be looking in the wrong places.
t
The todo is in
appHome
in commonMain.
Typically all UI code goes to commonMain.
l
It calls a function called
todo()
. So this function is part of the framework?
t
It is, you can use Cmd-B to see the source code.
l
I was looking for some examples that shows me how UI components are laid out.
t
On the web site if you go
User interface > UI Fragments > Layout
you will see the available layout fragments. The MPW example features the so-called multi-pane workspace which is a rather complex fragment, it basically implements the workspace IntelliJ uses, you can add tools, central content etc. (not full functionality of course).
l
I see. Thanks. I'll take a look.
t
I typically use column and row, sometimes box for general layout
If you browse the UI fragments you will see examples that actually work, there is small code icon at the bottom, that shows the actual source code of the example.
Probably I should add those for layouts as well.
And replace the todo of the example with some explanation where to look. Thanks, these help. :)
Copying the source code is a hassle, but there is a copy icon as well.
l
Here's a short screencast showing the array editor and the chart window in the JavaFX-based UI. What I want to do is to build something like this, but for the web:

https://www.youtube.com/watch?v=ps9olHDleCA

So the question is if you're planning to add any components that would help building this.
t
The table with resizable columns is on the way, using edit cells is no problem.
I already have some plotting, adding the bar graph seems easy, I'll have to do that sooner or later as well.
Others are fairly normal UI components which already exists. I don't have a menu bar, but I already have dropdown menus, so the bar is not a problem.
The array editor is hard to implement well if you want to handle large amount of data. I'll do that sooner or later but it involves pretty complex code to make it scroll nicely.
I'm not 100% sure you need the complexity of the multi-pane-workspace tho, maybe you are better off with a basic client.
I have no example project for that at the moment, could write one...
l
Oh, I have no plans to reimplement the UI exactly. I just wanted to show the functionality that I'm aiming for.
t
This language seems fun btw 🙂
I mean Kap
l
Thanks. You can check the examples page to see some features: https://kapdemo.dhsdevelopments.com/
I'll let you know if I manage to build something that works using your framework. 🙂
t
Ok, thanks.
Feel free to ask any time, while I tried to write documentation it is quite hard to cover everything as the system is already big.
l
@Tóth István Zoltán I'm trying to integrate it in my codebase now. I'm a big confused at how your gradle files work though, because
build.gradle.kts
doesn't include adaptive as a dependency as far as I can tell.
I'm probably doing something wrong because I'm using groovy gradle files, and I am not a gradle expert.
t
@loke There are two points: including the plugin, including the dependencies. From https://github.com/spxbhuhb/adaptive-mpw-example/blob/c17c505f2992cddfbdc3cab207c80dd23ea4dcfc/build.gradle.kts
Copy code
plugins {
    alias(libs.plugins.kotlinMultiplatform) // this is the standard KMP plugin
    alias(libs.plugins.adaptive) // this is the Adaptive plugin
}
These are the dependencies, (you might not need all):
Copy code
commonMain {
            dependencies {
                implementation(libs.adaptive.core.core)
                implementation(libs.adaptive.core.ui)

                implementation(libs.adaptive.grove.runtime)
                implementation(libs.adaptive.grove.lib)

                implementation(<http://libs.adaptive.lib.app|libs.adaptive.lib.app>)
                implementation(libs.adaptive.lib.auth)
                implementation(libs.adaptive.lib.document)
                implementation(libs.adaptive.lib.graphics)
                implementation(libs.adaptive.lib.ktor)
                implementation(libs.adaptive.lib.ui)
                implementation(libs.adaptive.lib.ui.mpw)
                implementation(libs.adaptive.lib.util)
                implementation(libs.adaptive.lib.value)
            }
        }