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

Feature? Improve data-driven nature of the app? #271

Open
ryanone opened this issue Jun 17, 2024 · 6 comments
Open

Feature? Improve data-driven nature of the app? #271

ryanone opened this issue Jun 17, 2024 · 6 comments
Labels
suggestion Suggest a new feature or improvement

Comments

@ryanone
Copy link
Contributor

ryanone commented Jun 17, 2024

Hello - I’ve had this thought on my mind, and I’m wondering what you’d think about it. First off, thank you again for all of your efforts in creating these super-helpful web apps. They’ve been amazingly helpful resources in my learning. I’m sure there are also a ton of other people that feel this exact same way.

As far as longer-term improvements, have you given any thought to this? For example, have you thought about migrating to a single-page app framework and possibly other things that can help cut down on maintenance costs? I’m guessing these kinds of things would take a lot of effort, and you’re likely super-busy as it is. But for what it’s worth, I have some thoughts, and have played around with (i.e. prototyped) some things, if this is something that has been in the back of your mind.

I just want to raise this, and see what your thoughts are regarding this. :)

@SethClydesdale SethClydesdale added the suggestion Suggest a new feature or improvement label Jun 19, 2024
@SethClydesdale
Copy link
Owner

Hello!

Sorry for the late reply. I'm always happy to hear that these projects are still helping people out :)

I've been out of the loop for awhile in regards to web development, but I'm assuming the functionality of a single-page app is similar to how we'd use AJAX back in the day to change the page content by retrieving the new data from elsewhere, correct? I'm not against the idea, though it would no doubt require a lot of work to implement considering the amount of pages.

I would also like to maintain the ease-of-use for those who download this project for offline use. That is, users can unpack and then use the website locally as if it were the online version, without any need for additional setup. If it's anything like AJAX it might not be possible, since I've utilized similar functionality for the grammar index in Tobira to retrieve and display grammar points in a popup, however, this functionality doesn't appear to work offline (I believe due to CORS) and relies on a direct link as a fallback.

@ryanone
Copy link
Contributor Author

ryanone commented Jun 19, 2024

Thanks for responding and clarifying things. Yes, the functionality of the single-page app would be similar to how we'd use AJAX back in the day by retrieving data from somewhere but I think we can get away with not using AJAX or fetch() outright, yet still get the feel of loading data. Yup, it's a lot of work to implement things. But we can approach this in a piecemeal way, as long as there's alignment. :)

Regarding ease-of-use, there are ways where we can produce code/logic that's in a single codebase, and can handle either file:// or http:// while still functioning the same, and without running into the issues with CORS that you mentioned. For example, we can inline the CSS and data for exercises into the singular HTML file. There are other potential options as well. If you're interested, I did do a prototype, if you'd like to check it out.

@SethClydesdale
Copy link
Owner

Sure, I wouldn't mind taking a look at the prototype to see how it works.

@ryanone
Copy link
Contributor Author

ryanone commented Jun 22, 2024

Sure, it's available at ryanone/genki-prototype. There's a README along with an overview doc that explains at a high level, the approach. It's not intended to be a proposed final approach, but rather a conversation-starter, and as you said, there are still a lot of open questions/issues to sort out.

Thanks for being willing to look into this.

@SethClydesdale
Copy link
Owner

I took a look and I think it's a really cool prototype that helps simplify a lot! However, since it uses quite a few things I'm unfamiliar with, I'm afraid I might have some difficulty maintaining a few aspects of it, at least until I've had the time to read up on them more. I also believe the common layman, or student in this case, could have some trouble setting up for offline use, in the current state anyway.

My apologies, I know you've taken the time to set all of this up and I greatly appreciate that, but I think I may just be too set in my ways haha.

@ryanone
Copy link
Contributor Author

ryanone commented Jun 30, 2024

I also believe the common layman, or student in this case, could have some trouble setting up for offline use, in the current state anyway.

This is something that the build can be tweaked to address, so that it generates output that works like what the current app does today (i.e. user just downloads plain HTML/JS/CSS, opens the index.html file locally and off they go).

However, since it uses quite a few things I'm unfamiliar with, I'm afraid I might have some difficulty maintaining a few aspects of it, at least until I've had the time to read up on them more...My apologies, I know you've taken the time to set all of this up and I greatly appreciate that, but I think I may just be too set in my ways haha.

Ok yeah, this part is a little harder to overcome. If you've been out of the loop for a while regarding web development, and are primarily/solely used to developing in more straightforward HTML/JS/CSS (i.e. not using a single-page app framework), then that's likely a deal-breaker until that changes, if ever. I'll likely iterate more on this on the side, as I'm curious to see how this can evolve, and in case you come around to engaging with single-page app frameworks. Until then, thanks though for responding to this inquiry. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Suggest a new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants