Struts vs ASP.NET


Back in December we had an article written describing the differences between Struts and ASP.NET — I’d be curious to get your feedback.  I’ve had a few questions lately around MVC implementations on various platforms and how ASP.NET and ASP.NET 2.0 is approaching the pattern.  Is this relevant to you?  What about UIP?  I’m curious to hear your thoughts and experiences about MVC, UIP, Struts, etc… 

Comments (15)

  1. Anonymous says:

    While I’m reading the article, do you know what this image was created with, aspnet-aspnet-j2ee-struts-02.gif? Half way down.

  2. Anonymous says:

    Don’t know for sure, but my best bet is powerpoint…

  3. Anonymous says:

    I have used Struts for the past 2 years and found the MVC (actually Model 2) pattern that it implements to be good for separating view logic from model logic, with Struts providing the front controller for you. Once you design your model layer well Struts makes it easy to dictate the flow of your webapp. What is really missing is a good event based view pattern implementation. This is what JSF (JavaServer Faces) is hoping to bring to the table for Java developers. Fundamentally ASP.NET and Struts differ in that in Struts everything passes through the Front Controller, whereas with ASP.NET everything passes through the Page Controller. But ASP.NET already has the event driven view pattern implemented. Unfortunately I have not worked with ASP.NET enough to really compare the two. I think JSF will be closer to ASP.NET and allow a better comparison of the Java/.NET implementation approaches. I will make sure to keep up with your blog and see how things with ASP.NET 2.0 are progressing.

  4. Anonymous says:

    I used a modified version of the PAG’s UIP block, and am using it now in my projects. I will probably still use it because it makes better control over the state and the flow of the pages.

  5. Anonymous says:

    Great article!! I have been using UIP for a while and speak about it at user groups (INETA) and conferences (VSConnections). I’m also an ASP.NET MVP, and have a little Java experience but no real Java web dev experience in the past.

    I think UIP it is a great MVC implementation and easy and powerful to use which is why I picked it as a topic for the talks I give.

    I recently got enlisted in a project for a customer who dictated the use of Oracle 9i DB + App Server, so I looked to Struts to get me as close to the ASP.NET experience I was used to as possible. Struts is OK, but as usual in the Java space, even with a homogenous Oracle platform and dev tools (JDeveloper), I found it significantly lacking from a productivity standpoint.

    I think your article and ones like it are a great resource for those of us who may have a lot of expertise in one space or the other, but occasionally have to jump over into the other world and need something like this to put it all in perspective. I wish I had found this article back in December when it was published, would have saved me a lot of independent research coming to conclusions about architecture similarities that are called out nicely here.

    Thanks,

    Brian

  6. Anonymous says:

    dfgs

  7. Anonymous says:

    Brian,

    I read your article a while back and liked it. I am a J2EE developer as well a Struts developer. I think Struts is an excellent model because not only does it truly implement the MVC pattern, but it is highly declarative. Just about everything in an application is controlled by struts-config.xml. This is extremely powerful, for example, when using tools such as XDoclets. ASP.NET is also extremely powerful with its event binding model, and Java is well behind in this area. However, with the introduction of JavaServer Faces, I think you will be in a much better position to compare the two. Regardless, I enjoyed your article and I write a lot myself on my web site about the two technologies. Keep it coming.

    Thanks,

    Mike

  8. Anonymous says:

    i m a former user of Struts and at the moment, i m using ASP .Net.

    i think that Struts and ASP .Net are equivalent

    and offer the same result concerning the ease of designing Web applications and performance.

    but the strengh of ASP .Net is not the language itself, but Visual Studio .Net that allow to build easily performant Web application. In fact, hard coding with Struts or ASP through text files is not the best way in term of project time management.

    The comparison of ASP and Strutus is not set in this technologies which follows the same way, but in the IDE that allows the use of their features. Thus, ASP .Net, with Visual Studio and all the windows services, is advantaged to Struts.

  9. Anonymous says:

    i m doing a project on C# and i have to implement the struts framework in C#. So that a user of .NET can have the facilities of STRUTS framework. Is there some one who can help me?

    i really need help in this matter.

  10. Anonymous says:

    I am researching the best way to implement front controller on .NET, and I am not finished reading this article yet. This article looks promising and I thank you for writing it. I expect it to be quite useful.

    However, I am on page 4 and it is very clear to me that this article has a clear slant toward .NET as a superior product. I expected this, as it is published by Microsoft, but it is still disappointing. I have to ask myself if there are slantings further in the article that make .NET look better than it really is, which might make my development effort more difficult than necessary.

    So far, I agree with a few assertions about J2EE, but I have to point out a few things that are presented with a negative slant, but are not necessarilly so, or are not even true.

    1. You present the J2EE/Struts solution as "merely rearranging existing technologies", while .NET is "a radical shift from earlier application models". It is worth noting that Java/Struts bush-whacked a new path, while .NET saw that path and said "let’s take those ideas, and integrate them". Servlets did not exist before Java, nor did EJB. Microsoft waited until the ideas were defined, then built upon them. Thus, I feel that Java/J2EE/Struts was the departure from previous models, while .NET is the follow-on and integrator of the new model. That is a good thing, which should not detract from Java.

    2. You present the cross-platform nature of Java as a weakness and a source of complexity, while ".NET is Windows" is presented as faster and simpler. I will grant that .NET is simpler due to the integration and re-implementation of patterns forged before and during the Java evolution. I very much want to see that happen more in Java.

    However, Microsoft has merely hidden the complexities, while the Java community is exploring them and resolving them publically. This permits many groups to define various solutions, which I suppose is its own complexity. Choice is complex.

    3. You present J2EE as single-language, while .NET is multilanguage. The truth is, both are multilanguage, and both are primarilly used through a single language (Java and C#). I remember seeing implementations of Perl and Python in the JVM years ago. They just haven’t caught on. That is the market at work. In .NET, I’ve not heard of development beyond VB and C#. Usually, the VB is used by existing VB shops looking to leverage existing knowledge.

    4. You describe J2EE as having less performance due to its multi-platform feature, while .NET is faster. I found from experience just the opposite. I could build and test J2EE complete with EJB on a 500Mhz desktop with reasonable performance. I did the same with .NET 1.0 and litterally could read several paragraphs of an article before it would fire up the development test server instance. Once I got a 3MHZ machine, things seemed rather responsive.

    That’s what I saw by the top of page 4. I have 14 more to go.

    I do not mean for this to be partisan. I think .NET is a good product. I just do not like the spin used to make Java look bad.

    David

  11. Anonymous says:

    I just wanted to get something clear. Maybe the name is not really important, but I guess Struts is using Model 2 and not MVC even tough they’re similar, not exactly the same.

    People often speaks of UIP as a Front Controller, but isn’t it more like an Application Controller.

    About the opinion, I feel ASP.NET as it is, it’s really easy to use and well suited for small apps. I’m new to UIP, but looks like a good alternative to handle applicaction flow. No comments about Struts…..

  12. Anonymous says:

    I just wanted to get something clear. Maybe the name is not really important, but I guess Struts is using Model 2 and not MVC even tough they’re similar, not exactly the same.

    People often speaks of UIP as a Front Controller, but isn’t it more like an Application Controller.

    About the opinion, I feel ASP.NET as it is, it’s really easy to use and well suited for small apps. I’m new to UIP, but looks like a good alternative to handle applicaction flow. No comments about Struts…..

  13. Anonymous says:

    I’ve involved in the develop of a web portal, in only two months. i’ve choosed struts vs. .net because the fact that struts developement is more stable. you can go to your favorite job finder and you can get the best engineers programming in Java.

    Struts is the best web developement frameword at this moment (this can change at any time), and the suggested IDE is Eclipse (free, not very fast but very powerful), with CVS repository, Tomcat web server and your favorite RDB manager.

    but… before you write a only line of code, read how to make web applications with J2EE (servlets, patterns, mvc,…)

    if you can read spanish, go to adictosaltrabajo.com

  14. doug says:

    If you want to see a very clean and impressive implementation of Model2 check out:

    http://www.rubyonrails.org/

    And look at the get excited area. I am a loyal .net developer, but I have to admit ROR is very impressive!