Framework advice, please...

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.
10/11/2010 6:56:08 PM
Gravatar
Total Posts 4

Framework advice, please...

I think this application will be a great framework for an app I would like to build.  But a few questions before I get too deep, please:

Question 1: Web Service as Data Store - I would like to build a set of extra modules (somewhat like the guestbook tutorial module) except I expect to access most if not all data via web services.  The data lives in a data logger web service and I would like to create  modules to access the data and then chart the data using ajax based charts.

Question 2: Client self registration, then client specific modules separate from other clients - I would like the clients to self register and then configure their own charts.  The client config data would exist in the web services, but a pointer between the client logged into Mojo and the client info on the web services would have to be linked.

  • Can a user self register in mojo?
  • Can a user register specific features/modules (like my chart module) within their account?
  • Can the features/modules registered by each user be securely isolated?

 

Does anyone have any tips about where I should start with extending Mojo Portal with these types of features?

Thanks in advance,
Chris.

10/11/2010 7:11:54 PM
Gravatar
Total Posts 550

Re: Framework advice, please...

 

Hi Chris,

If  "register specific features/modules" means adding a feature to a page,you don't have to do this solutions , you can develops a module that save and retrieve data from your data stores (db or web services) accourding user key (i.e userID, UserGuid).

Hope Helps

Asad

10/11/2010 10:12:15 PM
Gravatar
Total Posts 4

Re: Framework advice, please...

Thanks, Asad.

I have been playing with the application and I see that in fact, users can self register.

Now I'm playing with the MyPage feature and it appears that users can create their own pages.  However when I click on the +plus button, I don't see any content that I can add.  I see this: 

Available Content (0)
Hidden Content (0)

So far it seems to be erroring out because it can't find a page that does not exist.  Ideally, I would see a limited list of modules/features (the ones I provide for charting) and the user would be able to select which ones they want and how they should be configured.  I note that it says "Content" so perhaps there are no "content" modules configured and these MyPages are more about aggregating content from other pages?

Accessing web services: 
So I guess you are saying that I can programmatically access the userID or UserGuid as the reference to link to my user data stored behind the web services?

 

I appreciate any feedback,
Chris.
 

10/11/2010 10:29:22 PM
Gravatar
Total Posts 4

Re: Framework advice, please...

OK, I see that the MyPage is about "content" from other pages.

Does anyone have a tip on how I might modify the app to allow for a variation on this feature:

The user would be able to set up a "MyPage" but instead of seeing existing "content", they would see a limited list of modules (in my case a list of chart types) and then the user would be able to define attributes of the data set to be charted.

Thanks,
Chris.

10/12/2010 7:15:38 AM
Gravatar
Total Posts 18439

Re: Framework advice, please...

Hi Chris,

Question 1: Web Service as Data Store - I would like to build a set of extra modules (somewhat like the guestbook tutorial module) except I expect to access most if not all data via web services. The data lives in a data logger web service and I would like to create modules to access the data and then chart the data using ajax based charts.

You can do anything that is possible with ASP.NET including publishing and consuming web services. However if the web service lives in the same site as the module/feature, I would typically not make it consume a web service because that means you are making a server side web request in addition to serving the page request. It would be better to use business objects directly in your feature and then expose web services based on the same business objects. If you are using ASP.NET 4.0, you could use Entity Framework for the business classes and then easily expose WCF Data service based on the same Entity object(s)

Question 2: Client self registration, then client specific modules separate from other clients - I would like the clients to self register and then configure their own charts. The client config data would exist in the web services, but a pointer between the client logged into Mojo and the client info on the web services would have to be linked.

Can a user self register in mojo?
Can a user register specific features/modules (like my chart module) within their account?
Can the features/modules registered by each user be securely isolated?

A user can register on the site, but mojoPortal was not designed for you to let strangers edit content, editing content requires a lot of trust in the user because it is very easy for someone with edit permissions to enter malicious content such as javascript. mojoPortal is not designed to give users permissions by default, you would have to add the user to roles with more privileges and as I said you should not do that unless you have full trust in the user because they get too much power with most mojoPortal features which allows them to do things that can be good but also can be very bad.

In a custom feature, you can of course expose any functionality you want to users and you can associate it with the user by storing the userid or userguid in your data.

MyPage is based on the ASP.NET WebPart framework which came out in .NET 2.0 but has not really caught on and hardly anyone uses it today. As implemented in mojoPortal, it does not allow users any edit permissions on features. What is does allow is for site editors/admins to expose content instances as webparts so that users can use the content on MyPage. The reason you don't see anything there is because you have not yet made any content available. It is conceptually like iGoogle or MyYahoo or Netvibes where users can personalize pages from available content. For more information see http://www.mojoportal.com/usingmypage.aspx

Hope it helps,

Joe

10/12/2010 12:46:49 PM
Gravatar
Total Posts 4

Re: Framework advice, please...

Joe,

So it seems I'll need to create a new variation on the MyPage functionality which I'll call something like MyCharts or MyDashboard.

When a user self registers, I would like them to configure their own "dashboard" of charts.  I don't want to have to configure each user's dashboard.  The data would be housed in a data logger like Pachube.com.  The user would be presented with a module that allowed them to configure one or more charts that reflect some source of relatively live data.

I used to work on an "I Buy Spy" app and MojoPortal looks like it has a lineage from that original app.  I would create modules (user controls) that were sub-classed from a portal module class; that handled the framework stuff and made it relatively easy to just create a new module.  The new modules would be available as registered "features" and available for selection by the user.  This isn't that different from the concept of the iGoogle page where users can add various widgets to a page where all their interesting stuff is aggregated.

With this approach the user would select the module for the type of chart (pie, bar, blah blah) and then enter an api key, some chart attributes ( width, height, ranges, colors, etc.) and this would end up on their dashboard page.  They could add as many chart modules as they would like.  The data (and associated web service) would live in a different location, not on the same server as the MojoPortal.

Am I heading in the right direction?

BTW, I like this (I've used entity framework and played with but not deployed anything with WCF):

If you are using ASP.NET 4.0, you could use Entity Framework for the business classes and then easily expose WCF Data service based on the same Entity object(s)

Thanks for your advice,
Chris.

10/13/2010 6:51:36 AM
Gravatar
Total Posts 18439

Re: Framework advice, please...

Hi Chris,

Yes, mojoPortal has IBuySpy heritage.

Really mojoPortal is designed primarily for business web sites, if the MyPage kind of thing is really what you want then there might be better solutions out there for you to build on like the DropThings project.

ASP.NET WebParts is pretty much a dead end technology at this point.

Best,

Joe

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