Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am planning learning Model-View-Controller (MVC) development using Java. While reading I came across a post which mentions java.util.Observer and java.util.Observable for MVC development.

As I never heard of it before, upon more googling I came across this SO post, which discusses some design flaw with the above-mentioned classes.

My question now has three parts

  1. Are these classes still used in Industry for MVC development (except Eclipse as mentioned in the SO post)?
  2. What are the flaws with these classes and why/why not should one use them?
  3. Are there some ways MVC projects are developed in industry? (would be nice if you can answer this in general terms, NOT looking for answers like SPRING :P ) [edit: both for desktop and web applications]
share|improve this question
    
About the third question, you mean only MVC for desktop applications or also for web applications? –  Vitalij Zadneprovskij Apr 27 '12 at 21:30
    
@vitalik I did not think of that variation when writing, but now as you mentioned it, it would be nice to know what is the industry-standard for both :). Thanks for pointing that out. –  Ankit Apr 27 '12 at 21:44
add comment

1 Answer 1

I will answer only about web development.

Apart from the rare cases when you use JavaFX, you usually don't have Java code running on the client machine. This implies that you can't implement the Observer interface. Usually your view is HTML and javascript.

A recent trend in web development is using MVC implementations written in Javascript, like JavascriptMVC, Backbone.js, Knockout.js, and many others. This goes even more far away from those interfaces.

Also recently, Google proposed the usage of the Model-View-Presenter pattern, that is a modification of the MVC.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.