Skip to main content
added 12 characters in body
Source Link

I've a Java webapp with these frameworks and I want to know if my implementation meets with MVC pattern:

Controller Layer (V)

I'm using JSF

@ManagedBean
public class Controller{
    @ManagedProperty("#{business}")
    private Business business;

    public void insert(){
        business.insert();
    }
}

Business Layer (C)

I'm using Spring

public interface Business{
    public void insert();
}

@Service("business")
public class BusinessImpl implements Business{
    @Autowired
    private DaoMapper mapper;

    @Override
    @Transactional
    public void insert(){
        mapper.insert();
    }
}

Data Layer (M)

I'm using MyBatis (This java interface is associated to XML file of MyBatis)

public interface DaoMapper{ public void insert(); }

public interface DaoMapper{
    public void insert();
}

My layers implemented MVC pattern? I'm confused :S...

I've a Java webapp with these frameworks and I want to know if my implementation meets with MVC pattern:

Controller Layer (V)

I'm using JSF

@ManagedBean
public class Controller{
    @ManagedProperty("#{business}")
    private Business business;

    public void insert(){
        business.insert();
    }
}

Business Layer (C)

I'm using Spring

public interface Business{
    public void insert();
}

@Service("business")
public class BusinessImpl implements Business{
    @Autowired
    private DaoMapper mapper;

    @Override
    @Transactional
    public void insert(){
        mapper.insert();
    }
}

Data Layer (M)

I'm using MyBatis (This java interface is associated to XML file of MyBatis)

public interface DaoMapper{ public void insert(); }

My layers implemented MVC pattern? I'm confused :S...

I've a Java webapp with these frameworks and I want to know if my implementation meets with MVC pattern:

Controller Layer (V)

I'm using JSF

@ManagedBean
public class Controller{
    @ManagedProperty("#{business}")
    private Business business;

    public void insert(){
        business.insert();
    }
}

Business Layer (C)

I'm using Spring

public interface Business{
    public void insert();
}

@Service("business")
public class BusinessImpl implements Business{
    @Autowired
    private DaoMapper mapper;

    @Override
    @Transactional
    public void insert(){
        mapper.insert();
    }
}

Data Layer (M)

I'm using MyBatis (This java interface is associated to XML file of MyBatis)

public interface DaoMapper{
    public void insert();
}

My layers implemented MVC pattern? I'm confused :S...

Source Link

MVC pattern with JSF-Spring-MyBatis webapp

I've a Java webapp with these frameworks and I want to know if my implementation meets with MVC pattern:

Controller Layer (V)

I'm using JSF

@ManagedBean
public class Controller{
    @ManagedProperty("#{business}")
    private Business business;

    public void insert(){
        business.insert();
    }
}

Business Layer (C)

I'm using Spring

public interface Business{
    public void insert();
}

@Service("business")
public class BusinessImpl implements Business{
    @Autowired
    private DaoMapper mapper;

    @Override
    @Transactional
    public void insert(){
        mapper.insert();
    }
}

Data Layer (M)

I'm using MyBatis (This java interface is associated to XML file of MyBatis)

public interface DaoMapper{ public void insert(); }

My layers implemented MVC pattern? I'm confused :S...