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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Lift is My Favorite Web Framework

60 点作者 tomtom101大约 12 年前

12 条评论

eCa大约 12 年前
This is OT, but you really should track clicks on links (if you need to do it in the first place) in a different way than this:<p><pre><code> &#60;a href="javascript:mixpanel_track_link('http://liftweb.com/','link:liftweb.com');"&#62;my first encounter with Lift&#60;/a&#62;</code></pre>
评论 #5353892 未加载
评论 #5354187 未加载
zura大约 12 年前
What I hate in these company blogs - there seems to be no way to go to the actual company site... I always end up editing the address bar and removing "blog." prefix by hand...
tikhonj大约 12 年前
Many of the same advantages (and some additional ones, no doubt) hold for the Haskell web frameworks, with the added benefit of using Haskell.<p>I'm in no position to say whether Yesod or Lift is better; I just wish more people would consider Haskell at all--it's a great choice for web programming (among many other things).
评论 #5354569 未加载
评论 #5355430 未加载
dwhitney大约 12 年前
The sever side statefulness of Lift, the fact that it supposes I don't know how to program HTML/JavaScript, and the hostility toward Scala that Lift's creator harbors since negotiations with him joining Typesafe broke down, are all reasons I think it would behoove anyone to avoid the framework. Play, unfiltered, scalatra, and blue eyes are all fantastic
评论 #5354256 未加载
评论 #5354876 未加载
laureny大约 12 年前
Regardless of the technical qualities of Lift, its future is pretty uncertain with 1) dpp leaving the project (in pretty bad terms) a few months ago and 2) Typesafe choosing Play over Lift for its stack.<p>I would definitely not pick Lift today for a new project.
评论 #5354593 未加载
MasterXen大约 12 年前
Apologies if this is nit-picky, but...<p>Some of the main points are weak and don't really apply to differentiating Lift specifically. For example, the fact that Lift is Scala-based doesn't make it any different than Symfony is PHP-based or Spring MVC is Java-based. Subjective, but I definitely understand that that this is an opinionated view (rather than a objective "Lift has Feature X" viewpoint).<p>Similarly, what server-side framework that's in wide usage nowadays doesn't have the ability to have some form of generated/dynamic JS wiring? I'd say that's table stakes nowadays, not something to callout by any means.
muglug大约 12 年前
Lift's JS &#38; jQuery code generation is nightmare-inducing, it's ridiculous to call it a "benefit". JavaScript should not be auto-generated by some flavour-of-the-week web framework in a totally different language. You're just creating a whole world of pain for future-you.
评论 #5355216 未加载
评论 #5356861 未加载
lmm大约 12 年前
I tried to like Lift, but it's so woefully documented that I can't. At the moment I've gone back to Wicket (which is fantastic on many of these, particularly building a page out of component objects rather than bunging lots of stuff in a page controller, and has an even better way of doing bindings than lift does), even though it doesn't fit perfectly with Scala.
评论 #5354726 未加载
dpick大约 12 年前
I've had very similar feelings using enlive in Clojure land. I doubt I'll be switching back to a more traditional templating engine any time soon.
评论 #5354457 未加载
评论 #5353986 未加载
评论 #5353988 未加载
Uchikoma大约 12 年前
After some years of living with Lift: Liftweb is awful. Don't use it.<p>There is not enough documentation (by a large margin, even with the books, one example being the dozens of hooks you could hook into if they were documented), it's too complicated and there are a millions ways to do one thing.<p>That said the rendering and binding is the best way to do rendering I've seen yet. I'd wish this was easily usable with other frameworks. And Rogue (from foursquare) for Mongo on top of Liftweb persistence mapping is excellent. My understanding they will support things outside Lift in the future.
dkhenry大约 12 年前
I am amazed people even see Lift as in the same balpark as Play. When I last used lift It appeared to be a relic of the J2EE stack ported to a new language. This goes beyond any technical capabilities of the framework and down to how it expects you to work in it. Even the author says that just getting started can be a pain, doesn't that tell you something about your framework. It its hard to understand what to do its hard for people in the future to understand what you did. So who cares if you can make pages with just a few "snippets" no one else can figure out what you did.
评论 #5365796 未加载
neya大约 12 年前
I might get downvoted for this..but I'll risk it, because it is a message that needs to be passed. My experience on using Lift. A few months ago, I was evaluating various frameworks to start off with my new web app. I am already running a dozen RoR apps and gradually I'm moving away from RoR. I will explain as to why, later in my post.<p>I was evaluating between Play and Lift and I ended up choosing....Lift. Lift has an extremely high barrier to entry mainly because of the poor documentation. When I first started off with scala, I didn't even know what the hell was SBT, when I downloaded Lift, there were a lot of things that were confusing - I was expecting perfectly organized folders just like ruby on rails, but everything was almost hidden/scattered. However this was the only barrier to starting up with Lift. I also did read about the controversies about the framework, etc [1]. of Lift, but honestly, none of them actually mattered to the developer, that is me. Now that I've chosen Lift, I think I made the right choice. Now, WHY is Lift better?<p>1) It's a 3+ year old Framework that is extremely stead-fast and stable, production-ready.<p>2) Scalability - This is a subjective view, but many high profile companies switch to Scala from Ruby/PHP/etc. when they need to scale. And Lift is a really good framework that gets the job done. [2][3]<p>3) Contrary to popular belief, once you cross the barrier to entry, it becomes much much easier to develop Web apps with Lift. Remember those wordpress days? How scary it was in the beginning to write custom themes and plugins?? But once you started writing a few, it felt like a breeze, right? That's what I'm talking about - That's exactly how Lift is too! [4]<p>4) Security - Security is hard. Sure you can write your Web app without using a framework. But if you use RoR, you will realize how much work is being done on behalf of you to make your app secure (Authenticity token, CSRF protection ,etc.) Lift is no different and it is one of the most securest frameworks I've ever worked with.[5] This is a very good guide explaining why you need to choose Lift over anything else.[6]<p>5) RoR vs Scala - Now, Imagine this scenario - You are a sculptor (web developer). You have two materials to choose from to create a statue (your web app). One is ordinary clay (Ruby on Rails) and the other one is a Metal, preferably some alloy made of copper and bronze (Lift). It is extremely easy to model your Statue (your web app) in Clay. And once you're done modeling, you can add some chemicals, or even thin layers of metal on top of it, etc. to make it strong (Think Unicorn, Phusion, etc). But, no matter what you do, the core is still made of clay and if you throw it down, your clay model will shatter into pieces.<p>Now compare it with the Bronze alloy (Lift). It is extremely hard to make a statue with it, but once you make statue with it, it's going to be so hard and robust, it can handle pressure (load) well - Even if you drop it, it might deform slightly, but never break. But, the disadvantage is that it takes too long to model a statue with this metal. However, you should decide if the trade-off in time is worth the effort in the long run. Of course everyone wants a nice status that is robust!<p>In the real world, you will probably be ok with RoR, but when you need to scale, you will realize the potential benefits you are missing out soon[7] - For example, if RoR can handle X requests/sec, and Lift can handle 10x requests per second, and assuming X requests require an Amazon box, then you save 9 boxes with Lift. That is huge savings for your start up, isn't it? I always wonder why people try so hard to scale RoR. It's a great framework, but the wiser thing to do would be to use something more efficient when you need to , than holding onto something that is less efficient because you like it. Also RoR has its own confusing terminologies (personal opinion). For example:<p><pre><code> render json: @post render :json =&#62; {:errors} </code></pre> Notice the colons before and after the word 'json'.<p>If you are interested in Scala, Coursera has a course on Learning Scala by Martin Odersky (The creator of Scala) and it is really good. Scala is not a purely functional programming language, which means if you are accustomed to programming in Ruby style, you can take it with you to Scala too.<p>[1]<a href="http://www.quora.com/Lift-web-framework/Why-did-Typesafe-select-Play-for-their-stack-instead-of-Lift/answer/David-Pollak" rel="nofollow">http://www.quora.com/Lift-web-framework/Why-did-Typesafe-sel...</a><p>[2]<a href="http://img.scoop.it/FP9bEzouSr7kRinQRAtGmDl72eJkfbmt4t8yenImKBVaiQDB_Rd1H6kmuBWtceBJ" rel="nofollow">http://img.scoop.it/FP9bEzouSr7kRinQRAtGmDl72eJkfbmt4t8yenIm...</a><p>[3]<a href="http://www.quora.com/Why-did-foursquare-choose-Lift" rel="nofollow">http://www.quora.com/Why-did-foursquare-choose-Lift</a><p>[4]<a href="http://stackoverflow.com/questions/2573608/what-type-of-webapp-is-the-sweet-spot-for-scalas-lift-framework" rel="nofollow">http://stackoverflow.com/questions/2573608/what-type-of-weba...</a><p>[5]<a href="http://seventhings.liftweb.net/security" rel="nofollow">http://seventhings.liftweb.net/security</a><p>[6]<a href="http://seventhings.liftweb.net/" rel="nofollow">http://seventhings.liftweb.net/</a><p>[7]<a href="http://lift.la/lift-state-and-scaling" rel="nofollow">http://lift.la/lift-state-and-scaling</a>
评论 #5365800 未加载