I know that I want to develop a React App like so:


Without using Redux, I know that I need to fetch a dataset of photos which will manifest itself as the <PhotoFeed/>. Should I fetch this data in the PhotoPage parent component or in the PhotoFeed component itself? Does it even matter where I place this fetch?

Also, I am somewhat new to development in general, and I want to know what this process of design is called (determining when and where data gets 'fetched', etc.). Are there any theoretical frameworks one can use to make design decisions like this, and also, is there any sotware-engineering terminology that relates to anything I raised in this post?

  • You shouldn't fetch data at view components at all, commonly, there is special application layer, which helps you with manipulating data, suggest you reading about application layering, also you can read this article codingthearchitecture.com/2015/03/08/… – Yurii N. Jun 27 '17 at 14:10
  • Could an express.js environment be commonly seen as one of these 'layers'? – connected_user Jun 27 '17 at 14:35
  • This is not the layer, this the framework, which includes some of those layers. – Yurii N. Jun 28 '17 at 18:09
  • Without asking you if you could point me to an article that suggests practices in terms of how to implement Express.js as one of these layers, I want to ask you: What is the best way for one to make sense of how these web-technologies relate to this 'layered' design pattern? For instance, if someone was completely new to Express.js how would they gain knowledge on how Express.js can be used in one of these design patterns? Is it just a matter of learning what Express can do and then applying that to a certain design pattern? – connected_user Jun 28 '17 at 18:27
  • This 'layered' technologies don't belong to Express.js only, they're over the layer of frameworks, they belong to architecture of your application. You're absolutely right in your last sentence, but first of all you need to think about pros and cons of many frameworks, not only Express, read about architectures, and carefully combine them, respectively to your requirements. – Yurii N. Jun 28 '17 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.