Heys guys I wanted some general advice on how to make a small application 'bigger'. What I mean is that right now I have a small single page application here and I want to emulate commercial scale practices, but I am not sure what those practices are. It's a radio show schedule manager for my school's student run radio station that me and some classmates built for class. What we're using right nowFrontend:-react, react-router, react-strap, react-player, styled-componentsBackend:-express, mysqlDeployment tools:-webpack, babelIt is pretty barebones right now and there's a few things I know I want to do like incorporate users and proper sessions using redux/react-hooks and clean up the model using promises instead of callbacks, but that is not what I am asking about. My questions are more along this lines of:-Are there really any commercial single page applications (like amazon/social-media scale)? Or do larger websites divide their app into smaller pages which each serve as the root for a smaller module of the whole thing. The class we're taking is mainly focusing on PHP so I am having trouble comprehending how a website is just a single index page with a link to your website.js file.-As of right now webpack is bundling all the frontend libraries with our components into a single file. I know this is not the best practice because running webpack with the build option gives me a warning that the file is too big (total app is like 272 KB, warning pops up over 244 KB). Would splitting this into two dependency and application files be enough? What if my application continues to grow and I need to split it again, how would I manage loading the dependencies and my application so the users isn't loading everything at the same time? This is related to the first question.-With regards to server-side rendering, can anyone recommend some tools? I would like our site to be indexed by search engines and from some initial research this is necessary right? Is there a way around this?-All the http request paths are laid out in server.js file at the root directory of the project. From here the express server will call methods from our model that does all the work getting the data from sql. As we add more resource paths is it feasible to have a single server.js file? Can the express server itself be split up into multiple files to make managing the code easier?-Express can also send files, right now it just serves the static index.html that holds our application for the '/' path (we use react-router to handle the rest on the frontend). If my application is single page could I still use this feature to send for instance form confirmation pages which are not really tied to the application? Could I also use this feature to split my app into smaller modules if I choose to go down that path?If my questions seem kinda broad it's because they totally are. I want to make the application bigger and include more features but I want to make sure I make the right choices for us so we don't have to come back and try to rework something another way. Thanks for answering!
Submitted December 15, 2018 at 06:33PM by Faphgeng
No comments:
Post a Comment