>
> If, for example, I've an application with a rich client interface
> (e.g. builded using gwt) that interacts with, let's say, with a
> Session Facade..(ejb, spring, or whatever).
> My Model is composed of services and a typical persistence layer...
> now hypothesize that everything is well done, i.e. services reflects a
> business decomposition etc..etc...
> Isn't this a good solution? Is this SOA? Is this MVC?
>

I think what you are describing here is an industrial strength Java EE
+ GWT architecture for a system that is fully capable of
*participating* in an SOA since all the business services (EJB/Spring
based, whatever) can be exposed in multiple ways to third party
systems as required, including an ESB supporting an SOA environment.
An application server like JBoss, for instance, has a plethora of
tools to help you do this (including it's own ESB as it happens), and
I think Spring is the same.

MVC is another matter, and IMO it is another buzz term that means all
sorts of things to different people. MVC was originally invented
during the Apple Lisa project (the first real WIMP framework) in the
early 1980's I believe, and I think it was implemented in Smalltalk,
one of the first "proper" OO languages, which was specifically
designed to support MVC. Struts is most definitely MVC:
JSP==View;Action==Controller;Bean==Model etc. But it has to be that
way to run the cycles of pages in the application.

However in GUI programming environments the role of Controller becomes
moot, or confused. Swing, for example, is often accused of not being
"true MVC" because there is no real enforcement or even encouragement
to cleanly separate a View (i.e. a widget) from a Controller, whatever
that actually means in the context of a client GUI.

For a GWT example, suppose you have a Tree, you select an item from it
and you want to display some details about that item in second panel.
You might have the widget containing the tree implement
SourcesChangeEvents, and the display panel implement ChangeListener,
so the display panel is notified when user selects a Tree item.
DisplayPanel has its onChange(Widget sender) method called, retrieves
the item identifier from the sender (the Tree) and calls an
asynchronous RPC service to get the details. RPC servlet calls, say, a
Session EJB to fetch the Model object concerned, then returns it to
DisplayPanel callback onSuccess(object result) method, from whence
DisplayPanel can populate its fields.

As you can see the "Controller" element is split up all over the place
because what you have here is a distributed n-tier architecture with
an AJAX UI, and, unlike Struts, it doesn't fit neatly into pure MVC.
The same sort of thing happens with Swing/SWT. In the Apple Lisa days,
I think it was assumed an application would either run pretty much all
on a server to a dumb client or alternatively pretty much all on the
client just accessing maybe a database sever, so the original MVC
didn't really cater for all this.

This is not to say that you cannot implement pure MVC in a GWT client
(I think there are projects around that directly support this) but it
can take extra effort that may not really be worth it. One case where
true MVC does earn its dinner is where you have a complex model
(something like a work flow process for example) which supports
multiple views, all of which might update it and all of which need
notifying of changes to it. In this case the Views should interact
with the model via a Controller only or you will end up with
unmaintainable spaghetti.

I have no idea what MVC has got to do with messaging. Perhaps ESB
vendors would like people to think of their message buses as
Controllers, and in the multi-system business process scenario
discussed above they undoubtedly are, but MVC usually refers to how a
UI interacts with the Domain Model.

regards
gregor




> My idea is that, FROM A PRACTICAL (implementation) point of view, SOA
> can be (also) simply a way to think about the Model, in a reusable and
> loose-coupled way and can be a very good solution even without going
> to complex message-based MVC.
>
> On Jan 15, 9:53 am, Paranoid Android <[email protected]> wrote:
>
> > Thank you gregor, I think your advices could be very useful to me.
> > My biggest concern, anyway, is not to run on multiple clients. Even if
> > I can't discard this possibility by now, it has not yet been
> > identified as a requirements of the application.
> > The biggest concern is to expose a set of features that future
> > developers that want to add some higher level functionalities can use
> > with no or minimal changes to the underlying architecture.
> > As I said, specifically to the domain of the application, something
> > pretty similar to Google OpenSocial Apis, but using standars like web
> > services.
> > This is the biggest concern, than the system should be scalable and
> > maybe distributed, so the architecture must be
> > thought in a way that it will not be a problem if users scale from 100
> > to 100000.
> > This is the general picture. So, thinking about it, maybe an ESB is
> > not really what I need, anyway I must expose feature both locally and
> > remotely and thus I'm going to look for other technologies to achieve
> > that, maybe EJB's as you suggested..
> > Only a thing make me doubtful: the project manager suggest that a
> > message/event driven architecture may be a better solution over a
> > classical MVC architecture, but I can't find another solution for a
> > good message driven solution other than an ESB..
>
> > On Jan 14, 7:06 pm, gregor <[email protected]> wrote:
>
> > > Paranoid,
>
> > > 1) ESB's are good at, and designed for, orchestrating business
> > > transactions across multiple third party systems that otherwise could
> > > not talk to each other easily, whilst providing clients with a single
> > > view of and interface with that process. Other than that, they offer
> > > nothing really. By now you probably get the impression that I think
> > > you need an ESB like you need a hole in the head!
>
> > > 2) You should adhere to YAGNI. For each iteration of a project you
> > > should define precise objectives for each use case you intend to
> > > implement *for that iteration*, and equally important you should
> > > define non-objectives (constraints), things you are definitely not
> > > going to do this time, if ever. Then you do not write a line of code
> > > nor use any library that does not directly contribute something
> > > tangible to these stated objectives, and secondly you meet these
> > > objectives in the simplest and quickest way you possibly can. That's
> > > so you get feedback from real users as early as possible which will
> > > almost certainly give you some surprises.
>
> > > For example, it seems to me that one of your biggest concerns is
> > > running on multiple clients, e.g. mobile devices, as well as standard
> > > browsers. OK, so you might define an primary objective that the system
> > > must be fully functional for a given set of use cases in both a
> > > standard browser and on, say, an iPhone, something running Android, or
> > > whatever. By doing that you will a) focus your development effort on
> > > practical application of the technologies you need to use to meet this
> > > specific objective, and b) your server side architecture will
> > > automatically evolve to support these two different client interfaces
> > > as the practical issues become clear to you. Subsequently adding a
> > > third or fourth will then be straight forward, but you don't have to
> > > worry about that now.
>
> > > If you don't focus like this, you are in danger of never really
> > > getting started, never mind finishing.
>
> > > regards
> > > gregor
>
> > > On Jan 14, 4:30 pm, Paranoid Android <[email protected]> wrote:
>
> > > > Thank you gregor, your post is very interesting and I basically agree
> > > > with your point of view.
> > > > Cause I'm a newby in SOA solutions, I'm reading and reading things and
> > > > asking to more expert people like you.
> > > > In fact I think I need little of integration of different systems (no
> > > > legacy systems to integrate etc....).
> > > > But the key in my project is that I must provide interfaces for the
> > > > future development of functionalities, in a similar way as OpenSocial
> > > > by Google does, but using other standards.
> > > > So my project is not "completely SOA", in the sense that not
> > > > everything in my system must be distributed, orchestred, exposed etc,
> > > > but a portion of it does.
> > > > I though that ESB's like, for example, Apache ServiceMix can be useful
> > > > because they provide a way to implements services as POJO's and take
> > > > care to expose remote interfaces (bindings) for different types of
> > > > consumer that will be developed in the future and because they provide
> > > > a way to route messages through services etc..
> > > > But I'm wondering if they provide a way to interact with services that
> > > > are local through a local interface (i.e. the model inside my app will
> > > > interact with such services through a local interface exposed by the
> > > > ESD, while other remote consumers that will eventually be developed in
> > > > the future can access these services through, for example, REST or
> > > > SOAP without the need to wrap these functionalities).
> > > > For these reasons I'm thinking about a SOA solution, even if not
> > > > everything will be a service etc...
> > > > The general, high level architecture I'm thinking about is something
> > > > like this:
>
> > > > GWT Interface that, through RPC, communicates with a client layer,
> > > > such as servlets.
> > > > This layer interacts with an ESB (if needed) to invoke services in a
> > > > easier way , these services can be remote or local to the server, but
> > > > mostly they will be local.
> > > > Under this layer of services, there will be, obviously, a persistence
> > > > layer with an optional ORM layer (like Hibernate) in beetwen.
>
> > > > From this point of view, one can argue that I don't need web services
> > > > at all..
> > > > But the key here is that I've to expose features (for example, access
> > > > to users profiles in the virtual communities) to applications that
> > > > will be developed and intergrated in the solution in the future, or
> > > > maybe to a mobile interface...
> > > > Something similar, as i've stated before, to OpenSocial.
> > > > Than I need flexibility. Even if the system is not highly distributed
> > > > now, I can't say that it will not be more distributed in the future!
>
> > > > What do you think?
>
> > > > On Jan 14, 5:10 pm, gregor <[email protected]> wrote:
>
> > > > > @Pananoid
>
> > > > > You may be interested in this post from The Server Side about SOA.
>
> > > > >http://www.theserverside.com/tt/articles/article.tss?track=NL-461&ad=...
>
> > > > > In it the author states:
>
> > > > > "SOA has thus come to be associated primarily with integration of
> > > > > systems. But what if I am building a new application that has little
> > > > > to do with integration? Say I'm building a Business Intelligence (BI)
> > > > > tool for analyzing and reporting on data from a data warehouse and
> > > > > have no requirement to integrate any legacy systems, expose any Web
> > > > > Services, or provide any BPEL processes. Is SOA relevant in the design
> > > > > of such a system? Would I apply any SOA principles in architecting
> > > > > this application? Would it make sense to say that my new system's
> > > > > architecture is SOA-based? The answer to all of these questions is
> > > > > "Yes"
>
> > > > > Well, I completely disagree with that. IMO it is an example of the
> > > > > sort of hype and nonsense you tend to get around SOA. Examples:
>
> > > > > 1) Using SOAP interfaces and employing a SOA framework (e.g. an ESB)
> > > > > where none is needed imposes a large processing overhead that will
> > > > > reduce performance, possibly by orders of magnitude.
>
> > > > > 2) SOAP interfaces are much more difficult to change than Java
> > > > > interfaces. Say I want to change a GWT RPC method by adding an
> > > > > additional parameter. I simply select the method in the RPC interface
> > > > > in my Java IDE, select "refactor" which updates the asynch interface
> > > > > and the implementation automatically, and edit the code in the RPC
> > > > > service implementation to use the new parameter. Job done. Try doing
> > > > > that sort of thing with a SOAP interface.
>
> > > > > Against this the author puts up the (IMO extremely weak) argument that
> > > > > a SOAP interface +  SOA infrastructure "is keeping the mode of
> > > > > provisioning of a service separate and independent". What on earth
> > > > > does he mean by that? He cannot mean the
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to