See seperation concerns (on wiki and stackexchange) for more information about this.
The reason for this is that Flask is good for API related tasks and React is good for UI related tasks. Once you start trying to get Flask to ...
As I can see it, I have two options.
You don't. You only have one.
Even if you decide on a full rewrite in a different tech stack, you won't accomplish that if you don't fully understand the old project and its (many, as I understand) quirks.
It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are ...
Tooling and ease of use.
There is no such thing as a "compiled language". Compilation is a property of the compiler (duh!), not the language. Therefore, the term "compiled language" is not even wrong, it is non-sensical. Which makes the answer to your question trivial: you cannot adopt something that doesn't exist.
Some people define "compiled language" ...
As always, it depends 🙃
If the object you are passing as a parameter (the “options” object) is commonly used across the application, possibly being used to call different functions, the unstructured approach can be useful.
However, if you need to create a specific object to call each of the “doLotsOfThings” functions, it probably isn't worth it and just ...
So I was musing how can I securely change the value so that it isn't available to poking?
React is used for big applications in which data changes quite frequently and thus DOM manipulation is quite high. In such cases, React use concept of Virtual DOM which uses a very effective way of ...
Yes, as long you are coding with this style consistently and you are not relying on what they are. But in reality no, let's see why.
Let me make a short example, you get a Updatable interface
public interface Updatable
public void Update();
Now, there are many things that could get be updated, a sound system, a physics system, another algorithm. ...
I think it depends on the example. I love DRY code, but @ScottJacobsen's answer has already made Dave Thomas's point that it's knowledge, not the code itself, that's supposed to go unduplicated.
I take this to mean, "instead of taking a type-A object in my ...
They should be separate. A unit of code should have one and only one reason to change (the single responsibility principle). But if your switch statement is being against two unrelated objects A and B, then in the future the switch statement might need to be changed to handle a new use case for one of those objects but not the other. A change to make the ...
Your example is a bit too complicated to make your point. You suggest dynamic dispatch, which actually works pretty much like that... if types get in the way and compile-time is a thing, name-mangling helps resolve identification and entity uniqueness.
What you describe as accidental polymorphism is only possible at the symbolic level. In the conceptual ...
Ever heard of duck typing?
Forget what these things “are”. Focus on what they can do for you.
If an algorithm needs to call a, b, & c and x, y, & z each have appropriate a, b, & c’s then feel free to use any of them.
The typing system was never meant to force you to build elaborate is-a taxonomies to make this work. It sometimes gets taught ...
The philosophical question of the day: is it really accidental ?
You are telling us as example, that a switch processes events, and that you realise how some of these processing methods have the same name and from there, go for polymorphism.
Some people would wonder why all your event handlers don’t have the same name for their methods, and why you don’t ...
You'll still get a compile error if you try something that doesn't match the ...
According to R. Martin's "Clean Architecture" everything must have a single responsibility, meaning it has only one reason to change. This is strongly correlated with another principle of clean coding and software engineering - separation of concerns.
Therefore if we were to follow these principles, your presentation layer of your domain has to have a ...
Instead of returning a success/error objects from a method, it's also possible ...
The answer is, it depends.
It depends on who is supposed to consume the string and what the conventions within the team are.
If the string is a message to the end-user, then it it likely that the string needs to be translated. The actual message for the end-user will live in a translation file and in the code you will only have a key for locating that ...
I have limited vue.js experience. I will ask a question and answer it for you.
Q: why not using "Single File Components"?
A: Some components would require very large files and including styles, will make them even larger. As a result of this, readability and maintainability will be getting harder.
Q: so what should we do then?
A: I suggest you separate ...
I personally prefer the first one.
but if page and layout are components, it can be nested inside the component folder.
style folder in the asset will look like this:
_tag.scss (npm package included and customized)