On Tue, 15 Oct 2013 19:06:17 -0300, Martin Kersten
<martin.kersten...@gmail.com> wrote:
AFAIK, just set the tapestry.production-mode symbol to true and service
reloading is turned off.<
Wasn't this also turning of the template realoading and Page/Component
replacement? Which I would like to have enabled.
See my other e-mail for the solution.
This way I rather use no reload capability at all. But sometimes it
happens.
You could just not change the service implementation while performing your
tests.
How can I inject a concrete implementations?
The same way you inject interface-based services. You just need to declare
the service without specifying a service interface.
binder.bind(YourConcreteService.class);
Please do not lecture me on OOP :-)
I love lecturing! I can't help it! :P
I did my share with doing this
Interface first programming style in 2001 (i guess) - programming only
with public interfaces and public static factories for several weeks to
get into and adopt this style. So if I do not want to use interfaces at
all it has a good reason and is fully in line with OOP and IOC you can
trust me.
No, I don't trust you for this one, reasons below.
Today I am totally against using interfaces for services as long as you
control the code and also are the end user of your code. It is simplier
and clearer.
Now try to write an unit test.
No additional interface to document, maintain and to describe
Wrong. If you need to document the interface well, you don't need to
document the implementation, except for specific implementation details.
That's what the Tapestry sources do, by the way.
something you already see in the interface.
I have no idea what you're talking about. "No additional interface to
document what you already see in the interface?". I'm not following you.
Also it makes everything feel stiff and decoupled in a not useful way.
Stiff is the opposite of decoupled. And interfaces are quite useful, but
I'm not really in the mood of explaining why. OOP and IoC already do that
for me.
So Yes it is good to have services around but it is depressing having an
IOC that forces you to use service interfaces instead of concrete
instances, makes no sense and feels overly complex ...
What IoC you're talking about? Tapestry-IoC it isn't, as it doesn't force
you the write service interfaces. Never did.
PS: you mentioned this its against OOP thing quite some times. Stop doing
so. OOP is something different then a style. Its a way to decompose and
model reality (well a section of it). Thats all. Nothing about style.
There is some measure of good and not so good OOP but this is well...
style.
Maybe I've not chosen the appropriate word, but I stand by what I said.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org