0

When to use MVC/MVVM

asked 2014-09-21 08:01:45 +0800

Timotius gravatar image Timotius
13 2

Hi, We are planning to move our current Oracle Form application to Java. After some researches, we decided to use ZK, myBatis, and Spring.

However, I still need suggestion about whether we should use ZK MVC or MVVM pattern.

Here are our current application and man power description :

  • Built on Oracle Form 11 There are about 6000 forms right now
  • Basically, most of our programmers (about 60 from 64 employees) know very little (or none at all) about java, OO concept, or OO design pattern. However they are very good on Oracle Forms and PL/SQL
  • Our current application logic basically bound to PL/SQL based logic. For example, when user press "Calculate" button, the bitton will call PL/SQL codes or oracle stored procedures to calculate outuputs, and based on those outputs, application will change UI (disable/enable field, redirect to other form, etc)
  • For future (1-2 years ahead), we will create mobile application that possibly using same logic as web application, maybe using ZK too
  • Logic in one form may refer to other form in other module, i.e. logic in financial form may need logic from marketing form

My question is :

1. considering our current application and man power technical competency as stated above, which approach is better? MVC or MVVM?

  1. Actually, When to use MVC or MVVM in a real world applications? What is the best practice?

Thanks in advance

delete flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-21 15:27:16 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

updated 2014-09-21 15:29:56 +0800

Your situation Looks like my case before one year. One year before, i am very new ZK, Hibernate, Spring and Java, etc. Basically i am Microsoft guy , but looked for the opportunity to fell into java world. After looking ZK, i am excited and started learning all the stuffs and now i am good java developer i think so :). My Choice is always MVVM, the main reason is because, it is purely separated from your design and business logic.

You can find lot of examples in my blog here.It is full of MVVM stuffs http://emrpms.blogspot.in/

If you are interested, i can join with you as consultant and can help you at the start up stage.

link publish delete flag offensive edit
0

answered 2014-09-21 08:49:43 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2014-09-21 11:36:28 +0800

It's just an different approach.

At codeproject.com you can find some explications about it.

Personally I prefer MVVM. You don't have to wire your elements and it's very easy to learn.
All mine applications I develop for the moment are in MVVM.
Older projects where I get new UC => also MVVM.(Even when base project is MVC, cause you can mix it but I'm not saying you should mix it for a new project.)

Greetz chill.

link publish delete flag offensive edit
0

answered 2014-09-21 09:59:29 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Timotius,

At the following url you can find a lot of information regarding MVC vs MVVM:

http://books.zkoss.org/wiki/ZKDeveloper'sReference/Overture/Technology_Guidelines

Furthermore in the following url there is also a presentation and discussion around this topic:

http://books.zkoss.org/wiki/SmallTalks/2011/December/MVVMinZK6:inContrasttoMVC

In general i would recommend mvvm, but there are some specific scenarios where mvc would be better such as:

  1. Performance
  2. Creation of custom grid's, listboxes, etc where you build dynamically the components and the model (Can be applied if in your application the oracle views change frequently)

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2014-09-22 08:11:18 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

IMO the MVVM appoach is much more productive than MVC. I am not saying that MVVM is the silver bullet for everything but i think it can be used to produce more than 80% of a system fast and efficiently. In some cases you may need to have a more "low level" control over your page rendering so you may need to use the MVC approach. Don't worry. Start using the MVVM model and as the project goes on, you will discover very naturally these modules where MVC is better.

We have just finished a new module written with ZK (about 20 pages). Only one page was needed to be written with MVC because it is actually a grid with dynamic columns realized during the runtime.

And a last word... maintenance. The maintenance and change management of modules written with MVVM is easier and safer.

Costas

link publish delete flag offensive edit

Comments

I totally agree with you Costas

Senthilchettyin ( 2014-09-22 10:47:14 +0800 )edit
0

answered 2014-10-16 13:36:09 +0800

burak gravatar image burak
1
http://mamkredyt.eu/

its usefull for me.thanks

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-09-21 08:01:45 +0800

Seen: 102 times

Last updated: Oct 16 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More