Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am developing a webbased application using javascript and I am applying a lot of algorithms on my data and a lot of processing on data is required.
I was wondering is it the common practice to do all the processing and implementing algorithms using javascript or should I do them somewhere else ( i.e. server side ) and just give the results to javascript for viewing?
Depends on what you're trying to do!
Generally if it's data crunching, you want to do that server side, and then present it to the user. Sometimes it can be helpful to offload some of this work to your client- but keep in mind, if you're pushing computing onto the client, it may cause a page to take longer to load.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
In web development, does the backend code always mix with the front code at some point? Checking jsp and some php I see that the code is usually mixed, is this a bad practice or should you always avoid using javascript as an intermediary?
Normally it depends on what you really want to do. But they are usually mixed
PHP was developed as a templating language for web, so basically it is what it was created for. But you might notice that in modern projects PHP used mostly as an API backend for Javascript application. In such cases, it will not be mixed.
It seems to me that it depends on the project type. But even if you do not use modern JS frameworks try to separate business and frontend logic. Check the MVC architecture or DDD.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm new to web app development, and I try to make it as fast as possible.
I have 2 choices:
I can fetch all the data from the database one by one every time I require a refresh from the app,
Or I can fetch all the data in an array an work with the data "locally". The size of the array is around 800kb so it shouldn't be a big deal for the browser's cache.
I'm working with WebFocus, and the requests are made in pure SQL.
It's no problem for a SQL Server to deliver the data each time.
Just make sure, that you only fetch the data you need and that you connect only once to your SQL server.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
This may be a small question, but I haven't found any direct answer yet. Is it considered bad practice to use PHP alongside HTML? (using PHP foreach for example in combination of with HTML)
I have searched on Google and I didn't find a direct answer. Another example: What should I do when an user logs in on a website. Do I store the important information with $_SESSION (PHP) or should I store it with sessionStorage(Javascript)?
1) HTML and PHP go hand in hand, and unless you know one of the two languages you have to use them together
2) you should save the information with the $ _SESSION of php and destroy them every time a user logs-out
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am developing a website which needs Wikipedia data to show on pages. For instance I need a profile page for Barack Obama and I want to get picture of Obama and a short description about who he is.
Anyway, my question is: should I save the wiki data to my database to use in the next page views of Obama or should I always get the data from wiki? There are going to be many pages like this and I want my website to run smoothly in terms of performance, like page rendering latency or sth.
What is the appropriate approach?
Yes, caching the data, or at least the API requests, at your local webserver will both improve performance and latency.
Hotlinking images is allowed, but if it gets massive you should consider hosting the most images yourself. Make sure to respect the API etiquette, and be familar with the Wikimedia ToS.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I want to generate some picture, graphs to be more specific.
I would like them to render in a webpage.
I figured out that it's fairly easy to generate graph as pictures using javascript and HTML5 canvas.
But I realized that this might not be a good option, because javascript renders at client's side and calculating the graph may be complicated.
Also when I want to insert other pictures into such graph, javacript will expect those other pictures somewhere on client's computer.
So I guess that I should generate the picture before loading the page and then render the page with the picture on it...if there are no mistakes in my assumptions.
And if so, what would be the best way to achieve that? I work with Ruby and rails for the web app.
Thank you!