Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud
The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
Undoubtedly, it takes a programmer to write about dating and romance, while using diagrams, classes, methods… Furthermore, it is also only a programmer that won’t be considered pervert if writes about dating and titles one of the sections “Basic implementation idea”. So without further ado…
This post will describe how you can use Sitefinity to roll out your own dating site.
As complicated as it may sometimes seem, dating is nothing more than two people meeting each other. So that’s the premise we’ll use for our application as well. Each user that wishes to find a date through our site needs to create his/her own profile. Profile is a collection of arbitrarily important facts about that person (ranging from very important such as who is the person looking for - man or a woman - to trivial facts as preferred drink). For each profile we are going to create an actual web page, so each user can have a unique url.
We’ll create two templates that will be used for creating user pages. One for female users and one for male users.
All profiles will be accessible only to other users with other profiles and they will be able to filter out potential dates on certain criteria.
Short features list
Basic implementation idea
Similar to the Digg-clone application in this application we don’t need administrative controls, since users are doing all the work. Take a look at the simple diagram showing the components we’ll need to build in order to create dating site.
Let me start by explaining the web controls that we need to create.
Two other things we need to create are templates for a man profile and woman profile. In case you are unfamiliar with templates and how to create them you can consult a developer manual (I’ll write a blog post on this topic this week as well). So, when user creates a profile, we’ll create a new page in Sitefinity and assign appropriate template to that page based on the user’s sex.
Creating a data provider
Since we are working with a structured data (we can’t just let users type whatever they feel like, we need a very specific info about them) we need to create a data provider for user profiles. Consider the following diagram to see how are we going to work with data.
UserProfile.dbclass is a Nolics implementation of database table that will hold all information regarding a user profile. As you can see there is also a PageID field in this table. That field holds the id of Sitefinity page where this User profile will be located. But that will also gives us a reference other way around. When user opens a particular page we will simply search all the profiles to find a profile whose PageID matches the id of that page and load that profile in User Profile DetailsView control.
Note that all the pages will be exactly the same (they will look like a template). All the web controls will be added directly to the templates. Based on the page (and it’s id) we will just bind DetailsView (User Profile) and RadGrid (User Messages) to different data.
Since we can dynamically set the template of each page, when we create a page that will hold user’s profile we’ll take into account the sex of user and set the appropriate (man/woman) template for that page.
UserMessages.dbclass is a Nolics implementation of database table that will hold all the messages users exchange. All the fields are pretty obvious, except maybe ParentMessageID. This we’ll use for replies so that we can group messages and replies to be more user friendly.
And the very least thing we have on the diagram is Telerik.CMS namespace. This namespace we will use to create Sitefinity pages when user creates a profile and to set templates.
In case you are not sure how would you create Data Provider (it should be an assembly, .dll file) you can check how is Contacts.Data assembly implemented in following posts (there is also a link to download the project in the second post) :
Ideas for improving the application
List of Sitefinity API members and namespaces you should use to accomplish this task
Namespace : Telerik.CMS
If you are about to create this application you can learn a lot by examining the JobsIntraSite module that comes with Sitefinity. Obviously, you would not care about the ControlPanel and CommandPanel controls of JobsIntraSite module since you don’t need administrative access, but you can see how data provider (Telerik.Samples.Jobs.Data) is implemented there and also learn how to work with Nolics from declarative code which you will use for all of your web controls.
View all posts from The Progress Guys on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.