TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Front End Development 2022

22 点作者 dcwardell超过 2 年前
I&#x27;ve been happy working as a back end developer my whole career, but now I want to learn front end development. It&#x27;s a little daunting since the space is so large and things change so fast.<p>I have 2 questions:<p>1. If you were to start a new product and had complete control of the front end stack, which tech would you choose and why?<p>2. What are some good resources (books, tutorials, etc.) to learn front end development in general (patterns, best practices, etc.) or the tech in particular.

8 条评论

solardev超过 2 年前
Front end dev here, formerly full stack. For moderate to high complexity apps, I would choose Next.js on Vercel for its incredible developer experience relative to either vanilla JS or React without Next.<p>If you don&#x27;t care about React (for its popularity) it might also be worth considering other frameworks.<p>I would remove as much of the backend as possible and store whatever I could on the edge and use serverless functions extensively (also built into Vercel and Next). Failing that, I would outsource the backend to a headless CMS or a managed database. I would abstract as much of it as possible instead of having to manage containers and VMs.<p>Javascript is incredibly powerful these days and the backend can often just be a dumb data store. Vercel is incredibly innovative and IMHO one of the two companies really pushing the Web forward (the other being Cloudflare).<p>My rationale is that this stack allows you to spend the vast majority of your code on business logic instead of infrastructure.<p>You can write each page in a few minutes, git push, and it&#x27;s automatically built and hosted and cached. Stacks that used to take days to set up now takes mere minutes. It&#x27;s so much better than it was even 4 or 5 years ago.<p>Next took me from hating React and JS to falling in love with it. I enjoy every new project I write in this stack, something I&#x27;ve never experienced before in any other language, frontend or back. It feels like the only stack that was designed with developer experience in mind. It&#x27;s purpose built for web apps.
评论 #34025566 未加载
评论 #34027804 未加载
rk06超过 2 年前
A backend dev with minor FE exp here.<p>1. I would go with Vue. Because Vue is focused towards DX and pragmatism. It provides good defaults to start with and flexibility to go through less travelled paths should you need it.<p>Part of the reason is that when I first tried react (in 2016), I couldn&#x27;t get it to build. And setting up build tools was not easy.<p>Vue can be used with a single script tag, so I was able to get it up and running without any issue.<p>I started with Vue 1, and recently worked on a project using Vue 3. Despite my gap and version changes, I was able to get up and running without issues.<p>2. Vue docs are great resources. Personally I prefer video courses to get started and then docs and guides. I can personally vouch for Laracasts Vue tutorials.
评论 #34032388 未加载
andrewmcwatters超过 2 年前
Back in the day the conventional advice was LAMP, Linux, Apache, MySQL, PHP. A lot has changed since then, but I&#x27;d say conventional advice has not changed much beyond the current equivalent stack:<p>Linux, Nginx, MySQL, Node.js&#x2F;React&#x2F;Express.<p>Nginx eventually overtook Apache. PostgreSQL is very popular but MySQL is still more widely used. The JavaScript ecosystem has not been displaced by much, although in recent years Go has made some ground on the backend.<p>If you learn Linux, Nginx, MySQL, Node.js, React, and Express, you can get hired almost anywhere today.<p>Just read the documentation. Most newbies do not.
评论 #34019453 未加载
heresjohnny超过 2 年前
1. It depends on the product. For a landing page go with zero javascript since you want things to load blazingly fast. I like static site generators for this such as Jekyll. For simple websites (e.g. small web shops), you might be okay just serving HTML&#x2F;vanilla JS through e.g. PHP or Python. For apps that need to be an app, my go-to framework is Angular. I know I’m in the minority here but its tooling has come a long way. The developer experience is stellar nowadays. For CSS: Tailwind, which finally made me productive in styling elements.<p>2. If you don’t know vanilla JS it’s best if you learn that first before thinking about any “stack” – I can recommend Eloquent JavaScript. After you get the hang of it, pick any stack that fits your problem and interests you, and start building. :)
cpojer超过 2 年前
I published a fast and lightweight starter pack with Vite and wrote about it here: <a href="https:&#x2F;&#x2F;cpojer.net&#x2F;posts&#x2F;fastest-frontend-tooling-in-2022" rel="nofollow">https:&#x2F;&#x2F;cpojer.net&#x2F;posts&#x2F;fastest-frontend-tooling-in-2022</a>
quickthrower2超过 2 年前
#1 will depend a lot on:<p>* Team or solo<p>* Existing knowledge<p>* Performance requirements<p>* App complexity<p>* Is it more traditional (forms and submits and reports) or modern (infinite canvases, realtime collaboration)<p>* What can I assume about the users browsers? Are they stuck on old versions<p>* Do I need React due to complexity, or even just to make onboarding simpler if everyone has used it.<p>* Maybe the team is small and we all prefer Svelte so use that<p>And so many more things to consider. This is architecture &#x2F; solution design space.<p>Web development is now like trying to choose a shampoo at the supermarket! If there was only one brand it would be much easier to pick!
throwaway0asd超过 2 年前
* Transmission - I am using HTTP to request assets into the page, I have managed to reduce my total asset requests down to only 4. Other than that I am using websockets for absolutely everything, because the way I am using websockets is 8x faster than HTTP. Its like all the benefits of gRPC without the frustration of protobuf. It isn&#x27;t just faster its also way easier to manage from the application code because there is no round trip and no callback&#x2F;promise&#x2F;await on transmission. Just fire and forget.<p>* Automation - I am automating the shit out of it. I am automating my documentation, bundling, compilation, and a few other things as much as possible in my build step, which is under 4 seconds. I use TypeScript to type absolutely every declaration. I use TypeScript-ESLint to enforce use of TypeScript declarations and a bunch of custom rules to eliminate known bad practices like &quot;this&quot;, bind, call, and apply.<p>* Framework - What a dirty word. I am not using any of this nonsense. TypeScript is good enough. I have a simple 4 step solution for state management, otherwise I just work directly to the DOM and my current application is an OS GUI. Don&#x27;t knock it til you try it.<p>* Performance - You don&#x27;t know how slow you are until you measure things with numbers. Today I managed to reduce my page load time with state restoration (an OS GUI in the browser) from about 300ms to 192ms by eliminating a CSS reflow and removing 90%+ instances of innerHTML. In the browser the performance tab&#x2F;graph in the developer tools is fantastic. In Node I prefer to write my own performance tools that typically intertwine with test automation. I eliminated the css reflow by visually hiding all dynamically rendered elements until everything is fully built into the DOM. To dynamically size things vertically I removed some JavaScript arithmetic based upon parent container clientHeight and instead am using CSS min-height:100%.
andrei_says_超过 2 年前
Reduce complexity to minimum.<p>Html + CSS. If I need JS interactivity maybe use htmx. Or, use stimulusjs if custom stuff is needed.<p>I’d do my best to avoid complicated front end solutions and frameworks.