Musachy Barroso wrote:
I was looking to encapsulate all the behavior of the account in an
account object. So the object updates its self.
I'd say must people don't use that pattern anymore.
I see. So I have to get away from OO in order to do this. I have to
create a class called services, that has methods like:
populate (Account acc)
and update(Account acc) and ...
That's fine with me. I was a C language programmer before, and familiar
with 1928 programming style, Where you pass a pointer to a struct to a
method and let it do the operation on it. :)
So, no point in doing things OO ?
That was my question. I have to go through all this coding and write all
these extra classes to be able to update info. right ? And I have to
change the bussiness logic (AccountService) to suit this design.
It pays off to have a persistence layer, instead of mixing it up with you
object model. I'm using JPA on top of Toplink and I'm quite happy with
it,
here is a tutorial, CRUD-like that you might want to take a look at:
I know it pays of, but do I have to learn and use many frameworks to
get a simple application working ?
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
musachy
There must be a way to do this with going through all this extra coding
and framework.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]