Custom dev, source control, changesets - best practices?

1 2 >
Posted: September 10, 2011 at 10:53 AM Quote #48407
I'm still a bit confused as to how to best use the source control / codeplex changesets:  I'd like to make custom changes side by side with ongoing team development, merge in bug fixes, but not merge in next version features, and yet when new version comes out, merge in my custom changes to that new version.
How are others doing this?  Any thoughts?  Advice?

TIA
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: September 10, 2011 at 12:09 PM Quote #48416
New York wrote:
I'm still a bit confused as to how to best use the source control / codeplex changesets:  I'd like to make custom changes side by side with ongoing team development, merge in bug fixes, but not merge in next version features, and yet when new version comes out, merge in my custom changes to that new version.
How are others doing this?  Any thoughts?  Advice?

TIA


You should use Mercurial DVCS (hg) and VisualHg. Clone a copy of the codeplex repository write code and commit it back to your clone. You can then make pull requests of the codeplex repository when changes are released and you want them. To make changes in the system until you are forced to do something different you should try and make changes in one of the following methods:

1. A plugin! You can override services, create data entities, create views, and everything else within a plugin.
2. Create a separate library with all of your custom entities and reference it in the website.

If you cannot do one of those then modify the nopCommerce code directly. Just beware that the two methods above will limit the amount of conflicts and headaches that can arise out of developing in parallel on an open source rapid development system. Good luck!
This post/answer is useful
4
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Please use the VOTE functionality to recognize helpful or inappropriate posts.

Skyler Severns
http://csharpwebdeveloper.com/
Posted: September 10, 2011 at 1:08 PM Quote #48420
Skyler is absolutely right
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Andrei Mazulnitsyn
Posted: September 10, 2011 at 1:18 PM Quote #48421
skyler.severns wrote:

You should use Mercurial DVCS (hg) and VisualHg. Clone a copy of the codeplex repository write code and commit it back to your clone. You can then make pull requests of the codeplex repository when changes are released and you want them.

I started using TortoiseHg.  Haven't yet installed VisualHg.  I cloned Nop to my local drive - one repository; Are you saying I need two clones?  I don't think I follow your work flow.

skyler.severns wrote:

To make changes in the system until you are forced to do something different you should try and make changes in one of the following methods:

1. A plugin! You can override services, create data entities, create views, and everything else within a plugin.
2. Create a separate library with all of your custom entities and reference it in the website.


I do plan on putting as much as I can into plugins  ( I see you've blogged a bit about plugins, and it's on my to-read list :)
I do think, though, that there are certainly times that will require changes to existing Views to get the right look and feel.  Maybe ability to "create views" could help with that.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: September 10, 2011 at 1:31 PM Quote #48424
New York wrote:

You should use Mercurial DVCS (hg) and VisualHg. Clone a copy of the codeplex repository write code and commit it back to your clone. You can then make pull requests of the codeplex repository when changes are released and you want them.

I started using TortoiseHg.  Haven't yet installed VisualHg.  I cloned Nop to my local drive - one repository; Are you saying I need two clones?  I don't think I follow your work flow.


To make changes in the system until you are forced to do something different you should try and make changes in one of the following methods:

1. A plugin! You can override services, create data entities, create views, and everything else within a plugin.
2. Create a separate library with all of your custom entities and reference it in the website.


I do plan on putting as much as I can into plugins  ( I see you've blogged a bit about plugins, and it's on my to-read list :)
I do think, though, that there are certainly times that will require changes to existing Views to get the right look and feel.  Maybe ability to "create views" could help with that.



Sorry I wasn't very clear. You should have 1 clone of nopCommerce and that is where you work. When nopCommerce adds new features you use Mercurial to pull a changeset from nopCommerce into your 1 clone.

Yes, you will most definitely get to a point where you are required to change views. You can do this by adding your own theme and overriding the views by placing the new one in your theme folder. If overriding views doesn't work for you then you can modify the view directly. It will be a lot easier to take new changes if you do not modify the view directly.

I've also written an article about making modifications to existing nopCommerce entities.

VisualHg is a nice plugin for visual studio. Instead of switching from Visual Studio to Windows Explorer and back you can just work in Visual Studio.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Please use the VOTE functionality to recognize helpful or inappropriate posts.

Skyler Severns
http://csharpwebdeveloper.com/
Posted: September 10, 2011 at 6:17 PM Quote #48435
skyler.severns wrote:

...You should have 1 clone of nopCommerce and that is where you work. When nopCommerce adds new features, you use Mercurial to pull a changeset from nopCommerce into your 1 clone.

That's what I've started to do, but I think it gets more complicated than that.  I see it as 2 different kinds of changes being done by the nop team:  1) bug fixes, 2) new features for next release.
I want the bug fixes, but I (typically) don't want any new features yet  - especially any that would require running a SQL update script that has DDL in it.  (Even the scripts that just add new data like localizations, etc. are problematic, because I have to look out for them - i.e. unlike just applying the changeset to the VS code, I've got notice that there is an update.sql, and then manually run the update).
If I decide not to apply a particular changeset, then I run the risk that a later bug fix I want is in some file that was modified in the prior changeset I didn't use - thus dependencies.

skyler.severns wrote:

overriding the views by placing the new one in your theme folder.

That's interesting!  Would you elaborate on that - does the new view file (e.g. .cshtml) need to be in a subfolder the of the same name as original?  e.g.   ...\Themes\DarkOrange\Views\Catalog

EDIT:  Never mind the question - I tried it out, and yes, the folder structure is required:
see my last post in  https://www.nopcommerce.com/boards/t/11206/checkout-stopped-working.aspx?p=3
for more details about customizing views.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: September 11, 2011 at 12:54 AM Quote #48458
I also recommend to look at the following articles/screencats about working with Mercurial and Codeplex:
1. http://blogs.msdn.com/b/codeplex/archive/2010/03/05/codeplex-mercurial-support-for-forks.aspx
2. http://tekpub.com/view/dotnet-oss/7
3. http://shop.tekpub.com/products/hg (unfortunately not free)
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Andrei Mazulnitsyn
Posted: September 13, 2011 at 1:05 AM Quote #48666
Which is the best practice to implement custom class on body tag. I want to apply my custom class name on body tag, this provides me an ability to modify overall site design based on class applied on body tag.

So when page renders, it will have

<body class="class_name">

I want ability to define this class name in view / template file.

I can do this using a simple jquery, but that will apply tag after page renders.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: September 13, 2011 at 1:21 AM Quote #48667
Dharmik wrote:
Which is the best practice to implement custom class on body tag. I want to apply my custom class name on body tag, this provides me an ability to modify overall site design based on class applied on body tag.

So when page renders, it will have

<body class="class_name">

I want ability to define this class name in view / template file.

I can do this using a simple jquery, but that will apply tag after page renders.


The best way to implement such a small change is just as you would normally. Add the class to the element, but remember when the time comes for you to merge in updates you will need to compare files and do a merge to avoid losing your changes.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Please use the VOTE functionality to recognize helpful or inappropriate posts.

Skyler Severns
http://csharpwebdeveloper.com/
Posted: September 13, 2011 at 1:38 AM Quote #48669
Thank you for your reply. I'm currently working on a theme, and already have lot of customization on core layout files in my theme.

Apart from that, I want to apply class name on body tag, that will give me ability to control/apply special styles using css. I just don't know how to apply it using MVC in nop commerce? I want to apply it in _Root.cshmll on body tag.

Any help with sample code would be great.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
1 2 >
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2018
Learn more