Slashdot Mirror


JSF vs ASP.net

DuncanE asks: "We are looking at migrating an old legacy database application to a newer web based framework for the front end. For me the two obvious choices are ASP.net vs Java Server Faces. CodeGuru has side by side look at both, but does anyone have any real world comparisons? ASP.net appears to be MS only, which is a concern, depending on how mature mod_mono has become." Which framework would you prefer to use? Under what situations and conditions would you recommend the use of the other?

23 of 107 comments (clear)

  1. DOS isn't done til Lotus won't run by B5Fan · · Score: 4, Insightful

    As soon as Microsoft decide that Mono is good enough to make enough people think of moving away from Windows, I think they'll try to change .Net to prevent it.
    AFAIK The only issue with Mono currently is that MS-specific security doesn't work under Mono, because it relies on Windows.
    I suggest that if you want to be able to run on something other than Windows, be careful about choosing .Net. It may still turn out to be a good choice, given that there are probably more .Net developers available, provided that you've taken into account aspects like security.

    BTW The only programming I do is .Net (in New Zealand), and this is being written at home with Firefox on Linux.

    --
    Borg:"Lawsuits are irrelevant. GPL3 is irrelevant. DRM is good. We understand security... Alert! MS are assimilating us!
  2. I haven't worked with both, but.... by free+space · · Score: 5, Informative

    I think Java would be a more 'safe' choice.
    Java Server apps can run on multiple operating systems, multiple servers, and in the extreme case of Sun not supporting it anymore ( or not adding a feature you want) you've got tons of big companies pushing it, like IBM and others, in addition to open source implementations like GNU classpath. Not to mention that you can implement 100% of your solution without paying anything.

    ASP.net, on the other hand, is a Microsoft solution, and you depend on the whims of MS for everything. It runs on little more than Windows/IIS, and the only serious IDE for it would be Visual Studio.net, and good luck trying to run it under mono if you favorite class or function is incomplete or has a bug in its mono implementation ( or the MS implementation for that matter).

    I think that the Java and .net solutions are somewhat similar in the quality of their solutions, and that any marginal difference in quality, if they exist, would have no impact compared to the freedom of choice Java provides.

    1. Re:I haven't worked with both, but.... by free+space · · Score: 5, Informative

      Well, I wasn't saying Java web apps are better than asp.net, merely saying there is more choice available (and I'm a .net developer,but I develop desktop apps).

      If I want a .net IDE I have to buy VS.net or Delphi, or download the open source sharpDevelop. If I want to develop for Java, I have a much broader choice: netbeans, eclipse, IDEA, JBuilder and complete product families from IBM,Oracle or BEA.

      Same for running the apps: I can either choose from IIS or Apache/mod_mono for .net, but Java has a dozen or so platforms to run on, which vary in power and cost.

      As for my comment on "good luck if there's a missing function in the mono implementation" , it wasn't anti MS zealotry but a practical remark: whenever I check the mono status I get a chart which says "class so and so is implemented and function so isn't". It really worries a developer when he sees that the project is incomplete to the level of functions in the libraries he'll be developing with[1]. My point has nothing to do with Microsoft, but a simple remark that mono isn't mature enough yet.

    2. Re:I haven't worked with both, but.... by ultranova · · Score: 2, Informative

      "ASP.net, on the other hand, is a Microsoft solution, and you depend on the whims of MS for everything."

      Spoken like a true anti-MS bigot.

      Spoken like a true astroturfer.

      "It runs on little more than Windows/IIS"

      I guess if you consider Linux/Apache "little more" the Windows/IIS then that statement is true.

      Several times more, at least in Web server arena, according to Netcraft. 69.97% for Apache vs. 20.92% for IIS.

      "and the only serious IDE for it would be Visual Studio.net"

      And it's probrably one of the best IDEs available. This is the one categoy that MS really pwns the competition, their IDEs are awesome.

      Which may or may not be true, but doesn't change the fact that this still acts as another lock-in tie to Windows.

      "and good luck trying to run it under mono if you favorite class or function is incomplete or has a bug in its mono implementation"

      Yes because when running a completely non-MS related open source solution you will never find a bug or incomplete functionality. If you're going to pimp OS, do so across the board. Not this "OS roxors, except when it deals with Microsoft!" bantor.

      It is obvious that the parent is talking about compatibility. If a program depends on bug in .NET, and Mono doesn't have that bug since it implemented it according to the documentation, not actual testing with all possible inputs, the program won't work.

      And Microsofts operating systems do suck, especially when used as servers; making a server application with a language that would tie you to Windows is a very bad idea.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    3. Re:I haven't worked with both, but.... by jbrannon · · Score: 2, Informative
      If I want a .net IDE I have to buy VS.net or Delphi, or download the open source sharpDevelop. If I want to develop for Java, I have a much broader choice: netbeans, eclipse, IDEA, JBuilder and complete product families from IBM,Oracle or BEA.
      Actually, you can download MS Visual Web Developer 2005 Express for free here: http://msdn.microsoft.com/vstudio/express/vwd/ I've used it pretty extensively, and it seems pretty full-featured. Of course, it's Windows only, so if you want cross-platform, something else would be in order.
    4. Re:I haven't worked with both, but.... by cecom · · Score: 2, Informative

      The debugger is debatable, I think they're about on par, although VS has only just (finally!) gotten edit and continue.

      Ahem, Visual Studio 6 had "Edit and Continue", and it has been out for, what, 7 years now ?

      Other than that small correction to your post, I think that MS have nothing interesting to offer in that area anymore. Only people who haven't tried Eclipse think that MS still has an edge in IDEs. Also, don't forget that besides being free, Eclipse is also Open Source, which means bugfixable, easy to write plugins for and infinitely extensible.

    5. Re:I haven't worked with both, but.... by Randolpho · · Score: 2, Interesting

      Sorry, I should have been more clear. Visual Studio 2005 now has Edit and Continue for .NET/C#. It has not had it up until it launched last November.

      As for the IDE, I have indeed used both, and prefer Visual Studio. Don't get me wrong; Eclipse is a very good IDE. VS is just better, IMO. I've already detailed the real differences between them; the rest is look/feel, responsiveness, and general user experience. Eclipse is great, but VS is better.

      It's like the difference between MS Office and OpenOffice.org. OpenOffice.org is damn good, especially for the price, but MS Office really is better. I find that the only people who ever argue otherwise tend to be closed-minded about anything MS-related.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
  3. What The Fuck? by Saeed+al-Sahaf · · Score: 4, Funny
    The provided link: If you develop web applications you have probably heard the names JavaServer Faces...

    My web apps must be crap, because I've never heard of "JavaServer Faces".

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:What The Fuck? by 0kComputer · · Score: 2, Insightful

      Yeah, check out the foot note on the author

      About the Author A Senior Consultant with Sogeti LLC, Michael has spent over 7 years in IT, specializing in J2EE and Oracle analysis and development.

      wonder which platform he's rooting for? The article was a piece of shit anyways, a few screen caps of the IDE's doesn't make for a good comparison of frameworks.

      --
      Top 10 Reasons To Procrastinate
      10.
    2. Re:What The Fuck? by gimme00 · · Score: 2, Funny

      You take a black marker and draw little faces on your java servers! dohhhhhh!

    3. Re:What The Fuck? by gowen · · Score: 2, Funny

      My web apps are crap, because I use JavaServer Faeces

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  4. What are you and your programmers familiar with? by BadAnalogyGuy · · Score: 5, Insightful

    These kinds of decisions ought to be based on what you and your colleagues are most comfortable with. Java? C#? Perl/Python? You certainly wouldn't try to run a marathon in brand new shoes!

  5. Either by Artega+VH · · Score: 4, Informative

    Both are a good choice if you want to properly engineer a new web-based tool. ASP.NET is probably quicker but if you want to do anything really serious you'll probably want to look at purchasing Visual Studio 2005 rather than just using the Visual Web Developer Express. Also the tool support for JSF isn't nearly as mature so it will probably take longer to implement in JSF than in ASP.NET.

    Having said that JSF is still a good choice - particularly if licensing costs and portability are an issue. Apache MyFaces is an excellent framework whose only downside is the poor documentation. JSF can be slower to get started with but I found that it enforces best practices more strictly and once you get the hang of all the XML wiring it wasn't that bad. Another benefit of JSF is that you'll have trouble breaking the MVC pattern but you can pretty easily embed alot of code in ASP.NET unless you properly use code-behind and deliberately seperate out the DAL which isn't the default for the point and click wizards (the DAL separation).

    In the end it comes down to a few things. If you have existing C#/VB skills and don't mind being stuck with IIS then go for .NET. If portability is a big issue and you'd really like to run this application on a small server running Jetty(for instance) then go for JSF.

    --
    groklaw, wired and slashdot. The holy trinity of work based time wasting.
  6. Re:neither? by Johnno74 · · Score: 4, Insightful

    Dude, ASP.Net is a massive leap foward from classic ASP. The difference is night and day. Benchmarks are pointless, but in my experience its 5-10x faster than ASP.

    Its also much, much more productive to develop, and support. Its a nice stable, extendible extendible object-orientated framework that can give you most of a website with very little code (asp.net 2.0), or it stays out of your way if you'd rather do it yourself.

    IIS has also moved on a LOT since NT4 as well. Its much, much more stable and secure.
    With ASP and NT4 remember you are talking about technologies that are about 10 years old now.

  7. I'd recommend Java for several reasons. by TechieHermit · · Score: 5, Informative

    In terms of being able to create and serve a web page, either one would probably WORK, but I think Java is a much better platform. Let me share with you my reasons why, keeping in mind that I'm a professional developer with eight years of production experience. Also, I've developed on Apache (straight HTML and some CGI), JSP (on Red Hat servers with Apache Jakarta), ASP3 (IIS with COM+ middleware and Oracle backend), ASP.Net with web services AND some COM+ middleware and oracle backend, and now, Oracle 10G with Java everything (basically).

    First of all, every platform in use supports Java, and you can download almost anything you might want to use for free. This is going to save you a bundle. YES, I know that technically Mono is sort of .Net-ish, and it's free, but I don't think Mono matches the sheer breadth of Java offerings you can acquire at zero to no cost. Java buys you almost complete freedom from vendor lock-in, if you play your cards right. .Net, in comparison, is vendor lock-in INCARNATE.

    Second, Java has an amazingly rich class library. If you can think of something you might want to do with a computer, there's a java library in there somewhere which will let you do it -- usually relatively easily, too. Although C# is approaching this level of functionality, I don't think it's exactly equal with Java yet. Close, maybe, but I think Java still has a little edge. Which makes sense, when you think about it -- Java's been around for several years longer.

    Third, most major vendors are now completely behind Java. Sun, IBM, Novell, and Oracle, for instance, are all putting their collective might behind the platform. That's pretty significant. It means that new innovations from these companies are going to be available in Java FIRST. Also, when you're ready to ramp up to big iron, you're more likely to be able to do so with Java, because all the big players there are Java shops.

    Fourth, you can download Oracle Express for free, and use it with Oracle's Java developer's tools to build a rather interesting type of system. Oracle's considering an interesting approach here; give away the low-end database so that as companies grow they think about going with Oracle first. That's pretty good business; be generous first, so you'll be thought of when it's time to purchase something big. And this can work for you.

    Fifth, the same skill set your developers use to create Java-based apps on your web server can be used to program just about anything from a Microwave to a PDA to cars and trucks (believe it or not, yes Java's finding its way into some vehicle systems). Java's everywhere these days; the language is the same, only the API changes. That makes your Java skillset very portable.

    Finally, I think JDBC is a little nicer than Microsoft's database approach. I've programmed both ways, and I like the Java approach better. It's easier, for one thing; I write less code working with Java (YES, I know, it's astounding, but nontheless true).

    I could go on, but you see where I'm going. Java's the nicer of the two platforms, and you can't really go wrong choosing it.

  8. Re:It all depends on your existing skillset by d-rock · · Score: 2, Interesting

    Just a comment on the portability issue. I completely agree that sometimes having to move an app between disparate systems may mean that someone didn't plan well, but there are also situations where it means you can leverage your assets. For instance, where I work I developed a small network monitoring/reporting application for our help desk to handle 200 or so sites. At the time I wrote it (3 years ago), we had a spare windows 2K server running on older hardware that was otherwise going to go unused, so we ran it on that. It ran great. Over the past 3 years we have increased the number of sites we monitor to close to 1000, and it wasn't running so well on the old PII server. However, an unrelated project freed up a Sun e450 4xCPU box and we moved the application there with literally zero changes and it runs great on that box (along with several other apps). The windows box has been repurposed as a backup DNS server now (running portable BIND, incidentally).

    In this case the portability factor allowed us to fully utilize the hardware we had, instead of having to spend big bucks on a larger wintel server. I'm not saying Java has a monopoly on portability, there are lots of languages that make it trivial or fairly easy to move between platforms; however, if I had written this in C# or some other .Net language I'm not so sure the transfer would have gone as smoothly.

    Derek

    --
    Don't Panic...
  9. More choices by LarsWestergren · · Score: 2, Informative

    If you go with Java, there are plenty of other choices than JSF. Struts, while a bit verbose and showing its age, is a very mature framework that scales well and has been used successfully in lots of projects. A lot of people recommend Tapestry or Cocoon. It all depends on the size of your project and what people are experienced with.

    A good thing with Java, no matter which framework you choose, is that you have a huge number of open source tools and libs to help you (Eclipse, Netbeans, JUnit, Ant, Maven, CruiseControl, JMeter, PMD, Checkstyle, xdoclet, Hibernate, Spring, Tomcat, commons logging, jsch...) , and there are also plenty of books, online tutorials, and programmers around who know Java.

    --

    Being bitter is drinking poison and hoping someone else will die

  10. Re:neither? by LarsWestergren · · Score: 5, Insightful

    Both have a reputation for being slow, insecure,

    Maybe on Slashdot... Java has an excellent track record for security. Compare with the PHP worm that swept the net, or PHP based framworks like NukePHP that are hacked so regularly that sites are unusable. .Net I haven't kept up with, so I don't know how they do security in real life.

    Server side java is REALLY fast. On artifical benchmarks, java can be as fast as C++, and these people wrote a high performance Linux cluster monitoring tool in Java.

    If you need more proof, Java is now the preferred language for Boeing when doing mission critical and real time software. NASA used it during the Mars mission...

    and proprietary.

    You can join the Java Community Process for free as an individual and vote for how future versions of Java will look like, Sun has handed over control over just about everything but the Java trademark to this JCP. There are also plenty of open source implementations of compilers and JVMs. Sun keeps donating stuff to the open source community. DTrace, Solaris, 1600 patents, cryptography tech....

    --

    Being bitter is drinking poison and hoping someone else will die

  11. Have you considered WebObjects? by plsuh · · Score: 2, Informative

    If you're looking into alternatives, perhaps you should consider Apple's WebObjects. It's essentially what JSF is trying to be, along with a robust, mature, *lightweight* JDBC object-relational mapping and object persistence layer that is scads more mature than Entity EJB's. Pure Java, runs on J2SE 1.3.1+, deployment licenses amount to $499 per server (free with XServes). It's also highly scalable -- this is the technology that drives the Apple Store online, the iTunes Music Store, and Apple's .Mac service.

    --Paul
    (disclaimer -- I work for Apple; however, I've been doing web development using ASP, J2EE, and WebObjects for years. IMHO WebObjects is far more elegant and robust than the alternatives.)

  12. Re:JSF by bloodredsun · · Score: 2, Informative

    FileUpload from jakarta would be used for that as it's pretty much the de facto choice. There are other options like javazoom but it's an easy add-on. The apparent lack of a file upload control is probably reflective of the fact that Java allows multiple ways to do the same thing (which can be very confusing to someone new to the field) where MS products tend to have all the features included whether you use them or not. The JSF user community is not that small and is growing (although there are about 10x as many Struts jobs as JSF jobs currently in the UK) so it's one to take seriously.

    The back button is an issue with JSF and is another reason why I use Struts for java web apps alongside it's easier integration with JSTL and greater maturity.

  13. JSF hard to develop by DeadSea · · Score: 3, Interesting
    I have a small project at work that I inherited that is written in JSF. It is a pain. Don't go there. I have problems with JSF:
    1. Non-existant error reporting: If an exception is throw by the code backing it up, the error message on the front end will be something like "Exception: '{mycomponent.dosomething}'". Which really means that dosomething threw some other exception that it is hiding from you.
    2. Everything is a post: JSF tries to apply MVC to the web, which is fundamentally broken IMO. The web is transactional, not event driven. To make it appear that everything has callbacks, all the links in the web app are done by making javascript submit a POST form for the page. Much harder to debug than any other web app that I've ever worked with. You can't just see the params on a GET url and expect links to work like every other link on the web
    I've never used ASP though, so I can't really compare. Myself I prefer servlets that spit out XML and use XSLT to give HTML. The designers don't seem to like the XSLT much though.
  14. Re:JSF by MemoryDragon · · Score: 2, Informative

    Not really, unlike ASF.Net JSF is just a specification, you get stuff like date controls file upload controls etc usually from component packs. If you want a good out of the mill solution in JSF with most components you need, start with MyFaces.
    The usual mistake many people do with JSF is that they just look at the RI and then dismiss it as all there is, while literally hundreds of components linger around on the net for free and about the same amount in commercial solutions.

  15. Re:JSF by MemoryDragon · · Score: 2, Informative

    Things are moving fast in the apache world, actually the controls are not very buggy anymore (You probably checked then out a while ago). Much has been done in the last year. for a good demo check this: site out.