Suggestion for improve the MojoPortal's Architecture

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.
3/7/2009 5:18:54 PM
Gravatar
Total Posts 10
Tiago Jesus

Suggestion for improve the MojoPortal's Architecture

Hi Joe Audette,

I have a suggestion to make to you.

I strong believe that if we use more of IoC( Inversion of Conterl ) e DI (Dependence injection) on mojoportal code, they cold make an improve on the MojoPotal Architecture.

There are two good framework for this propose.

1. Spring Framework.net (http://www.springframework.net/)
2. Unity - http://unity.codeplex.com/

With this framework we can alter the bereave of application make changes on the config. A good example of a improve on mojoportal is when we need change the Data Base. Now a day, we need compile the code. But, if we are use DI, we need only change same configuration. It is a small example.

In my opinion, Spring Framework.net is better, because give us more then IoC e DI. And have a nice documentation(http://www.springframework.net/doc-latest/reference/html/index.html).

I tried to do this refactoring on mojoportal code, for use the Spring Framework, but i couldn't do because i don't know the code of mojo portal.

What do you think about this?

3/7/2009 5:21:36 PM
Gravatar
Total Posts 10
Tiago Jesus

Re: Suggestion for improve the MojoPortal's Architecture

Some background about DI

http://en.wikipedia.org/wiki/Dependency_injection

http://www.codeproject.com/KB/architecture/DependencyInjection.aspx

3/8/2009 8:00:57 AM
Gravatar
Total Posts 18439

Re: Suggestion for improve the MojoPortal's Architecture

Hi Tiago,

I think inversion of control and dependency injection are useful techniques. Over the holidays when I allowed myself some time to do some prototyping in Silverlight I first used Caliburn Framework but then switched to Unity/Prism when it was released for Silverlight.

Introducing it into an established architecture may not be so easy, one must consider backward compatibility when one has been releasing a product for 4 years that others are building custom functionality on top of. I'd like to find a way of doing it within a UserControl so that it fits in well with our current feature plugin model. 

In any case I don't yet have the luxury of being able to just work on things I would like to do for archtitectural ideaology. Once I am actually making a living on my efforts then I will have more freedom to channel my efforts, but right now my efforts are channeled on developing some additional add ons for sale so I can make a living and improving the core functionality to make mojoPortal more popular. Meanwhile I live mostly on savings, so it is crucial I stay focused on generating revenue before I run out of savings. Every year new techniques and new technologies come out and its always easy to see things one would/could do differently or better but throwing out working code and re-doing it for the sake of architectural ideals as they evolve over time is not practical. This year MVC is all the rage but I have no plans to rebuild mojoPortal using MVC, it adds no user value and would take a huge amount of effort. 

So, while I agree these are useful techniues for architecture, I have no immediate plans to re-factor mojoPortal into a different architecture just so I can use this technique. If it can be used within the exsiting architecture like within UserControl then it could be more immediately useful. 

Best,

Joe

3/8/2009 8:39:06 AM
Gravatar
Total Posts 10
Tiago Jesus

Re: Suggestion for improve the MojoPortal's Architecture

Hi Joe Audette,

I agree with you point of view. Perhaps we could add the DI for new items.

One good example is on UserControl, we cool do a way to pass some Properties to our Control, like:

class MyControl: UserControl{
    public User LoggedUser{set;}
    public Logger Logger{set;}
    public ManagerClass Manager{set;}
}

If you noticed, I'm not putting dependence. It could help us make new additional add ons more easy.

And, I think, for make this improvement in the Architecture we not need refactoring all the code, only some fill parts.

I will try to make a example here, and see if works.

Sorry, my English is not good yet.

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