[Design of Messaging on JBoss (Messaging/JBoss)] - Re: New package structure
by timfox
"ataylor"
That was my point, we shouldn't be Dependant on the implementation for anything if we use interfaces. If its pluggable it should be an interface and should be injected, if it isnt, then do we really need an interface?
Just playing devils advocate! :) [/quote wrote :
|
| It's not all or nothing.
|
| Being dependent on the implementation on the implementation in one place (at construction) is better than being dependent on the implementation in N places (each place the class is used), so it's an improvement.
|
| Also, other advantages:
|
| 1) Makes testing a whole lot easier since can easily create mock / fake implementions
|
| 2) Makes code easier to read / understand
|
| 3) If user wants to create their own implementation of the interface they can. If it's a concrete class they'd have to extend that class. That may not be possible desirable.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132489#4132489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132489
17 years, 10 months
[Design of OSGi Integration] - License headers
by adrian@jboss.org
John,
The license headers need to look like this, including your name in the @author tag.
| /*
| * JBoss, Home of Professional Open Source
| * Copyright 2008, JBoss Inc., and individual contributors as indicated
| * by the @authors tag. See the copyright.txt in the distribution for a
| * full listing of individual contributors.
| *
| * This is free software; you can redistribute it and/or modify it
| * under the terms of the GNU Lesser General Public License as
| * published by the Free Software Foundation; either version 2.1 of
| * the License, or (at your option) any later version.
| *
| * This software is distributed in the hope that it will be useful,
| * but WITHOUT ANY WARRANTY; without even the implied warranty of
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
| * Lesser General Public License for more details.
| *
| * You should have received a copy of the GNU Lesser General Public
| * License along with this software; if not, write to the Free
| * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
| * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
| */
| package org.jboss.test.bundle.support;
|
| /**
| * TestMainDeployer.
| *
| * @author johnbailey
| * @author <a href="adrian(a)jboss.com">Adrian Brock</a>
| * @version $Revision: 1.1 $
| */
| public class TestMainDeployer implements MainDeployer
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132478#4132478
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132478
17 years, 10 months