As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
My question is based on the following question: Choosing a Java Web Framework now?
..only one year later.
The reason for my question is that plenty has happened in one year, play framework has matured etc., and I want to know whats the hot thing today. What are the advantages and disadvantages of todays frameworks.
focusing on Java frameworks, it depends on your aim (as everything in IT!)
On products for big companies, you either go with Java EE or the standard Struts/Spring/Hibernate. They are proven stacks, the scalability needs in that environment are meet by those stacks and being stateful can be relevant in that environment. Besides, they apply a new version of "No one was fired by buying IBM" with the apps (Play, Scala, what's that?)
For your personal projects, no commercial aim, just or fun, any framework you like. Lift, Play, whatever.
For a startup, I would recommend either Lift or Play. I personally like Play more, but YMMV. Both are agile frameworks that simplify development and give a quick turnaround. Perfect match for a startup. The differences (stateless vs stateful, etc) are what you should check before deciding.
On Scala vs Java, again it depends. Unless you are lucky, you won't be allowed to use Scala in a corporate environment (slowly being spread though). For your own project, it doesn't matter. For startup, choose the one you know the best. I know, learning is appealing, but if you have 6 months experience as hobbyist in Scala and 5 years of commercial Java experience, the time and pain on creating your project in Scala won't be worth it.
JSP is a legacy tech, JSF is like a dinosaur, it's stateful and component based. If you want to develop high traffic distributed apps that can scale tens, hundreds, thousands of nodes, prefer stateless frameworks over component based stateful ones. Stateless frameworks can scale easily. Wicket, Tapestry and Lift are stateful, too. There is Click framework but it doesn't have an innovation nor velocity. Struts was good but it's an old framework now, Spring mvc 3 is better than struts. Yes, Spring mvc was good, but now there is much more better Play! Spring become like Java EE in time, on the other hand Play is dead easy framework with a great community and documantation. It's future is bright. It has lots of features in the core (and its very light) and also there are lots of modules written for play (like rails gems). In the last release, it got websockets, depenency management, db version management, far better scala module,...
Especially, new play scala templating is dead easy, type safe with a state of art syntax (like asp.net mvc razor) with a great performance as you can see in the test http://www.jtict.com/blog/rails-wicket-grails-play-lift-jsp/ (play is fastest in the test)
You can use both java and scala with play, but in my opinion scala is a better language than java and compete with C#, Ruby, Python with new generation features (java cannot), so I prefer scala with play. Lift is a scala framework, too, but it's more and more complicated than play and highly stateful.
Also, your platform and language selection is great. As an experienced .net developer I don't recommend asp.net webforms nor asp.net mvc, always prefer platform independent open source technologies. Python/Django and Ruby/Rails are slow and not type safe. PHP and Perl are legacy techs. The best platform today is jvm (.net works only on windows and mono killed by attachmate), so you're on the right path.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
It's not going to be a request for general comparisson:
Play! framework is Java based which means the code is interpreted to bytecode and then compiled by the JVM in runtime. On the other hand, Ruby is a dynamic language which means the code is interpreted with every request. This is certainly obvious for every programmer.
Another aspect is the development process and the ease of the language (strong typing vs weak typing).
Currently I'm developing a new website using Play!
So, for the questions:
Performance for an HTTP server (Play! runs on the JVM, Ruby is dynamic) - does it really matter for a website? would you see a significant differences?
I feel RoR has much larger community, sources, tutorials etc, and it's a little batter me. Or should it?
Well, it depends.
Ruby's not a particularly fast language, but language execution speed is likely not to be your bottleneck—in my experience, ruby's relative slowness is often just a drop in the ocean of external service calls (e.g. databases), algorithmic problems (e.g. synchronous, blocking subroutines), and design choices that are just generally inappropriate for the problem domain. Keep your whole technology stack in perspective.
Community's important, and Ruby/Rails has an extremely active one. AFAIK Play's smaller, but in my own experience Java and Scala (and the myriad other languages that have JVM implementations (including Ruby)) also have good communities.
All of this depends on the specific needs of your app (and you!). If Ruby's too slow, it's too slow. If you absolutely need some library that only exists in Java, use Java. Choose the tool to fit the task. But keep the entire task (and your own needs for completing that task) in perspective.
Many differences between these two models. As for the performance, my opinion about Java based & RoR:
1, Java based website(running on several Java Application Servers), has its unique advantage, such as multi-thread model(highest speed to read local data), global memory, easy to pooling resources, plenty of efficient clients to connect all kinds of 3rd part OSS tools...
2, RoR (and Php) model of HTTPServer connection, need to "proxy" request to App tier. Multi-process model increases inter-process communications. And as a "dynamic language", the performance is lower.
But, nowadays, web programming depends on other tools to boost up. The widespread uses of cache, NoSQL(Memcached, Redis, TT/TC), IPC/RPC framework(netty, akka, )... shift the bottleneck. I knew both above models has been used in large-scale networking social games.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm working on development of a social web application using Java. I need to develop the frontend/GUI of my application for web browsers.
I'm wondering what is the better strategy to do frontend development, whether using frameworks like JSF 2.0 & like OR simply following MVC approach with servlets and JSPs ?
As I have heard JSF really makes the development simpler but also the learning curve is not too low, so is it worth learning JSF or I should prefer to directly proceed with servlets/JSPs ?
I'm new to web applications development using Java & I've almost completed writing the business logic for the application.
Please justify your answer on the basis of following parameters:
Performance & costs
Ease of Development & Time (considering the learning time as well)
Future Maintenance of code
Any other parameters you consider important
Update (07-09-2012):
I finally went with JSF-2.0 & have no regrets till date. Learning curve is not steep. It's easier & development is fast with component libraries like Primefaces. There are some costs as to state saving but those things can be handled intelligently. Community is big & things are well documented now. Hopefully, in near future Stateless JSF is also coming which will boost JSF with extra high performance.
For a hobby webapp, homebrewing some MVC framework is not bad. It's a nice learning exercise tour. However, it will bite you on the long term, for sure if you publish on the web and it becomes popular. Most of existing MVC frameworks are very well thought out. Most of the unforeseen caveats are taken into account. The sole framework API is well maintained and documented by a third party.
Also, whenever your webapp becomes popular and you need more developers to work on it to fulfill the enduser requirements/wishes, it's easier to find someone who's already familiar with an existing framework. With a homebrewed and possibly buggy MVC framework, you'll likely find less developers who are eager enough to dive into another learning curve before taking over the maintenance which they'll probably never reapply on their future jobs/projects.
This does not specifically apply on JSF, but on every other existing and popular MVC framework as well, such as Spring MVC. As to JSF in general, well, I've written a lot about it before here. Here are some good starting points to read the one and other about it:
JSF versus plain HTML/CSS/JS
JSF adoption and popularity
What are the disadvantages of JSF 2.0?
For modern web apps like yours, and if your responsibility is the UI, you really don't want any "abstraction layer" stand between you and your html/css/javascript. Don't use any "component" framework.
I have heard JSF really makes the development simpler
Did you hear that from real webapp developers who actually used JSF in real products? Or just JSF committee patting their own backs? Or some old timers' wishful thinking that they don't need to learn the darn javascript?
If you choose JSF, please report your experience back to us after you shoot yourself out of frustration.
It's better use some MVC framework.
You can use either component based framework:
JSF = mostly standard, but its hard to learn and a lot of people don't like itTapestry = quite big and probably good framework
Wicket, GWT - smaller component based frameworks, handy, powerful, smart, but I haven't used them yet
Or you can use request oriented framework.
Spring MVC, Struts 2 = They are very similar. Spring MVC have probably better documentation
Struts - I do NOT recommend this, when you can use Struts 2, or Spring MVC - you can trust me in this point
Each framework have its pro-and-con it depend on situation and your knowledge. I cannot give you single-valued answer.
Spring MVC is very easy to learn and if you have a simple web app and you want to save your time, its better than JSF.
However if your web app is not so simple, JSF beats Spring MVC by far. Its model is more complicated, but it is much better structured and it is widely supported, so that you don't have to reinvent the wheel again in most of the cases. Complex gui can done with JSF with less effort.
You might want to consider Tapestry 5 if you're exploring options. We've been happily using it for many years on a large project in the social media space. It's an easy to use MVC framework that's component based. We're able to develop rapidly with it, especially now that we've built up a lot of our building blocks.
Learning time is probably on par with ramping up on any new framework. I'd perhaps say it's less than JSF and more than Spring MVC, though it really depends on what you're already familiar with and how deeply you use things. I put together a very small project on github a while back to get started with Tapestry 5 quickly, if you're interested it's tapstack.
As for long term use of a Tapestry based application, it has served us well. Maintenance of the code has been much better than when were using JSP. It's very stable as well. We've served billions of page views through Tapestry without any major problems.
On the downside it is less common than some other web frameworks. It is definitely a little different too. We feel it's worth it though, and refreshing to work with. Ultimately it's going to depend on what you need and what you feel works best for you. Best of luck with your decision.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Now before At the risk of getting this subject closed I just need to resolve an issue between I and the other developer consultant.
We're tasked with redeveloping a web app that does some employee management and financial book-keeping of sorts. I'm no web technologies expert but I believe in subscribing to the MVC type development methodology. So I have been looking at the tool of choice to get the job done for a while now. The other guys is championing PhP as a tool of choice, however I have reservations because using php will not really allow for the good practice of MVC. I have been looking at other alternatives and have heard Ruby on Rails, Wicket, Django e.t.c. mentioned. My only objection with PhP is that the business code is tied to the view code.
This is an edit.
I am currently looking at the ruby on rails site. Does anyone have a comment as to the suitability of this web technology/framework for medium (to possible enterprise) level web app development?
I think you're going about your evaluation incorrectly.
Your stack depends on at least a few factors:
Developer familiarity/learning curve
Community volume
Licensing
Scalability
Server availability/configuration
Supportability
Maintainability
There are probably dozens of subtle factors that will contribute to the total cost of ownership of your webapp.
Every language/framework you mention will solve your problems. PHP has MVC frameworks like CakePHP (which is modeled after Rails). Python has Django. Java has SpringMVC/Roo. Groovy has Grails. Ruby has Rails.
Every one of these adhere to MVC principles and contain RAD tools (i.e. rapid development), so in my opinion, you need to chart and evaluate the other factors because unless you have a preference or are forced to conform to executive mandate, you could just as easily pick a stack out of a hat.
Codeigniter is the one of the most lightweight(fast) PHP framework which uses MVC. You could use both languages(PHP/Java). You could even use both languages at the same time. Just get programming ;)
For example on Java I was impressed with the simplicity of Play! framework.
Well, PHP is just a programming language, is up to the programmer to turn things into good or bad ones. Ruby On Rails bring the MVC pattern to the web scope but that doesn't mean that Ruby is better than other languages to make web development with MVC in mind. And the same apply for Java vs PHP, in fact since PHP5
support a similar set of OOP constructs that Java, you can do easily your own controller factory supporting dependency injection...
Now, Almost any major programming language today have at least a good MVC implementation, with good meaning: testable, database independent, extensible and backend by an strong community. You can view this
Wikipedia page to see a list of implementations.
So if you need to rewrite a web site using MVC in mind (more soon than later), I think your tool of choice must be determined by the background of the programmers you have avalaible. In case of doubts run an small demo with the options you have, is the best way to tell.
hope this helps!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
My company is about to start building the back-end for one of our new products. The idea is to build a layer that produces resources for every upper layer product (web site, mobile web site, mobile application), also, a significant part of it will be made available as an API for third party developers. You know, the typical start-up scenario.
We were planning on building our backend using Java Servlet Technology so our architecture was going to be dependant on Java, so the question is: What are the implications of Oracle scaring away open-source-aware developers and companies like mine?
Should I try to find an alternative to Java? Are you trying to move away from Java?
This question is not about technical issues with Java platform, but with legal implications of Oracle draconian intentions (my subjective point of view).
EDIT: Of course this question is subjective and argumentative, that's the kind of answer I want: opinions, and opinions are subjective and argumentative.
I suspect that Java will remain a strong back=end platform for a long time. Oracle, among other things, doesn't want to kill the golden goose. In addition, there are too many good back-end components based on Java, from Tomcat to messaging, to hibernate and spring, to groovy and grails; the market won't let them disappear for a long time.
Technically, Java is well suited for complicated back ends and large-scale problems; if you're building something simple and lightweight, using a framework like Rails along with an open-source database is often plenty.
Groovy and grails are a nice bridge from the lightweight approach of Rails to the full Java world, although groovy can be a little, um, peculiar sometimes.
We were planning on building our
backend using Java Servlet Technology
so our architecture was going to be
dependant on Java, so the question is:
What are the implications of Oracle scaring away open-source-aware
developers and companies like mine?
Are they? Last time I checked JBoss and Spring were going strong. Scala is being considered as a strong alternative for replacing Java (or it will shape the next best language for app/system development on the JVM.)
What exactly are you referring to here? I don't follow. Now, if you are going in direct competition to Oracle and their stack (and all their integrated solutions, like Oracle Financials), then maybe you might have something to worry about.
Or if you are (or intend on) doing something that violate (or can be interpreted as a violation in a court of law) the Java license agreements, then you might have to worry about Oracle (because it has the teeth to pursue them, which Sun did have.)
So, you need to be a bit more pragmatic and objective and define clearly what exactly your product role will be with respect to Oracle products. Based on that, you have then to decide whether investing on the JVM is a good decision or not.
Should I try to find an alternative to
Java?
Depends on what you are trying to achieve. A question like that is too broad and open ended to be answered in a meaningful manner.
Are you trying to move away from Java?
From the point of view of curiosity and diversifying my skills, yes. But were I in charge of developing a back-end product, I'd use the JVM. I might try to use Java and leverage from the 15 years of collective knowledge on the platform. Or I'd try Scala. But I would stick to the JVM.
Oracle or no Oracle, for these type of things, the JVM is the superior choice in terms of stability, scalability and wealth of knowledge. Erlang VM might be better from a technical point of view, but you would be hard press to build a talented team compared to building a similar one for the JVM.
Found an article discussing the future of Java, dated 05.03.10.
Okay, conclusion from the same link,
While the wheeling and dealing of the
corporate world rarely affect
developer communities as a whole, the
Oracle acquisition of Sun will have
far-reaching affects for years to
come. And while the profitability of
individual Oracle products may not
concern you, as a developer, the most
interesting points remain to be the:
- Combination of HotSpot and JRockit into an uber-JVM
- Unification of the Java SE and Java ME APIs
- Increased investment in JavaFX onto more platforms
- Continued integration of dynamic languages into the JVM.
I would recommend Java as a back end platform, I am currently employed with a company that specializes in software business solutions for companies, and nearly all of our work is revolved around using Java in the back end.
I am not sure if your back end is going to be web driven or not. I would say take a look at using the Spring Framework with Hibernate Database support. Spring has excellent support for using Hibernate and so many other tools and thats why I am a supporter of it. Unlike some other frameworks that limit you to using only certain tools, Spring does a great job of allowing you to integrate many different libraries, tools and frameworks with it. This is good because as we know too well, technology is always changing and something that is popular now, may need to be changed in the future.
Java as a back end solution will require a little more work in the beginning as oppose to lightweight approaches like Rails, but once you get everything setup(database,build files,etc) then it is off to the races.
If you end up taking the Java route, look into using Maven for building. Ant is also good, just a little more work to setup.
... did you rule out any particular technologies and for what reasons? Is .Net an option?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been doing some research into taking my programming experience and moving into the java programming marketplace, due to a combination of personal interest and local market forces. As you can gather from the title, the vast majority of my experience has been in building web-based sites and applications, and I'd like to move as much of my previous experience as possible.
One thing that I've been unable to find a concrete answer for when should a website or web-based application designer look to going with a Java based solution, over other options currently on the market. What options would Java provide that would have a designer select Java as the basic coding language to base a project upon?
Thank you for any constructive replies that may arrive from this inquiry.
EDIT: I should have included the caveat of if other factors are equal, for example if hardware, software, developer skill in java is up to where they should be for such projects, and so forth.
The main factor is what your developers are adept in. If you've got a bunch of Java developers, go with Java.
Consider this also: Java tends to run on app servers where there is a persistent global program running, and separate threads/processes spawn off to service individual requests. However, if the main global VM croaks for some reason, your whole app can go down. The benefit of course is that you get application/system level resources that you can initialize and use continuously across all requests
Other environments like PHP basically tear down and rebuild the entire environment for each request. You can code in application level data persistence using a database, but you don't get it for free. On the other hand, if one php process croaks while processing app data, it won't kill the whole system , as the entire environment is just torn down/rebuilt for the next request.
Agreed with many of the previous posters, but one possible consideration is runtime speed.
If you are using a very basic LAMP stack server, running PHP4 or lower, Python or Perl, if you do not set pre-compilation, all of your scripts will have to be re-compiled at runtime. This can cause immense stress on the server for high intensity applications. If you're in the situation where you cannot enable pre-compiling for LAMP, but you can for Java (most Java servers require this), then this should be of concern. The disadvantage is that you may have to re-compile large chunks of your web application every time you edit it. I realize this is becoming less and less of an issue nowadays, but its something to check.
Be sure to include a learning curve in the development time if developers aren't familiar with the chosen language.
For the most part, the best technology is the one you are already using.
If you have coders that know java, have system administrators that can configure java apps and know what to do when a java app stops working, and project managers who know how to accurately schedule and plan a java deployment, you would need a very, very compelling reason to pick something else like .NET for a new project, even if .NET is "better" (whatever that means).
There are, of course, exceptions; if you're using something obsolete and/or is not going to be supported in the future (like classic ASP), or you have no legacy systems, then it's time to use something new.
I believe that the conventional wisdom on this subject is that Java is better suited to very large systems that need the discipline of static typing. Also, on very busy sites, Java can use less memory and run faster than most interpreters.
(Right out of the box, Java wants lots of memory. But on a busy system Java has only one copy of all running code.)
There are also certain prosaic reasons to stick with Java, for specific sites. They might need back-office integration or some other big piece of existing code.
I would use Java if there was a library or framework that provided specific features that no other language did (or not as well).
For example, if I had an in-house-built java library for running our Gruntmaster rock crusher, then it naturally would make sense to use Java to build an app that needed to control the Gruntmaster.
Some might say that whatever one's shop's official language is the language one should use--I disagree with that rule, as in my experience a good developer can learn any language.
There is no hard and fast rule otherwise; each language has its own strengths and weaknesses. The fact that you are asking this question about Java tells me that you are not as familiar with it.
I'd suggest you go ahead and build an app or three in Java -- then you'll know. :)
There is very little separation between the capabilities of the various technologies available today for web programming.
Java at one time was the default choice since it far surpassed the abilities of the competing technologies, but that is no longer true.
The Microsoft answer has matured rapidly; the days of classic ASP are far gone with .Net now providing all the abilities and ease of programming that Java has offered.
New languages such as PHP and Ruby have arrived or become much more mainstream, and are also valid choices based on your programming needs.
So as many others are saying it boils down to what language you or your developers are familiar with.
Another aspect to consider, is the ability to use a vast eco-system of open source libraries.
Languages like PHP, Perl or Ruby have such lib market places (almost) built in. .Net is rather closed in that sense. Java on the other hand has a a very large, enterprise grade eco-system of libraries to choose from and communities to learn from as well.
Practically I agree with the guys about leveraging existing human infrastructure.
Technologically, Java is quite good for non-standard web things - like heavy use of AJAX (GWT, DWR, Comet spring to mind), Mobile (where you generally need lots of session data and less front-end bling), really simple things that are going to be put under immense load (it will definitely trounce Apache mod_XXX every time, the only thing faster in wide-spread use is native code).