solving problem before writing any backend code best practice?

The planning phase. So lets say you have a problem and you have an idea on how to solve that problem by building a web application. What would be the best steps to take in the process of accomplished your goal of build something in this case a web application that solve that problem. What would be the thought process and way you organized you vage idea into drafts that then can turn into code. Should you first write mocks ups of what resources/features the app will have and what data attributes they will have and how they all tight together in associations. Then get an idea on the UI for the site by putting up a prototype of the design and then actually start writing some code.. what is your process for building and app form scratch when it just starts off as an idea in your head..UI or resource/data mockups first.. or both before you start putting your mind in producing real server side code.

Posted over 5 years ago by joseph
Posted over 5 years ago by Alex Yang

That's a good question, Joseph. You're absolutely right that building a new web app requires planning before you jump in and start coding right away. Not spending enough time in planning can lead to a lot of time wasted trying to backtrack and redirect your app halfway through.

When I plan out a new app, I'll always start with the back-end, especially the main resources that will serve as its foundation. For example, with Etsydemo I had to think about 'listings', 'users', and 'orders' and how they would link together. Once those relationships were clear, I had to consider which to build first. The simplest approach for me was to go 'listings' -> 'users' -> 'orders'. Then, for each of the features I needed, I would layer them one on top of another: a scaffold for 'listings', followed by image attachments with paperclip, followed by user accounts with Devise, and so on. Finally, front-end comes last. Generally, some basic Bootstrap features are easy to implement along the way, but until the basic functionality of the app is done, it doesn't make sense to invest time into more complicated front-end features in case things change midway. Having rough mockups in the beginning certainly helps as well.

0