• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

seam contrary to MVC ?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
Am trying to explore SEAM and after looking at the first example my views are ::

Using EL we bind the data to a backed up bean
( advantage being no need to manually set values )

Backed up bean needs to have wo annotations
@Name & @Scope

Action Listener is bound to the UI using a annotation of @In

After looking at all of this * am used to developing apps using struts )

I find struts much cleaner and much more layered

Seam in an attempt to avoid XML seems to have annotations freely thrown around

My understanding is SEEMS totally violates MVC - here the View is configured with Model

I am new and maybe I do not understand the details - but to my novice eye
is SEAM really worth it ?

Also is it app server independent or is it something specific to Jboss ?

People complain about the struts-config file being monolithic - but my arguement is atleast you have all config elements at one place !

Final question - and this frustrates me the most ( maybe I should leave software ! ) - why is there a need to change what works well in struts with the introduction of JSF / SEAM

Am expecting to be smacked over my head - but I need to vent my frustrations !


Regards,
-anagha
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seam is not specific to JBossAS. You can run Seam in any app server.

I particularly like that fact that the View and Model are more integrated. I very much disliked, in Struts, having to use one bean to hold form data, and then to copy, and possibly convert, that data to another bean (typically, a DTO), which was then given to the data (where the data was copied yet one more time). Not only does copying data from one place to another slow the application down, but it also tends to generate more garbage which then has to be collected.

Also, just because the View can make use of the Model objects directly does not mean that MVC is broken.
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, what is your opinion about Wicket?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, but I have not used Wicket. But it is on my list of things to learn.
 
Author
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF follows a more traditional GUI-application MVC pattern, whereas classic Struts follows an MVC2 pattern which is a variation of MVC that is more page based than component based.

Seam acts as the glue between JSF and EJB (and other technologies) allowing you to use an object that has already been populated by one framework in another without having to create copies of you objects or create parallel class hierarchies.

There are several presentations / demos available on the Web. Take a look, and then try to build something yourself and see how you like it.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's ok using MVC, design patterns and all, But we should not lose focus of the task that we want to achieve.
e.g.,We use DTO to transfer data between the layers and to improve performance. While this is correct in theory, very rarely do we make remote calls where this pattern is really needed.
AFAIK majority of the applications do not use remoting. So if Seam allows us to reduce some layers, there's no harm in it. If anyone is comfartable with Struts, they can of course continue to use it.
Also refer to Martin Fowler's treatise on Anemic Domain Models at his website.
 
reply
    Bookmark Topic Watch Topic
  • New Topic