Mvc2 code duplication

1 view
Skip to first unread message

Morten Maxild

unread,
Nov 7, 2009, 10:35:35 AM11/7/09
to spar...@googlegroups.com

Hi,

 

Had a chance the other day to look once again at the source code.

 

I find it quite odd to find a lot of duplication because of the ‘new’ Mvc2 projects. Wouldn’t it be a lot easier to maintain a separate mvc2 branch?

 

Is there a particular reason to define Spark.Web.Mvc2 and Spark.Web.Mvc2.Tests projects? Is Spark going to support both Mvc v1 and Mvc v2 in the future when v2 has been released? I think this is a bad idea.

 

The duplication is really error prone, because navigating the source is harder, and making changes is harder too.

 

Regards

Morten

Louis DeJardin

unread,
Nov 7, 2009, 2:03:11 PM11/7/09
to spar...@googlegroups.com
It's mostly because mvc2 is still volatile preview bits. Once it ships the spark.web.mvc2 goes away and the code is reconciled into spark.web.mvc.

Duplication's bad, but there were a number of things that weighed in favor of this approach...

The mvc assembly is wafer thin compared to the spark assembly itself, so the duplication is minimal.

The same build cycle will create and test bits for mvc 1.0 and mvc 2 at the same time. The ide can also be used to change spark and run tests on mvc 1.0 and 2 at once.

So a branch would be simpler if you only care about one or the other, but since the solution is actively targeting both versions of the framework at once this saved a lot of effort. Avoids switching between branches, constantly merging changes between "main" and "mvc2" branches, having two builds configured.

To be honest I kind of like that spark.web.mvc2 has a different assembly name too, at least during preview, as a safety to avoid accidental upgrades or overwrites for people using mvc 1.0.

Morten Maxild

unread,
Nov 7, 2009, 6:04:07 PM11/7/09
to spar...@googlegroups.com
Glad you are only targeting the latest mvc release, and off course we need both mvc and mvc2 in spark.

Andy your the man, and i aggree that the mvc bits are only a fraction of the codebase.

But considering how easy it is to checkout another branc (its way faster than building) and how great merging is in git i still find the setup a bit odd. You could still name the mvc2 assembly the way you like in the mvc2 branch during previews.


I would like to analyse any differences between the spark mvc and mvc2 code in gitk. The differences should be minimal. And gitk would show me which commits in mvc2 branch are merge commits (forward integrating main work) and which commits are mvc2 specific. 

Sent from my iPhone

Morten Maxild

unread,
Nov 7, 2009, 6:10:29 PM11/7/09
to spar...@googlegroups.com
Also good to see you active on the list. Its been a while. I was wondering about the future of spark considering your move to ms, congrats btw.

Cheers
Morten


Sent from my iPhone

On 07/11/2009, at 20.03, Louis DeJardin <louis.d...@gmail.com> wrote:

Louis DeJardin

unread,
Nov 7, 2009, 10:04:06 PM11/7/09
to spar...@googlegroups.com
Thanks! And omg you have no idea the relocation nightmares you'll encounter in this economy/housing market - selling and buying a house concurrently. Plus once you send your kid to a new school you can guarantee within forty-eight hours the entire family's going to be sick. Ah yes, the minivan was also totaled when the person in front of us was cut off on an on-ramp. :) I *wish* I could say the time drain on spark was caused by the move to MS!

Tim Schmidt

unread,
Nov 7, 2009, 10:19:34 PM11/7/09
to spar...@googlegroups.com
Wait, your minivan got totaled again, Louie?!

So have you sold your place back here yet?



Louis DeJardin

unread,
Nov 7, 2009, 11:56:18 PM11/7/09
to spar...@googlegroups.com
Yep. And no - hasn't sold yet. So for a very short while we'll be up to two houses and down to one car. Yay!
Reply all
Reply to author
Forward
0 new messages