r/javascript • u/Crafty-Waltz-2029 • 27d ago
AskJS [AskJS] How do you plan the frontend?
Hello guys,
How do you plan the frontend when the requirements are gathered, architecture/diagrams in backend is done? I want to know what the frontend to look like in high level.
12
Upvotes
4
u/GhostDog76 27d ago
As for the frontend, are we talking about the JS/code architecture or the visual UI?
I always recommend starting with mockups and prototypes before opening your IDE. Get visual context on what you are going to build, ask a lot of questions, and then finalize it. Collaborate with the stakeholder or someone who can sign off on the design. (This is mostly designer's job).
Once that's approved, that's the time to open VS Code, then just implement what's on the mockup and prototype.
As for code structure, there are tons of architecture patterns out there (like feature-based/modular, atomic design, etc.) just pick what fits your project best.
2
u/jax024 23d ago
I’ve made enough that I have my formula which lets me focus on the more complex components of a particular project.
2
u/MrBengaliHacker 22d ago
I usually try to break frontend planning into a few steps rather than jumping straight into coding.
Once the requirements and API contracts are clear, I'd generally approach it like this:
I find having this rough structure in mind before coding makes implementation easier and helps avoid unnecessary refactoring later.
Of course, the exact process can vary depending on the size and complexity of the project.
1
u/Ronin-s_Spirit 27d ago
For what? It depends on what your website is about.
2
u/Yages 26d ago
I get what is coming in from the backend, make it work roughly, and then finesse. It's just make it work, make it handle error states, make it handle loading states, make it handle exceptional states.
Then, then you can play with animations, transitive states, niceties. I always try to only think of how the UI works in detail once I've used it, before that it's broad strokes.
2
u/bloodguard 26d ago
Man Plans, and
GodEnd User Laughs.I once mocked up a huge (at the time) multiform data entry system with all the 30 something forms in their own templates rendered on one page. Each with a save button and forms would only unlock when the preceding dependent data was entered and saved. I did it just to make sure I captured all the data, tested the back-end database REST api and had all the field validation working.
They liked it. All as one honking big page. I'm pretty sure they're still using it as is to this day.
12
u/[deleted] 27d ago
[removed] — view removed comment
2
u/[deleted] 26d ago
[removed] — view removed comment