Hot answers tagged

6

I work on a code base in a compiled language (Scala) which is tens if not hundreds of thousands of lines long. The first thing commonly done in such situations is to break the application into microservices that usually max out at two or three thousand lines of code each, spread out among maybe 50 source files. Many are much smaller. Next, as others have ...


5

There is a difference between coding only once and compiling/linking/building only once. The former is desirable; the latter (which I think you are suggesting) is usually not worth the bother. Code the core of your application in a language which exists both on the desktop and on the web server (and on any mobile devices you can see it being ported to in ...


4

Put the data in a data base. Write a function which pulls all the data from the database and populates the arrays. Pass the populated arrays to the unchanged calc function Write a function to write a database using the resultant arrays from the calc function.


4

You put a cryptographically random, unguessable token on the password reset link that you send to the user's mailbox, and give them a time limit, expiring the link after that time limit has passed. The token insures that it came from the right mailbox. Further Reading Implementing web application self password reset mechanisms properly Forgot Password ...


3

Both solution are viable, they simply don't apply to the same use-cases. a) manipulate the DOM via JavaScript : This result in a more heavy first page, but after that you will use less bandwidth, because you will only fetch what you need, and not rebuild and send everything. And in the cases where you don't need to fetch anything, it will be really quick (...


2

An "app" is the thing that you see in the Play Store, if your device is Android, in the iTunes Store if your device is an iPhone or iPad, and in the Microsoft store if your device is a Windows Phone. A "Web Application" is an application that uses HTML, CSS and Javascript as the UI. If you've written your web application to be "responsive," it will work on ...


2

First off, you shouldn't be thinking of security in terms of a binary 'ok' or 'not ok'. Every choice you make has security implications that you want to understand. Regarding keeping the files on the web server's machine, that's not typically a problem for most commercial applications. You just need to make sure they aren't accessible via the web server....


2

There are a number of potential problems here. Theres not enough detail on the technical solution to say for sure but it seems an unsophistocated approach. Instead of critising the technology selection though, we should establish the security criteria needed for the application and ask how the solution achieves each point. eg. Should the documents be ...


2

Ahmed, Web pages can be built in just html. In fact, that's how the web started out: with just simple html pages, things we would call today "brochure-ware". The user requests a page and the server delivers a mixture of text and pictures, and then it's done. There is no interactivity, like individual preferences or searching a database. PHP came later ...


2

dynamically appending new code on the rendered page in a way that the changes would reflect on the other clients And this makes it possible to do XSS, mislead the users into providing confidential data such as passwords, and do lots of other cool stuff. You can't just let the users change the source code and run it, unverified, in other people's browsers. ...


1

There's a widely used tool for Java which allows you to reload classed on the fly when they are recompiled. I've used it and it's reliable for the kind of thing you are talking about. Combine that with an IDE that compiles each class on saving (faster than I can blink,) it's basically just like what you describe. I don't know if anything like that exists ...


1

I see all websites (THE big ones) make both PHP and HTML in same page .. Do I need to make all my website pages as PHP and embedded HTML inside it ? The fundamental problem here is that you're seeing a thing that websites you perceive as being big ones and then you're assuming that's a good thing to do. It's not. PHP is terrible enough on its own; ...


1

I am not a lawyer but my understanding is that as long as you are not distributing the software, you don't need to do anything special. You are free to use it for commercial uses. This license was created before the concept of the cloud and the AGPL was created to address this loophole: http://www.gnu.org/licenses/why-affero-gpl.en.html


1

5Mb seems like a trivial amount of data these days. So I wouldn't worry about pulling that out on demand, deserialising and manipulating that. Performance shouldn't be a problem given your quantities of data If there are no projected format changes for this data, I would stick to this approach.



Only top voted, non community-wiki answers of a minimum length are eligible