2

I have a website of a few hundred games, almost half of them are in HTML5, and the rest are still flash. We check the user's browser and if he can use HTML5, we serve it, if he can only do flash, that's what he gets. The game isn't the hard piece here, it's just an object that gets embedded from the CDN into the page regardless of HTML5 or flash based on device capabilities (checked via modernizr, etc). No different than an image, really.

Currently, the site is simply pre-compiled static html files that get served via nginx and a bunch of embedded js files. We chose to serve static files because of the site's high traffic, mostly static content, and the lesser server overhead. We have a backend admin tool where we can edit a game's details like name, description, or whether to use HTML5 or not by default for example. Once we've edited a game, we click build to re-build that static html page which is a series of jade templates, environment specific config files, stylus files, foundation for responsive design and css, & jquery. We do the same for our info pages on the site and faqs. The admin tool is a node.js app that connects to a separate node.js api app (using mongodb) that manages the CRUD functionality for games and a bunch of other endpoints for the actual frontend website, like: user registration, support email forms, user account editing, login, etc. Other than those few simple user interactions though, the actual website content itself is mainly static per a user's visit and one user sees the same content as the next: homepage, category pages, game pages, support pages, etc. This may change a bit in the future, allowing for users to customize a game page list for themselves, etc. So content may become a bit more dynamic.

As the site has needed more and more js and jade templates have gotten larger, it's gotten a bit messy on the frontend in that regard, so that's what I want to "re-do": the organization of it all, minify everything, concat as we should, and more. Just better frontend organization, testing, modularity, building, and maturity of code.

I've looked at all the js frontend frameworks and understand most, but as this site isn't really a SPA, and it's more of a traditional site, I'm not sure what the right mix is. Or maybe I'm thinking about it wrong.

I'm looking for recommendations or thoughts on the best tools to use for this. All ideas are welcome, covering any variety of the possible issues at hand. Happy to answer questions to help clarify.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.