8 ms·
Blade: a Java Web Framework
- eitland 11y agoSeems nice. Apparently Apache Licensed as well.
- reactor 11y agoLooks like simpler Java frameworks are on the rise now (http://www.pippo.ro/ http://www.pippo.ro/, http://sparkjava.com/ http://sparkjava.com/, http://www.rapidoid.org/ http://www.rapidoid.org/)
- alphadevx 11y agoVery happy to see this trend catch up with Java.
- vishnugupta 11y agoI can vouch for Dropwizard. Have used in a few tier-1 services and it has worked out fabulously well. http://www.dropwizard.io/0.9.1/docs/ http://www.dropwizard.io/0.9.1/docs/
- moondowner 11y agoYou can add this one to the list: http://www.takes.org/ http://www.takes.org/
- garrettgrimsley 11y agoAs well as Jodd [0], Play [1] and many more [2, 3]. [0] http://jodd.org/ http://jodd.org/ [1] https://www.playframework.com/ https://www.playframework.com/ [2] http://www.gajotres.net/best-available-java-restful-micro-frameworks/ http://www.gajotres.net/best-available-java-restful-micro-fr... [3] http://www.javaworld.com/article/2995526/developer-tools-ide/jump-into-java-micro-frameworks-part-1.html http://www.javaworld.com/article/2995526/developer-tools-ide...
- iso8859-1 11y agoPlay is not minimalistic like Jodd, Spark, Rapidoid, Pippo, Take (that is the name even though the domain name is takes.org) are.
- edem 11y agoAbout time. Since the advent of java 8 the platform is rejuvenating. This is clearly an example of that.
- hyperpallium 11y agoIs it? You could write a sinatra-like microframework in java a long time ago (I did). Just use methods instead of lambdas. Though, perhaps 8 has inspired framework developers, and - more importantly! - attracted a more adventurous userbase?
- edem 11y agoAt least I feel like. 8 brought some really needed upgrades (for example we have a new form of multiple inheritance). It is not perfect but I think with the Stream api and the lambdas they simplified things enough for people to at least give it a try.
- frostmatthew 11y ago> attracted a more adventurous userbase? That statement seems accurate without "a more adventurous" - I think with Java 8 more people are using Java because they want to instead of because they have to. e.g. professionally I've used Java more than any other language, it's hands down the language I'm most familiar/comfortable with, yet when I start a side project for myself I've never considered using Java (usually using Ruby or Scala). With Java 8 removing many warts and bringing in a lot of great improvements I'd actually consider using it for a side project.
- haylem 11y agoI'm not sure I would consider it on the rise or a recent trend, considering we had a all sorts of these things over the past 6-7 years already (and more, if you include other JVM languages in the mix). It sure is nice to see a bit of competition though. But I'm a bit afraid of too much fragmentation and proliferation, when sometimes fixing or improving good frameworks might be time better spent. It was (and still is) a bit annoying when every week brings about a dozen new web frameworks, a new UI toolkit, a new stack acronym, etc... Oh well... I guess you can't really tell what's time well spent, and you can't really product how frameworks will compete and improve evolutionarily.
- dodyg 11y agohmmm... public User signin(String username, String password) { String pwd = EncrypKit.md5(username + password); return model.select().eq("username", username) .eq("password", pwd).fetchOne(); }
- tobyhinloopen 11y agoGotta love them securitie
- tluyben2 11y agoYou mean: as framework creator you should make your documentation reflect the latest security standards right? Just to make sure.
- onion2k 11y agoI think dodyg's point is more that someone using MD5 as a password hash is unlikely to have created a modern, secure, well-designed framework. If there's a problem as significant as poor password security then there's very likely to be other more subtle problems as well.
- mikkom 11y agoAs I'm not up to the current security research, what is problem with using md5 hash of name+password? Is the missing salt problem you are refering to? Brute forcing md5 is easier than some other hashing algo because of collisions? (And I would disagree that knowing that how to properly hash passwords means that the whole framework itself is poorly designed)
- jfim 11y agoMD5 is pretty cheap to compute. According to this Stack Exchange post[0], a GPU can do billions of hashes per second, so a short/weak password would be quickly cracked. [0] http://security.stackexchange.com/questions/38134/what-are-realistic-rates-for-brute-force-hashing http://security.stackexchange.com/questions/38134/what-are-r...
- memonkey 11y agoI love Java and I love playing with lightweight Java frameworks.
- dmacvicar 11y agoI fail to see the difference with http://sparkjava.com http://sparkjava.com We are using Spark four new code in our product and we are happy with it.
- tluyben2 11y agoIt would be the forever (especially in Javascript frameworks); why don't more people combine forces instead of doing their own thing? But then coders have opinions which do not fit the other frameworks (like they don't like the deps or coding style or usage patterns) and then they roll their own while the alternatives are perfectly fine for most.
- debarshri 11y agoI have been using spark since 2013. One thing that I see that this framework provides in DSL for DB like operations. In spark you have to configure out of the box
- atonparker 11y agoA very important one I can see is that Blade targets back to Java 6, whereas Spark only targets Java 8. This makes it available on slow moving platforms like Google App Engine.
- xaduha 11y agoI'm always puzzled when no one mentions Undertow in this sort of threads I got my eye on it ever since it appeared in those Techempower benchmarks https://www.techempower.com/benchmarks/#section=data-r11&hw=peak&test=json https://www.techempower.com/benchmarks/#section=data-r11&hw=... http://undertow.io http://undertow.io
- sscarduzio 11y agoNo offence, but this is basically the poor man's Finagle. Except Finagle is Netty based, and this is Jetty based. Anyway, this API is really as terse as one can get with Java. Great developer-UX job!
- dangoldin 11y agoThat's the first thing I looked at - whether these were Netty based. We've been using raw Netty for our core application and it's been amazing.
- sbanach 11y agoQuick question: What's the draw of using Netty vs pure java.nio? The latter (Selectors, Socket/DatagramChannels, ByteBuffers etc) seems reasonably straightforward to use, so I've never really looked at a framework - am I missing out?
- bullen 11y agoIt's hard to synchronize: http://github.com/tinspin/rupy http://github.com/tinspin/rupy
- cryptos 11y agoI'm a bit tired of these sinatra like web frameworks these days. Repetitive url patterns are not that elegant. Why not simply building the API around the fundamental REST concept, the resource? And what about proper content negotiation? JAX-RS has a nice API without much boilerplate and it is more powerful than most "micro web frameworks".
- xaduha 11y agoJAX-RS is just a specification, but implementations of it are not that fast, compared to other Java frameworks.
- jerven 11y agoThen you will like JSR-371. This is extending JAX-RS to deal nicely with routing to HTML templates. https://jcp.org/en/jsr/detail?id=371 https://jcp.org/en/jsr/detail?id=371
- pron 11y agoWhich is why my favorite "micro"-"framework" -- is Dropwizard, which is fully JAX-RS.
- shadowfox 11y ago> JAX-RS has a nice API without much boilerplate and it is more powerful than most "micro web frameworks". This is true. But it is usually much more intimidating for people starting out though. What the micro-frameworks offer is a quick turnaround time.
- true_religion 11y agoI suppose it's because if your legacy products are already built with what's essentially a HTTP-RPC protocol, you're not going to want to build a REST-inspired framework. I think REST is like the 3rd normal form of databases. In theory it's great, but in practice people only try to get close enough to the abstraction.
- gd78 11y agoCould someone please explain me where the benefit is over using some embedded tomcat/jetty, weld, jersey, hibernate/jdbc? Setting up such a project cost me 30 min and gives me full flexibility choosing the stack I need for my project.
- debarshri 11y agonone actually. I think these kind of frameworks essentially reduces lot of boiler plate code. Your code might look a bit cleaner.
- atomashpolskiy 11y agoSpeaking from my experience, benefit accumulates with the increasing number of applications under your authority, esp. in case each of these applications is some variation of CRUD Web Forms / Report Generation / Data Processing & Migration (read: typical enterprise environment) and shares most of its' dependencies with other applications, while still having a unique configuration. In such environment, having the means to create a vanilla project configuration and then extend/customize it a tiny bit for each app is immensely helpful. Now, of course, this can be achieved without bootstrapping frameworks, but the real game-changing feature is that you get a single "executable jar" artifact for deployment: - VERY convenient and straightforward to use with containers such as Docker - if you don't use Docker, 100 jars are still easier to maintain than, say, a cluster of 100 Jetty instances - possible to use CLI commands to run short-living daemon jobs; no need for a separate job infrastructure (schedulers, triggers, executors and such), just use shell & cron Besides that you usually get: - pre-packaged health-check and monitoring tools - if bootstrapping framework is popular enough: community support for plug-and-play modules/plugins that leverage some particular framework/technology (e.g. Bootique framework is an excellent example of modular approach: https://github.com/nhl/bootique https://github.com/nhl/bootique)
- eip 11y ago>but the real game-changing feature is that you get a single "executable jar" artifact for deployment Like a war file?
- alimbada 11y agoLooks like NancyFx. After having worked a little with Java/Spring recently and coming from a C#/.NET background it's nice to see the Java world is finally starting to discover the benefits of Keeping It Simple...
- mindcrash 11y agoIf you'd like a micro framework with batteries included, but still want to be able to completely switch stuff around as you go http://jodd.org/ http://jodd.org/ is really worth a look, I think.
- deleted 11y ago[deleted]
- ilamparithi 11y agoIt's good that they are targeting from Java 6. Most of these latest micro frameworks only supports Java 8. Will be really helpful for people who are stuck with Java 6/7.
- cname 11y ago> REST style routing interface I'm fairly certain there is no such thing, and parsing parameters out of the URL path has nothing to do with REST either.
- paulddraper 11y agoSort of. URL "routing" is necessary for REST, as opposed to an RPC (or GraphQL) style POST to a single URL. But yes, other than arbitrary URL routing existing, there is nothing that makes it have a "REST" style.
- cname 11y agoREST only requires uniquely-identified resources. There's nothing in that stopping you from having a single endpoint that takes query parameters to identify those resources.
- paulddraper 11y agoYes, but that doesn't invalidate what I said. It still counts as "routing" on the request URI. (Instead of, say, routing to application logic primarily based on a header or the entity like GraphQL). There's zero difference between path and query string, other than one is meant to be hierarchial and the other is not.