Redux: Is it necessary? [closed] - state

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 23 days ago.
Improve this question
Is a reducer like Redux really necessary when developing with ReactJS?
Is it just a way to design cleaner code?
If so, when?

No, reducers or Redux are not necessary. Vanilla React works fine, or other options, e.g. MobX.
Check out the Redux FAQ:
Dan Abramov, one of the creators of Redux, says:
...don’t use Redux until you have problems with vanilla React.
When to use Redux is an architectural opinion and the FAQ provides this guideline:
In general, use Redux when you have reasonable amounts of data changing over time, you need a single source of truth, and you find that approaches like keeping everything in a top-level React component’s state are no longer sufficient.

React is just a library to build UI. Not an entire framework. Using redux let you handle all the logic of your application in a clean way. There are other library similar to redux, but redux seems to be the way to go when starting a new project with react.

Short answer you do not have to use Redux but it is considerably easier on you if you do chose to use it, there is a lot of examples online which i can point you at where you can learn how Redux and React work. Note that React is only V(view layer) in MVC that being said react does one job and it does it really good that is displaying user interface.

Related

A typical tech stack using vowpal wabbit? [closed]

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
Hi I want to see an example tech stack where vowpal wabbit is used.
This can be actual application which people are using or an imaginary one which illustrates how VW fits.
We are currently facing a common legacy code problem. Our back end is a collection of web services implemented in C++ using relational DB and Front end is Javascript based web app build on top of those webservices.
Now We want to extend our backend to provide some analytics services which uses machine learning functionality. Having seen around, I quite liked Apache Spark + ML + GraphX as graph already heavily features in our server logic. But the problem is they are not C++. Though they can be made to integrate with it, but as we will be writing lot of our own stuff, We will have to write non-C++/Javascript code, which is currently not under consideration.
Vowpal Wabbit is another candidate that meets our criteria but I am not sure how it would fit over-all right from raw-data storage to application logic. Hence the question.
As I recall VW could be built as static library (check examples in its ./library folder). And perhaps as dynamic library too. Thus it could be just incorporated in your legacy c++ app.
Vowpal can be used as a library and the source code include examples of using the API in C++. We are using it in an iOS application with no problems. The only slight oddity is the need to use boost::program_options to initialize the library and various methods. If you were motivated, you could further develop the API to accept arguments. The maintainers seem to actively encourage the development of patches and features.

Django + AngularJS: Why integrate AngularJS with Django? [closed]

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 8 years ago.
Improve this question
I've never played with AngularJS but after some searching, many people seem to integrate the two frameworks together. What are the main reasons why people integrate the two frameworks?
Thanks for your help
I'm not overly familiar with any of the new JS frameworks, but I'm not sure the answer is any more complicated than "They are both popular frameworks". If you mean "Why use Django at all?" The answer is that you require an extremely robust backend when a lot of your logic is client-side (and thus easy for the client to manipulate). Django makes it quick and easy to set up a REST framework than you can hook into with angularjs and allows you to keep certain logic hidden from the client.
To add: People like AngularJS and other JS frameworks because they can provide a cleaner and more responsive user experience (form submission errors being displayed without the need for a form submission, as an example). A complaint I've heard before is that some people feel that Django does not do enough to separate the business from the display logic (something I personally disagree with, but that's irrelevant), so it's possible those people like the deeper separation you get by using AngularJS for all your display logic.

Interact with a C++ application throught CakePHP [closed]

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'm wondering Which solution could be the best to interact with a C++ application and its data through CakePHP over a Windows environment.
I was thinking about creating an API, with Delphi or Java for example, which could work with JSON requests and which at the same time would be linked to the C++ application.
This is a very generic question but I would like to have any feedback about this or know if anyone have tried something similar before and what solution was implemented for it.
Thanks.
First, you need to define "best": Most performant, easiest to implement, best scalable, most portable...?
If you can modify the C++ application, I would not create a component in the middle (what you suggest to write in Delphi or Java) but instead add an interface which PHP can access directly. If you cannot do this then you need to create such a component, of course. In this case, roughly the same options exist as for embedding the interface in the C++ app:
A simple approach is to use sockets (see Interprocess communication within PHP with a continuous process?). A more heavyweight approach is http://activemq.apache.org/.
And of course you can expose a webservice (SOAP, REST, XML or JSON...). This is certainly a very portable interface but probably not the fastest (more layers in between).

How can I determine what percentage of Github projects contain unit tests? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a presentation about unit testing and TDD. One statistic I'd like to share is the percentage of Github projects that contain unit tests. Is this data available somewhere?
If not, is it possible to obtain through a Github API? I was considering a simple file-based approach based on project type (see if a Java project has any files ending in Test.java, or spec.rb for Ruby), but I've never used their API and don't know how feasible this is.
I don't think there's any API to provide you with that information.
Or at least not without browsing the entire set of repositories, which would not be practical anyway. You might want to suggest the github staff to conduct such a survey themselves, but that will be up to them :)
Grab the list of Java repositories from the Github API (use search and the language parameter), then clone each repository, look for Test.java or whatever and collect your results. I don't think there's a way of doing this without cloning each project though.

Integrate Python's Django into a C++ application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I would like to integrate Python, and specifically Django, to a C++ application. This is for many reasons which include, but not limited to:
Ease of data handling and feature development in python
Django's amazing ORM
Django's instant admin interface
etc...
My specific application is a real-time event intensive application. The Python\Django aspects should mainly come in the initial data loading part, batch data dumps and semi-real time web access for tracking and configuration.
How would you go about integrating these very different programing languages and design concepts?
I would strongly recommend considering to integrate the other way around: your C++ application into Python. A good article on the tradeoffs of extending vs. embedding.
Also, re the Django/web server part, it's not always recommended to have a monolithic application that's too large. Consider breaking the web-serving part into a separate application, purely Django on Python, that will communicate with your main application via either OS files or sockets, or some other IPC. You're still welcome to add Python to your main application (by extending or embedding) for the other needs.