Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: February 14, 2025, 5:57 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Websites that work on mobiles and desktops alike (Responsive)
#13
RE: Websites that work on mobiles and desktops alike (Responsive)
To me it seems like doing something on a server that can be done on a client is just making things more complicated for very little benefit. JavaScript appears to be an excellent language for complicated string and array manipulation. To make a simple arithmetic-expression-to-assembly converter that runs in IE6 (like this), it takes 600 lines of JavaScript. How many lines of code would it take to do it in a language such as C++ (so that it runs on the server)? I come from the world of competitive programming, and I still wouldn't know how to do it in C++. My guess is that it would take well over twice that many lines of code just to implement the algorithm. And, if you do it JavaScript, you don't need to care about error-handling so much. If you type "(*)" as an arithmetic expression, the parser simply exits due to an uncaught exception. If you do it in C++ on the server and don't implement error-handling (which is again easier to do in IE6-compatible JavaScript than in C++), the user could easily, even unintentionally, crash your site. Would it run faster? Maybe a little, but a way to make it signifficantly faster would be to implement the Shunting-Yard algorithm instead of using a recursive parser (which is also easier to do in JS than in C++). The only potential benefit from doing anything server-side would be that, if you are ready to write around 10'000 lines of code, you could make it possible for the user to directly download the binary file (without having to assemble it himself). Do you think I am missing something?
Reply



Messages In This Thread
RE: Websites that work on mobiles and desktops alike (Responsive) - by FlatAssembler - February 19, 2018 at 3:58 pm

Possibly Related Threads...
Thread Author Replies Views Last Post
  religious websites are a greater security risk than porn destinations. Ziploc Surprise 3 3046 June 20, 2012 at 6:57 pm
Last Post: Angrboda



Users browsing this thread: 1 Guest(s)