(Disappointing) Finding the Right Way to Create a Portal-Like Site (with Portlets) in ASP.NET MVC
My mind is really going to explode and I'm so upset. I have searched the net for 1 week about this and I see a lot of controversy on this issue and I don't know which method is correct.
-
some people like in this article say
<% = Html.RenderUserControl ("~ / Gravatar / GravatarImage.ascx")%> but in the comments people often talk about how to use the code and people talk about MVC pattern breaking and testability.
-
in this article the guy suggests Partialrequests, but again some people talk about MVC pattern breaking and testability.
-
and in this article the guy suggests a way to create templates, but it doesn't work anymore.
-
then there are Sub Controllers, Render Action, etc.
It is really confusing and makes me want to kill myself. I am really attached to the simplicity of MVC, but it seems like creating generic Entities is kind of rocket science; Is it really that difficult or am I missing something?
What I want is very clear; I have a portal site where for example
- you're on the blog page, but in the right column you have a list of recent movies from the IMDB service or whatever.
- I want to have a login, join the newsletter on all pages.
- the ability to load these modules based on specific logic or request.
- Ability to load these small portlets or objects asynchronously (with Progress GIF loading)
Of course, these requirements do not apply to the current pageview or their controller (that's the whole idea of a portal site you can knead and shuffle). In Web Forms, you simply create a damn custom control, drag it to the page, master page, and you're done; heck, you can even load them dynamically based on specific logic.
So please, if someone can tell me how to achieve this functionality without breaking Newton's or Einstein's laws with MVC, and I think a lot of people are like me in the same boat, so I think the answers will benefit many of us.
a source to share
I think this is the best solution if you are not mvc purist http://blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc/ I
a source to share
The Maverick open source content management system project on GitHub is a good starting point for this. But now it is in a preview state.
a source to share