[Modules] Question regarding adding modules

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/6/2010 5:02:29 AM
Gravatar
Total Posts 2

[Modules] Question regarding adding modules

Dear Mojoportal Community,

First of all, its quite easy to handle the code of Mojoportal and im proud that i have discovered this openproject but now im running into a problem and maybe you can help me out.

Currently the mojoportal project looks like the following (its just an example)

/mojoPortal.Business
/mojoPortal.Business.Webhelpers
/etc...
/Web
/etc...
/MyOwnCustomModule

I want to add this module to the mojoportal project but that when upgrading to a newer version of mojo that i can run the project directly. I know i can add references to my module and drop the usercontrols inside the Web folder but when i upgrade to a newer version of mojo all references are gone? Or does the one still exist and there are no trouble at all?

So to be short:

1) Must i finish this module like this:

/Web/MyUserControls <- that the Web project has a reference to my
/MyOwnCustomModule
And add it to the website via administration -> advanced features -> etc...
but when i future upgrade of mojo do the references still exist?

2) Or must i finish the module like this:

/MyOwnCustomModules

And copy all the related stuff to a folder in the Web folder and then include it to the website? Then i dont have any independency in the mojoportal project.

I hope you guys understand my problem (its all about the dependency).

Best,
Michiel

1/7/2010 4:43:17 AM
Gravatar
Total Posts 18439

Re: [Modules] Question regarding adding modules

Hi,

You should not add references in mojoPortal.Web to your project and you should not customize mojoPortal code to avoid upgrade problems, just the opposite, you should reference mojoPortal.Web from your project and you cannot have circular references.

Structure your custom projects the same way we have them in our solution, like see the mojoPortal.Features set of projects or WebStore set of projects. 

Your custom UI code goes into your own Web Application project which references mojoPortal.Web and other mojoPortal namespaces as needed. The main trick is that you use post build events to copy your files up where they need to land beneath the Web folder (mojoPortal.Web). Right click the mojoPortal.Features.UI project or WebStore.UI project and choose properties, look on the Build Events tab and you will see how you can use post build events to copy your files to the needed locations after build.

Then you never run your UI project directly, mojoPortal.Web is always the startup project for debugging purposes. You can still set break points in your code and it works just fine.

For more info see Setting Up Your Projects For Custom Development.

Hope it helps,

Joe

1/7/2010 6:31:38 AM
Gravatar
Total Posts 2

Re: [Modules] Question regarding adding modules

Dear Joe,

Thank you for you reply on my question.

Yes, it works splendid as it should be. I have never founded that section of the development documentation.

Thanks again and this topic can be closed now.

Best,
Michiel

You must sign in to post in the forums. This thread is closed to new posts.