Code Monkey home page Code Monkey logo

Comments (14)

charu210703 avatar charu210703 commented on August 15, 2024 1

Or we can also implement it with MongoDB and Node.

from geeksay.

marilia-borgo avatar marilia-borgo commented on August 15, 2024

To solve the problem of big file size, implement a database would probaly be the best option, it will help to maintain the quotes/words more organized.

To solve the problem of the conflicts, could be created another site where the people could post their new translations/quotes directly on the database. Removing the need to change the main project that is causing the conflicts

from geeksay.

marilia-borgo avatar marilia-borgo commented on August 15, 2024

Thinking of that, to add new translations/quotes it wouldnt be necessary to create another site, just add a page inside de geeksay where people could add new translations. This way, even people who dont code can contribute.

from geeksay.

dk3775 avatar dk3775 commented on August 15, 2024

@marilia-borgo Agreed but If we implement a database then the process of fetching and translating the strings at runtime would be very complex or difficult. Do you have anything in mind to achieve that?

from geeksay.

marilia-borgo avatar marilia-borgo commented on August 15, 2024

i don't think it will very complex, it would be simple using a back-end with django for example.

from geeksay.

dk3775 avatar dk3775 commented on August 15, 2024

So can you do that or explain rough logic regarding how to do it.

from geeksay.

marilia-borgo avatar marilia-borgo commented on August 15, 2024

ok, i will start making a rought database to show my idea.

from geeksay.

dk3775 avatar dk3775 commented on August 15, 2024

So can you do that or explain rough logic regarding how to do it.

All new folks start from here..

from geeksay.

charu210703 avatar charu210703 commented on August 15, 2024

Basically it's like writing a backend for this site. We can create a NodeJs file which will have different routes, among them will be the one in which we can enter a new quote/translation which should be inserted in the database. We just need to do some changes in the main/home page in such a way that the required data is retrieved from the database.

from geeksay.

glorious-elijah avatar glorious-elijah commented on August 15, 2024

This will probably not be the best overall solution since it will increase the initial load time, or if possible use a webworker to execute that side of the code. Anyways this is what I am proposing to mimic a constant time operation instead of making requests to the database server each time a user needs to translate a quote, why not during the initial load, fetch all the quotes and store them in a session storage or local storage so that all requests will be made to that storage instead of the server and will only make requests at specific interval to the server to refresh the local storage or session storage

from geeksay.

dk3775 avatar dk3775 commented on August 15, 2024

@glorious-elijah your idea is exactly the thing I was thinking about but the issue is it will take high initial load times while fetching the translation array.

from geeksay.

glorious-elijah avatar glorious-elijah commented on August 15, 2024

@dk3775, high initial load times during the fetch process will be a little tricky to deal with, but what if we made that request through a web worker? I did a little research and it seems that it is possible to fetch data with a web worker, this is the link. After the web worker is done fetching the data in the background we then make it available to the main thread, this will only reduce the initial load time but I think the request should be fast enough in the background for the user not to realise there is such a thing going on behind the scenes.

from geeksay.

ravipathak3001 avatar ravipathak3001 commented on August 15, 2024

what if we keep complete dictionary on some json file or csv may be, that way it would be more user friendly too, anyone will be able to contribute later and can make changes according to user's need. and it won't require any extra cost to keep on running this project. when someones installs the package can directly use what he has or can make changes too

from geeksay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.