Avoid Forking The Code

For anyone who wants to build custom features for mojoPortal content management system, we always recommend that you work with the mojoPortal source code directly from our source code repository. However, all of your custom code should be kept in your own projects separate from mojoPortal. You should not just start hacking away at existing mojoPortal code, if you do that you are forking the code and the result will be that you can never upgrade to a newer version of mojoPortal without losing your changes. You may think you can just use it as a starting point and then maintain your own version going forward, but in most cases that is really going to turn out to be a bad idea because mojoPortal is actively developed and sooner or later there will be new features that you really want or there could be a bug fix for a security problem that you will need. A consultant should definitely not lead their customer down that path, later on the customer may use a different consultant and then they see the site is mojoPortal (and they don't know you forked it) and they try to upgrade it and lose all the customizations of your fork.

The main benefits of working with the mojoPortal source code is that this makes it easier for you to understand how mojoPortal works and by studying existing code you can find code samples for almost any common coding task that you may need to accomplish in your custom features. There are lots of little helper methods already available that you can discover in existing features and use in your own features. So you can borrow code from mojoPortal but you should not modify any mojoPortal code.

Due to the modular nature of mojoPortal, it is fairly easy to build custom features that plugin to the content system. You may find that some existing content feature is almost what you need but you want to customize it. Again, you should not modify the existing code, but you could safely clone the feature to make it a new separate copy of the original feature then you can modify your cloned copy all you want but can still safely upgrade since the original feature is still not touched.

Really before you start it is well worth the effort to read all of our developer documentation and watch the free training videos about custom feature development. Each video is less than 10 minutes but there are quite a few of them, however the time invested in this will save you time in your development and answer a lot of common questions. Especially if you are also new to ASP.NET you will learn a lot about both general ASP.NET techniques and mojoPortal specific things.

All Custom Code  Should Be In Your Own Custom Projects.

Any time you find yourself about to make changes in mojoPortal code you should stop and try to think of a creative way to accomplish your goal without doing that. Remind yourself that "All of your custom code should be in your own projects", this should always be your goal so that you can always pull the latest mojoPortal code from the repository without losing any custom code or getting any merge conflicts. The solution will vary from case to case depending on what you are trying to accomplish and you are free to ask in the developer forum and explain what you are trying to do and we "may" be able to help you come up with an idea. If not, then at least by understanding what you are trying to do it may help us think about new extension points we could add into mojoPortal to make it possible or easier to do what you are trying to do.