Qite / Umbraco-Inception

A code first approach for Umbraco (7)
MIT License
26 stars 9 forks source link

View location #6

Closed mmisztal1980 closed 10 years ago

mmisztal1980 commented 10 years ago

Performed overall refactoring of the affected areas.

Please checkout my changes and see if they work for you :) Feel free to perform any modifications and merge ;)

nojaf commented 10 years ago

Hello Maciek,

The code looks great, commented and structured. High five! Unfortunately it's a very busy at the office, I'll test the code this weekend and apply the merge if all goes well.

mmisztal1980 commented 10 years ago

I'm happy to help out, If you'd like I can perform further refactoring, starting with the other methods of that class :)

On Fri, Mar 7, 2014 at 2:42 PM, Florian Verdonck notifications@github.comwrote:

Hello Maciek,

The code looks great, commented and structured. High five! Unfortunately it's a very busy at the office, I'll test the code this weekend and apply the merge if all goes well.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37024684 .

mmisztal1980 commented 10 years ago

Have you cheked the update method? Is everything ok? :)

nojaf commented 10 years ago

Tested the code, works as you say. Thanks for the contribution! I wouldn't mind if you take a look to refactor further.

h5yr

mmisztal1980 commented 10 years ago

Ok, I'll do some work on it during the weekend. I've found some spots that could use some refactoring ;)

Have you considered adding automated testing to the project? The solution would benefit from it.

On Fri, Mar 7, 2014 at 6:23 PM, Florian Verdonck notifications@github.comwrote:

Tested the code, works as you say. Thanks for the contribution! I wouldn't mind if you take a look to refactor further.

h5yr

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37046256 .

nojaf commented 10 years ago

Considered yes, James South also made mentioning of it. However the truth is that I don't really have a background (yet) in Unit Testing. If you could point me in the right direction I'm willing to give it a shot.

nojaf commented 10 years ago

Ow yeah and I'll update the nuget package on monday. The project isn't in git and is at my laptop at the office.

mmisztal1980 commented 10 years ago

Ok, I'd suggest that you install the NUnit package (most popular), as well as NUnit test adepter VS extension. Google some basic tutorials and try to write some basic tests like checking if 2+2=4 ;) I'm seeing a small problem with the testing of this project b/c it runs in a hosted web environment (IIS/IIS express, so we'd need to figure out how to test that - but I'm pretty sure it's doable. I'll get back to you during the weekend or on monday when I (hopefully) find a solution.

On Fri, Mar 7, 2014 at 6:30 PM, Florian Verdonck notifications@github.comwrote:

Considered yes, James South also made mentioning of it. However the truth is that I don't really have a background (yet) in Unit Testing. If you could point me in the right direction I'm willing to give it a shot.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37046959 .

mmisztal1980 commented 10 years ago

I'd suggest adding it to the project, and hooking up a continous integration solution - have you heard of systems like Hudson/Jenkins/TeamCity etc? :)

On Fri, Mar 7, 2014 at 6:34 PM, Florian Verdonck notifications@github.comwrote:

Ow yeah and I'll update the nuget package on monday. The project isn't in git and is at my laptop at the office.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37047374 .

mmisztal1980 commented 10 years ago

Btw, I'd apreciate an in-depth explanation about that "master" template parameter. I'm not sure what it does, where is it being stored etc. Could you please explain it to me? If I know what it does, I should be able to come up with a slightly more elegant solution :)

On Fri, Mar 7, 2014 at 6:37 PM, Maciek Misztal mmisztal1980@gmail.comwrote:

I'd suggest adding it to the project, and hooking up a continous integration solution - have you heard of systems like Hudson/Jenkins/TeamCity etc? :)

On Fri, Mar 7, 2014 at 6:34 PM, Florian Verdonck <notifications@github.com

wrote:

Ow yeah and I'll update the nuget package on monday. The project isn't in git and is at my laptop at the office.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37047374 .

nojaf commented 10 years ago

Well the master template parameter is the name of an existing _Layout.cshtml page. The parameter is the name of the template in Umbraco.

So if you have a view named 'myMaster' in umbraco, which has an physical location of '~/Views/myMaster.cshtml' you can use it as parameter 'myMaster'

Haven't heard of Hudson/Jenkins/TeamCity, will try NUnit.

mmisztal1980 commented 10 years ago

Hi Florian,

I've found a Continous Integration Server, that's free for open-source projects - https://travis-ci.org/

It's capable of running .NET builds http://danlimerick.wordpress.com/2013/02/03/build-your-open-source-net-project-on-travis-ci/

In other words, we can have the whole build/test/package deployment process

Cheers, Maciej

On Mon, Mar 10, 2014 at 1:13 PM, Florian Verdonck notifications@github.comwrote:

Well the master template parameter is the name of an existing _Layout.cshtml page. The parameter is the name of the template in Umbraco.

So if you have a view named 'myMaster' in umbraco, which has an physical location of '~/Views/myMaster.cshtml' you can use it as parameter 'myMaster'

Haven't heard of Hudson/Jenkins/TeamCity, will try NUnit.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37175808 .

nojaf commented 10 years ago

Hello Maciek,

Sorry it took me a while but I've updated the nuget package and added the project to the github solution. A continious integration server would be great to automate this process.

Could you give me an example of a use full unit test for the project? What needs to be tested? I'm really a newbie on that topic.

Cheers,

Florian

2014-03-10 16:14 GMT+01:00 Maciek notifications@github.com:

Hi Florian,

I've found a Continous Integration Server, that's free for open-source projects - https://travis-ci.org/

It's capable of running .NET builds

http://danlimerick.wordpress.com/2013/02/03/build-your-open-source-net-project-on-travis-ci/

In other words, we can have the whole build/test/package deployment process

  • automated :) I'll read some more about setting it up and will let you know what I come up with. In the mean time, please add the package project to the solution (and be sure to exclude the NuGet API key - for now)

Cheers, Maciej

On Mon, Mar 10, 2014 at 1:13 PM, Florian Verdonck notifications@github.comwrote:

Well the master template parameter is the name of an existing _Layout.cshtml page. The parameter is the name of the template in Umbraco.

So if you have a view named 'myMaster' in umbraco, which has an physical location of '~/Views/myMaster.cshtml' you can use it as parameter 'myMaster'

Haven't heard of Hudson/Jenkins/TeamCity, will try NUnit.

Reply to this email directly or view it on GitHub< https://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37175808>

.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37193042 .

mmisztal1980 commented 10 years ago

Well, I'd suggest to start "learning by doing" - google some tutorials on NUnit, it's simple really. Thing is, your library works when the web-application is starting up so we need to recreate this in the test environment ;) I'll figure it out (sooner or later - preferably sooner)

On Wed, Mar 12, 2014 at 9:34 AM, Florian Verdonck notifications@github.comwrote:

Hello Maciek,

Sorry it took me a while but I've updated the nuget package and added the project to the github solution. A continious integration server would be great to automate this process.

Could you give me an example of a use full unit test for the project? What needs to be tested? I'm really a newbie on that topic.

Cheers,

Florian

2014-03-10 16:14 GMT+01:00 Maciek notifications@github.com:

Hi Florian,

I've found a Continous Integration Server, that's free for open-source projects - https://travis-ci.org/

It's capable of running .NET builds

http://danlimerick.wordpress.com/2013/02/03/build-your-open-source-net-project-on-travis-ci/

In other words, we can have the whole build/test/package deployment process

  • automated :) I'll read some more about setting it up and will let you know what I come up with. In the mean time, please add the package project to the solution (and be sure to exclude the NuGet API key - for now)

Cheers, Maciej

On Mon, Mar 10, 2014 at 1:13 PM, Florian Verdonck notifications@github.comwrote:

Well the master template parameter is the name of an existing _Layout.cshtml page. The parameter is the name of the template in Umbraco.

So if you have a view named 'myMaster' in umbraco, which has an physical location of '~/Views/myMaster.cshtml' you can use it as parameter 'myMaster'

Haven't heard of Hudson/Jenkins/TeamCity, will try NUnit.

Reply to this email directly or view it on GitHub< https://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37175808>

.

Reply to this email directly or view it on GitHub< https://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37193042>

.

Reply to this email directly or view it on GitHubhttps://github.com/Qite/Umbraco-Inception/pull/6#issuecomment-37385345 .