Mono Support Popular Discussion Post List and Popular Blog Post List 

16585 put(a) pogledan, 10 odgovor(a), 3.12.2013. 6:24:41 - Kreirao(la) bkkmono
3.12.2013. 6:28:09
434 Reputacija 51 Ukupno objava

Hello,

I want to create custom web parts of Popular Discussion Post List and Popular Blog Post List so that I would use them on the font page of my MonoX website. I tried to read this example: http://www.mono-software.com/blog/post/Mono/93/Building-a-custom-Web-part/, it is a tutorial of creating a custom web part for the popular group list but I don't get how to use the example to create my own web parts of popular discussion post list and popular blog post list.

Could any MonoX's staff provide me source codes of custom web parts to display Popular Discussion Post List and Popular Blog Post List?

1
3.12.2013. 7:12:46
443 Reputacija 50 Ukupno objava

Hi BKKMONO,
you should download our custom web part example from this link and use the same approach. You will have to write your own repository methods for fetching discussions and blogs.
Unfortunately we don't have source codes we could share.

Regards,
Igor 

2
4.12.2013. 7:58:44
434 Reputacija 51 Ukupno objava

In WebPartSample folder, 
HelloWorld.ascx inherits from MonoSoftware.MonoX.Samples.HelloWorld
PopularGroupsList.ascx inherits from MonoSoftware.MonoX.ModuleGallery.SocialNetworking.PopularGroupsList

And if I want to create my own custom web parts to display the popular discussion posts list and popular blog posts list, 
What classes must they inherit from?

3
4.12.2013. 8:24:29
443 Reputacija 50 Ukupno objava

Hi bkkmono,
you are reading it wrong.
This is from the example:

01.namespace MonoSoftware.MonoX.ModuleGallery.SocialNetworking
02.{
03.     
04.    public partial class PopularGroupsList : GroupListBasePart
05.    {
06. 
07.    }
08. 
09.}
PopularGroupsList inherits GroupListBasePart and has MonoSoftware.MonoX.ModuleGallery.SocialNetworking namespace. Because of that markup looks like this:
1.<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PopularGroupsList.ascx.cs" Inherits="MonoSoftware.MonoX.ModuleGallery.SocialNetworking.PopularGroupsList" %>
In your case you should have your own project namespace. You can also create your own base class but it's not necessary because you can use standard ASP.NET classes or MonoX base classes (BasePage, BaseUserControl, BaseAutoRegisterPart, BasePart etc.).

4
6.12.2013. 13:04:56
434 Reputacija 51 Ukupno objava

In the method lvItems_OnItemDataBound of PopularGroupsList web part, it uses SnGroupDTO as a data transfer object for the group entity.
If I would create a PopularDiscussionPostsList web part, 
What data transfer object should I use? Please advice me.

5
6.12.2013. 13:26:58
443 Reputacija 50 Ukupno objava

You can use SnDiscussionMessageEntity.

Regards,
Igor

6
6.12.2013. 14:04:34
434 Reputacija 51 Ukupno objava

thank you but sorry, i am a new. I don't find SnDiscussionMessageEntity in MonoX API

7
7.12.2013. 5:44:05
434 Reputacija 51 Ukupno objava

I gave up to create my own web parts because it is hard for a beginner to start developing without any useful tutorials.

I suggest you, if you would like to have more volunteer developers to develop MonoX, you should provide more tutorials.

Additionally, please provide additional build-in web parts in the next version of MonoX and I hope you would also include a popular blog web part and popular discussion post web part.

8
9.12.2013. 8:28:16
15993 Reputacija 2214 Ukupno objava

Hi,

"I gave up to create my own web parts because it is hard for a beginner to start developing without any useful tutorials."
- building MonoX WebParts is pretty straight forward as building standard ASP.NET UserControls, everything related to MonoX is exposed in the Online API documentation. Entity mentioned in the IRuzak post is placed in DAL (Data Access Layer) which is pretty standard and completely open sourced on GitHub. You can also check MonoX architecture articles that explain MonoX layers etc.

"I suggest you, if you would like to have more volunteer developers to develop MonoX, you should provide more tutorials."
- there are few tutorials on how to build WebParts, custom solutions based on MonoX etc. in our blog section.
How to use Web parts in MonoX
Building a custom Web part
MonoX-Notification-Module (Open sourced)
MonoX-Twitter-Module (Open sourced)
etc.

"Additionally, please provide additional build-in web parts in the next version of MonoX and I hope you would also include a popular blog web part and popular discussion post web part."
- we are considering exposing a source code for few more WebParts to community on the GitHub but that will be decided on next few meetings before we push v4.9 out.

Next MonoX release will include the MonoX v5.1 BETA that will introduce the concept of IoC (Inversion of Control) & DI (Dependency Injection) to MonoX and the community. This will allow even more control of the code and simple tweaks in WebPart behavior would be much easier to accomplish.

I hope you can find the information above helpful and that you will give it one more shot.

Regards

MonoX-Notification-Module

9
9.12.2013. 11:30:41
434 Reputacija 51 Ukupno objava

Thanks for your suggestions.

10
Ovo je MonoX demo site. Posjetite Mono Software za više detalja.