4 ms·
I think that the author is coming from the Java world, in which case the comparison he likely had in mind is not Rails or django, but the plethora of Java web f
by Stormbringer 16y ago
I think that the author is coming from the Java world, in which case the comparison he likely had in mind is not Rails or django, but the plethora of Java web frameworks.
Personally, for Java Web Frameworks there are two I like, for quite different reasons.
The first is Spring MVC. the rest of Spring can go die in a fire for all I care, but the Spring MVC part is quite nice. Used properly it allows you to very quickly write a 'low ceremony but high fidelity' server based system. If you make some simplifying assumptions you can have all the Ajax you want too.
The other is GWT. The authors continually harp on about saving us from Javascript inconsistencies and cross browser compatibility. And, to be honest, I think they have a very good point. Anyone who has done serious web work would have run into cross browser problems. There are some other benefits to GWT, such as moving client state down to the client, where it well and truly belongs. Also the ability to pass real, proper Java objects (or at least pretend that is what you're doing) means GWT would never even notice most of the 'heavy lifting' that other frameworks keep rupturing their disks over - such as parsing form parameters, or having to post forms to the server to get them validated only to have to go back to the client and recreate the failed form... (save yourself the round trip and a square headache).
Now, obviously I'm clueless, but to my untrained eye as a programmer the bits I'd need to put into a Lift app look similar in some respects to the JSP tag libraries. E.g. they are trying to get you to do the programming in the html or xml. The problem is that xml (or any of its bastard love-children) is absolutely awful for doing logic in, which makes it deeply unsuited for that task. The only JSP tag library that I remember being worth mucking around with was some sort of super-duper-table-thingy.
Oh sure, you might not need to use weird variants on tags like <h:form> or <f:u:form> or <z:button> or whatever it was, but is moving the weirdness from the tag into the style/class really that big of an improvement? It is still doing the programming in the wrong place, that is, in the html.
- thomas11 16y agoI don't see any programming in HTML in these examples. Via the class attribute you specify which Lift component renders that particular fragment of your site, but there's no logic such as conditionals or computations.
- weichi 16y agoNaive question here (I've worked on web apps, but it was using Java technology of the circa 2000 vintage, so my knowledge is quite limited). It seems to me that it would be really nice for a developer to be able to treat html/javascript/css similar to the way that developers today treat assembler - a very low-level way to the browser to do exactly what you want, but something that the large majority of programmers don't need to know anything about. So that instead of needing to write html/javascript/css, a developer codes to an api that operates at a higher level (in much the same way that developers of GUI applications code to an api that operates at a high level). Are there web frameworks that insulate developers totally from html/javascript/css? Is this what frameworks like rails/lift/django give you, at least for a limited domain of applications? Is such a framework even possible? Desireable?
- brown9-2 16y agoGWT aims to accomplish this.
- bad_user 16y agoThe problem with your logic is that HTML / CSS ... is the most powerful API ever invented for building interfaces. It is so powerful that similar APIs are being brought to mobile phones, e.g. Silverlight / Qt Quick; but for the record, even Silverlight / Flex are a pain compared to plain HTML / CSS (try building customized components sometimes). The only problem with HTML / CSS is the browser inconsistencies involved and I'm obviously biased here, but it's nothing compared to what I experienced while developing / testing with Java Swing or wxWidgets. Cross-platform is a bitch, trying to solve it is nice and all that, but you're going to quickly run into the problem of "leaky abstractions". And for the record, I tried GWT and other web frameworks that tried doing this ... I completely hated every minute of it.
- asnyder 16y agoYes, one of them is NOLOH (http://www.noloh.com http://www.noloh.com). It's actually an acronym for "Not One Line Of HTML". You can of course use HTML/CSS/JavaScript, but you never have to, and if you do there's extensive handling to allow you to do things you wouldn't be able to normally do in straight up JavaScript, such as handling race conditions, dynamic instantiations, and related situations. Disclaimer: I'm a co-founder of NOLOH
- brown9-2 16y agoThe first is Spring MVC. the rest of Spring can go die in a fire for all I care Just curious, but which other parts of Spring are you referring to here? The core dependency-injection container?
- steele 16y agoDave Pollak has worked in Rails for a long time. JRuby support is on the way for lift too. shrug If Java is a necessity, Play! is a breath of fresh air.
- nickbarnwell 16y agoIn my very humble (and inexperienced) opinion, Play! is the closest you're going to get to the development speed of Rails or Django and their ilk while still using Java.I recently finished writing a small app in it for a school project, and it was nothing but enjoyable. Not in love with the templating, but everything else was a joy.
- deleted 16y ago[deleted]
- steele 16y agoYou'd be doing yourself a favor if you try your hand at Play! in scala. I believe they support scalate which, in my experience in scalatra, has you in the markup trenches a lot less than groovy templating. Specifically, Scaml w/ Jade syntax is pretty impressive. It's analog in rails would be slim-lang.
- strooltz 16y ago> I think that the author is coming from the Java world, in > which case the comparison he likely had in mind is not > Rails or django, but the plethora of Java web frameworks. if thats the case i think he's misrepresenting himself with statements like "the most powerful, most secure web framework available today" and "The best Web Framework".