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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: IHP, a batteries-included web framework built on Haskell and Nix

280 点作者 _query将近 5 年前

18 条评论

rckoepke将近 5 年前
I really enjoyed your introduction. For the HN readers who enjoy summaries in the comments, they open with a 10-12 sentence introduction, but the second sentence sets up the core philosophy and primary value proposition:<p>&gt; Back in the early days of the web, when server-side rendering was still a thing, javascript was sprinkled here and there to make a few parts of your web app just a little bit smoother.<p>It&#x27;s &quot;built on top of Haskell and Nix.&quot;<p>The more detailed 20 minute introduction and documentation is located at: <a href="https:&#x2F;&#x2F;ihp.digitallyinduced.com&#x2F;Guide&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ihp.digitallyinduced.com&#x2F;Guide&#x2F;</a> I think the &quot;recipes&quot; section provides some illuminating examples.<p>The creators make the following claims about durability at the end of their introduction page:<p>&gt; Lots of frameworks are already gone a year after launch. Especially in the fast moving JS world. But don&#x27;t worry about IHP. We have been using it at digitally induced since 2017. It&#x27;s actively used by us and our friends and partners. Even without external contributors we will build new features and do periodic maintenance releases in the future. We have big plans for IHP and as a profitable and independent software company we have the ability to actually execute them over the longterm.<p>I&#x27;m very skeptical of web frameworks &#x2F; toolkits. While I only work on personal projects, I tend to try to use pure HTML first, then add CSS where needed, then add JS where needed, then add backend where needed - always striving to minimize the amount of the next layer. This project seems to be targeted to someone with my preferences.<p>I&#x27;ll definitely be keeping an eye on it, and poking around with it.
评论 #23615401 未加载
xgenecloud将近 5 年前
IHP includes a GUI to build postgres schema - this is really cool and much appreciated. Databases have been existing for ages now and so are the GUI tools to manage them. However, it&#x27;s unfortunate that most web frameworks fail to provide functionalities like this.<p>Working in similar space[1], I have been talking to many early customers. Right from somebody who knows enough programming to product managers to CTOs, the idea of having a GUI within web framework and to have CRUD APIs ready with just few clicks gives them an amazing head start in building web apps. Getting past this redundant phase of creating basic CRUD with no hassle means - they can devote their energies on the business side of things. It will not be wrong to imagine in few years this workflow will become a norm.<p>[1] : <a href="https:&#x2F;&#x2F;github.com&#x2F;xgenecloud&#x2F;xgenecloud" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xgenecloud&#x2F;xgenecloud</a>
评论 #23614380 未加载
hendi_将近 5 年前
Important bit missing from the title: this is using Haskell (and Nix).<p>IHP is supposed to become the Django&#x2F;Rails&#x2F;Phoenix of Haskell.<p>I&#x27;ve been using Django professionally for since 2013, but have started using IHP a couple of weeks ago. It&#x27;s still quite early but with surprisingly few rough edges, i.e. the developer ergonomics are much better than I expected. It has great documentation that is improving rapidly (as opposed to many other Haskell libraries, which provide little more than API docs or even just the typed function definitions) and offers a refreshing take on database management and migrations.<p>Some of its killer features:<p>- HSX, a JSX-like template language that looks like HTML while providing type safety<p>- Auto live reloading without the need to setup anything<p>- Documentation with examples: it lets you query the database without learning about monads<p>- it defines |&gt; for you ;-)<p>- type-safe, composable SQL queries:<p><pre><code> projects &lt;- query @Project |&gt; filterWhere (#userId, userId) |&gt; filterWhere (#deleted, False) |&gt; orderBy #createdAt |&gt; fetch</code></pre>
评论 #23612217 未加载
评论 #23611295 未加载
评论 #23611089 未加载
评论 #23615946 未加载
评论 #23611002 未加载
fimdomeio将近 5 年前
I think enough time has passed that we&#x27;re collectively forgetting the good reasons why so many moved from server side rendering, which I would say it was mostly the difficulty in make complex uis. Then it became a trend, now going old school seems appealing.<p>Anyway in my particular case if I had any project that was a good fit for server side rendering I would probably now go with php and some libraries but probably no framework. I&#x27;ve been looking at some &quot;weirdly coded 90&#x27;s style php projects&quot;. An while the code is a terrible mess there&#x27;s also the magic that I can read everything that&#x27;s happening pretty quickly because it&#x27;s just there or in a file next to it and not hidden in a library and a sub-library with calls to functions that I never seen before.
评论 #23611106 未加载
评论 #23620464 未加载
评论 #23611082 未加载
sdn90将近 5 年前
Great work!<p>I wasn&#x27;t able to find anything on deployment in the docs. What does it look like?<p>I&#x27;ve been looking for a framework with the following requirements:<p><pre><code> - Functional-ish language - Statically typed with Result&lt;T, E&gt; error handling. - Garbage collected. - Compile time checked HTML templates, with autoformatter and IDE support (like working with JSX&#x2F;TSX in VS Code). - Some kind of SQL DSL that has decent IDE support (like Ecto on Elixir, Diesel on Rust). </code></pre> This framework checks off more of those than any framework I&#x27;ve seen. I&#x27;ll definitely be giving it a try.
评论 #23611103 未加载
评论 #23615773 未加载
erikw将近 5 年前
Nix seems to be heading toward a critical mass in Germany. I use NixOS for my work computer, and couldn&#x27;t imagine using any other OS. I keep a LinkedIn search open for nixos, and almost all of the hits are German. I&#x27;m interested in what kind of an organization might try out something like IHP? I&#x27;ve had a tough enough time introducing Typescript and more functionally oriented patterns in my team, so my guess is that organizations that would seriously consider IHP probably have a significantly different corporate culture.
roebk将近 5 年前
A Haskell project with docs, this is a pleasant surprise.<p>I’ve been playing around with Phoenix recently and I’ve been missing a decent type system (Dialyzer is pretty bad). I know very little Haskell but this makes me want to dip my toes in.
tluyben2将近 5 年前
First off, nice work!<p>I always thought it is better to mix client&#x2F;server rendering; the &#x27;everything client&#x27; or &#x27;everything server&#x27; both do not work for a large number of applications. So why not mix them. Unfortunately not much out there battery-included that consistently supports that model.<p>I did not dive into IHP (I heard about it as the RoR for Haskell) but, after reading the introduction, I&#x27;m probably going to get depressed when I hear how you do the inevitable client-side stuff here; there is a really good opportunity to mix them as there is HSX and you can compile Haskell to JS. So there should be an opportunity to appoint, where supported, some (parts of) a page as serverside&#x2F;clientside.
评论 #23611648 未加载
alexmingoia将近 5 年前
Wow! Love it. I use my own hand rolled framework but will consider switching to this.
exdsq将近 5 年前
I&#x27;ve just played about with this and love what I see so far. If anyone wants a small site set up and are willing to take a bet on this tech, let me know - I&#x27;d be happy to collaborate and see what this is like in prod :)
underdeserver将近 5 年前
Looks really cool!<p>I like the neat UI, auto refresh and everything. I even skimmed the 27-minute demo video (that&#x27;s a bit long guys), but I don&#x27;t see any reference to testing, making this a nonstarter for me.
评论 #23611878 未加载
revskill将近 5 年前
So as i see, this is like a Rails framework with static type checking. Best of both worlds !<p>I&#x27;d love to see a guide on integrating with webpack or any frontend tech in the stack.
huijzer将近 5 年前
This sounds awesome! I&#x27;m using NixOS for almost a year now and am still very pleased with it. It can take some time to get things to work, but when it works you&#x27;ll never have to look at it again! My biggest problem with Haskell is usually getting the dependencies right. So, the Nix package manager seems like a good fit.
metalrain将近 5 年前
This looks interesting.<p>I like how your code generation seems to expose most of the structure for customization, but have you thought about having different customizable templates for code generation? Like generating just REST API for this table vs generating user visible views.
评论 #23614996 未加载
steve-chavez将近 5 年前
Using Nix to handle dependencies(haskell, pg) in a framework is really cool!<p>But would IHP work in Windows natively? AFAICT, Nix doesn&#x27;t work in Windows unless you use WSL(and even here I&#x27;m not sure how smooth it is).
评论 #23615622 未加载
carapace将近 5 年前
Seems very interesting, and a move in the right direction.<p>What&#x27;s it like to debug when something goes wrong?
lvass将近 5 年前
Nitpick: Javascript is usually compiled.
cassepipe将近 5 年前
What&#x27;s the difference with Elm?
评论 #23614237 未加载