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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why are many of the biggest web frameworks in dynamically typed langs?

12 点作者 jannesan将近 2 年前
Django, Rails, Lavarel, Phoenix … Is static typing less useful in Web development? Do these dynamic languages enable better dev experience (than frameworks in statically typed langs like Spring, ASP.net)?<p>I have no experience in building big web apps and I would like to learn one of those big frameworks that come with a lot out of the box. Kind of curious to try Phoenix because Elixir seems fun and tooling around it seems good. On the other hand, I can’t really imagine not having types, so I’m thinking maybe I should try Spring boot with Kotlin instead (type system seems really nice).<p>Anyone has some thoughts on this? Not looking for general static&#x2F;dynamic typing discussion, just want to know what makes a good web framework.

8 条评论

austin-cheney将近 2 年前
&gt; just want to know what makes a good web framework.<p>Personal opinion. A framework is an architecture in a box so that you, the developer, do not have to make as many decisions. Normally when developers are asking such questions they are seeking easiness: <a href="https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;wisdom&#x2F;blob&#x2F;master&#x2F;Easiness.md">https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;wisdom&#x2F;blob&#x2F;master&#x2F;Easiness.md</a>
brudgers将近 2 年前
<i>what makes a good web framework</i><p>Use.<p>Static or dynamic is just theory. Users don’t care. Customers don’t care. Investors don’t care.<p>The only people who care are people who would rather argue than build. People who want to be judged by their opinions rather than utility.<p>Sure, a person may have good reasons for preferences about them. But those are their preferences not someone else’s. They only matter insofar as you are working with them for money, fame, or goodwill.<p>In the end building is a lot of work and no choice avoids that. Maybe one will mean more gets done with the same amount of hard work. Maybe it doesn’t.<p>Either way the best way to avoid the hard work of building is by not building. Good luck.
stefanos82将近 2 年前
The only thing that I can think of about dynamic languages is fast-paced development and productivity; in other words, deliver an MVP within hours, if you are an experienced user of &lt;X&gt; framework of your choice.<p>With a static typed programming language, there&#x27;s always a cost of compilation time and expected problems with linking libraries.<p>I cannot tell you how many times I have started a project with a specific cause to solve a particular problem, only to find myself trapped in a massive trap of unknown, cryptic error messages in C++ madness that I had to decipher...until I have realized I have completely forgot what I was even doing!<p>Now with a dynamic language, I solve all my problems in no time, I deliver a prototype quite fast, and whenever speed is necessary, I can always fix it in multiple ways, for instance what Python currently offers me; in other words, I optimize my performance only when it becomes a bottleneck.
评论 #36224719 未加载
shams93将近 2 年前
Those are older frameworks, back then dynamic typing was seen as a positive. But if you&#x27;re building a graphql service with nodejs most likely you&#x27;ll also use typescript for that.
mejutoco将近 2 年前
IMO this is probably because most of these frameworks started with Ruby on Rails as an inspiration.
frou_dh将近 2 年前
Using a compiled language to develop a webapp has a pretty horrible workflow, i.e. needing to recompile and restart a binary to see any change. Of course, that can be mitigated&#x2F;automated-away in several ways, but it&#x27;s still a tension.
rapnie将近 2 年前
WebAssembly may bring change here. See the recent HN discussion on emerging Gui libraries in Rust: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35722681" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35722681</a>
评论 #36217758 未加载
syntheweave将近 2 年前
Web sites tend to have either a lot of static content to serve, or are an interface to database queries of various sorts.<p>In both of these scenarios, the complexity isn&#x27;t derived from writing algorithms and data structures that &quot;go wrong&quot; (which static types can help a lot with) but from gluing together the two ends - taking an HTTP request, making it do the thing with the database, and then returning a response. That&#x27;s the genesis of the LAMP stack - Linux, Apache, MySQL, PHP. Four pieces that just need a little bit of scripting and configuration to turn into an app.<p>And at the outset, a lot of the benefit of using PHP or Perl was just in having some useful string handling that wouldn&#x27;t cause a buffer overflow, and being able to test in production by editing the script instead of deploying new binaries. Cheap webhosts would always provide PHP because it kept the deployment so simple. But SQL injection attacks were common and data loss frequent, and a lot of framework features were built on those kinds of challenges - methods of safely handling user input, features for maintaining accounts and login sessions, unit testing, ORM, database migration, and so on. Since they mostly stay in the request-response framing and SQL is leaned on to handle the inner workings of the data, these are things that end up having relatively short, disposable code paths, which if they complexify into something needing more processing, can be offloaded into a fast native-code process that just does the inner loop. I think that approach keeps dynamic languages in the mix - the debugging can be compartmentalized, and so can the bits that need high performance - so it&#x27;s mostly about features, defaults, deployment. None of the frameworks end up being a perfect fit after the app gets big, but they help start it on a course with some underlying structure. If you go big on the framework you&#x27;ll have more defaults imposed on you, which can be convenient, but spending a lot of time evaluating them isn&#x27;t as important as getting the frontend and the database right.<p>I&#x27;ve been doing some coding with the Symbol blockchain lately and it&#x27;s served as a helpful comparison, because Symbol has a unique approach that does a lot of framework-like and database-like chores without the use of smart contracts: it persists data, it allows you to update the data&#x27;s state and review previous versions, it lets you search by various parameters, and, of course, it transfers custody of data between accounts, implements access controls, and allows various kinds of transactions with atomicity. In many cases, the app can exist in client Javascript and access the chain over REST. I started off thinking I would have a Flask app, and now am just writing a single HTML file with everything inlined apart from the SDK used for building transaction data - the framework part of it evaporated. Which is great - fewer dependencies. The limitation is, well, it&#x27;s a blockchain, and the type of data worth storing on a blockchain is the &quot;wants to be shared widely with an expensive consensus&quot; kind.