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

Hard coded #7

Closed
ravi-teja-nani opened this issue Aug 14, 2024 · 15 comments
Closed

Hard coded #7

ravi-teja-nani opened this issue Aug 14, 2024 · 15 comments
Assignees

Comments

@ravi-teja-nani
Copy link

Currently the entire page is static, if you consider making it dynamic it would be easy to manage.

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 14, 2024

Great idea, but wouldn't it result in things like increased server load, potential offline unavailability, and longer load times?

Since this website is currently static, it's also available offline (once loaded and except for the image and article links), just thought that's more accessible.

Please tell me if I'm wrong, I know nothing much about web development. Thanks!

@pikhosh
Copy link
Contributor

pikhosh commented Aug 14, 2024

Great idea, but wouldn't it result in things like increased server load, potential offline unavailability, and longer load times?

Since this website is currently static, it's also available offline (once loaded and except for the image and article links), just thought that's more accessible.

Please tell me if I'm wrong, I know nothing much about web development. Thanks!

It can actually be improved further even without doing server-side stuff or making it heavier. I think the JS part can use a little bit of refactoring, in general, to help with the maintainability.

BTW cool project idea! It's actually fun how you built it without all the fancy stuff of the current web! Keep up the good work!

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 14, 2024

I see, and my JS skills are also a bit "disappointing" so I'll try refactoring the code!

And thanks bud! Well, not using fancy stuff might be actually because of my poor knowledge but now I feel that it's great; Kind of old school website, one might think it's from 2000. The page loads quickly too!

@pikhosh
Copy link
Contributor

pikhosh commented Aug 14, 2024

I think it can be good to separate the information from representation as a first step (then we can have other metadata for topics to solve #3).
Currently, there is too much repetition in the HTML for cards and for each modal in JS; this can be solved by having a JSON file for information or even an array of objects inside the JS just to make things clear; then you can loop over them and insert an element for each one, removing the repetition.

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 14, 2024

I think it can be good to separate the information from representation as a first step (then we can have other metadata for topics to solve #3). Currently, there is too much repetition in the HTML for cards and for each modal in JS; this can be solved by having a JSON file for information or even an array of objects inside the JS just to make things clear; then you can loop over them and insert an element for each one, removing the repetition.

Woohoo! That'd be fantastic! I'll try my best, but it would be great if someone who knows web development could help.

Thanks again, this is a great suggestion.

@DanielAndresCP
Copy link

I can give this a try! I actually had been thinking on contributing with the same thing @pikhosh suggested

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 14, 2024

I can give this a try! I actually had been thinking on contributing with the same thing @pikhosh suggested

That'd be awesome. I'll assign you to this then.

@Hussseinkizz
Copy link

Nice work @Buzzpy, really nice, scrolling through the site made me realize how much I have covered on technical debt in my time as a self taught too, anyways on this hardcoding things I think yeah some kind of db is needed as data can grow or if your to keep this simplicity and avoid server side content, I propose you look into my framework: https://github.com/Z-Js-Framework/z-js it's literally js can just work with a single script and can allow re-usable components without any bloat... just saying of course any other option can also do, trick is managing complexity!

@DanielAndresCP
Copy link

Hello, I made the PR (#42) to dynamically generate the cards and modals.

However, I believe it would be wise to use a framework like Astro, as proposed in #38. The main reasons being the use of components, and most importantly content/data collections. I believe that using content/data collections in Astro for each concept would be beneficial because they are validated, so, for example, there would not be any cards that don't have a card description. Additionally, using content collections the content of the modal of each concept can be written in Markdown. Finally, Astro generates plain HTML and CSS (and JS if you want it to) so it would still be fast. I believe you can automate "compiling" the site with a Github action, but I haven't tried it myself

@Hussseinkizz
Copy link

Nice work @Buzzpy, really nice, scrolling through the site made me realize how much I have covered on technical debt in my time as a self taught too, anyways on this hardcoding things I think yeah some kind of db is needed as data can grow or if your to keep this simplicity and avoid server side content, I propose you look into my framework: https://github.com/Z-Js-Framework/z-js it's literally js can just work with a single script and can allow re-usable components without any bloat... just saying of course any other option can also do, trick is managing complexity!

what am proposing requires no build step, you just put content in json file maybe grouped by categories, then we can use fetch to load them and that's it... no extra steps needed, am really busy but let me see if I can do a little experiment with this!

@Hussseinkizz
Copy link

So I went on and recreated the whole thing just like I was saying, here is the demo: https://devpedia.netlify.app/ content is in json file, no HTML all over we using components, no build step, no server needed, just works :)

@Hussseinkizz
Copy link

Also made a pr for this, anyone can take a closer look: #53

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 16, 2024

@Hussseinkizz The demo looks great! It needs some minor changes but overall, it is great. I think we might implement Z JS instead of Astro, as it's simpler and easy to maintain.

I think Z JS wouldn't affect implementing issues #3 and #9 right? It looks like a pretty new framework so it's better to look at their limitations too. Please correct me if I'm wrong

@Hussseinkizz
Copy link

@Hussseinkizz The demo looks great! It needs some minor changes but overall, it is great. I think we might implement Z JS instead of Astro, as it's simpler and easy to maintain.

I think Z JS wouldn't affect implementing issues #3 and #9 right? It looks like a pretty new framework so it's better to look at their limitations too. Please correct me if I'm wrong

Yes Z js as a framework can be used to implement these, I already iterated on #3 in my pr, but even #9 can be implemented just there others factors to consider and framework for use here which may or may not qualify z.

@Buzzpy
Copy link
Owner

Buzzpy commented Aug 16, 2024

Closing this issue, please navigate to issue #38 for updates.

@Buzzpy Buzzpy closed this as completed Aug 16, 2024
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

No branches or pull requests

5 participants