The Reality of Frontend Development
I keep seeing developers asking about frontend choices for their Go projects. As someone who works primarily with frontend tech now but started as a Go developer, I want to share some insights.
Frontend development is genuinely challenging. While template solutions exist, they limit you to basic layouts and simple forms. Anything custom requires real frontend skills. The old idea that “backend is hard, frontend is simple” doesn’t apply anymore.
What Makes It Complex?
JavaScript and CSS are completely different skills under one umbrella. Understanding JavaScript syntax isn’t enough - you need to know how it works with the DOM and all its quirks.
Both technologies carry historical baggage. CSS layout evolved from tables to floats to flexbox to CSS Grid. All methods still work, but which should you choose?
Most importantly, vanilla JavaScript can’t handle complex applications. Unlike Go’s excellent standard library, plain JS forces you to build your own framework for anything substantial. This is why so many frameworks exist.
Making Practical Choices
All major frameworks (React, Vue, Svelte) have similar learning curves when starting fresh. Even htmx requires significant learning time. I recommend React because it has the most learning resources available. Focus on content from 2020 onwards since hooks changed everything.
For CSS, frameworks help but aren’t essential. Bootstrap and Tailwind are solid options. Start with basic utilities like colors, spacing, and form styling. Avoid layout classes initially since they force specific design patterns.
Practical Guidelines
// Example of custom event usage
const dataUpdateEvent = new CustomEvent('dataChanged', {
detail: { userId: 123, status: 'active' }
});
document.addEventListener('dataChanged', (event) => {
console.log('User updated:', event.detail.userId);
});
document.dispatchEvent(dataUpdateEvent);
- Choose a JavaScript framework and commit to learning it properly
- Use Vite for development and building
- Be selective with NPM packages - many will need custom modifications
- Leverage custom events for component communication
- Learn CSS Grid for modern layouts
- Use CSS frameworks primarily for styling, not structure
Bottom Line
Frontend development remains complex despite improvements over the past decade. The DOM has fundamental issues that won’t change soon. You either need to invest time learning these technologies properly or hire someone who has. There’s no shortcut for building quality user interfaces.