DotNetNuke (formerly known as the IBuySpy Workshop) is an automated content management framework explicitly intended to be used in intranet and extranet deployments and open source portals. DotNetNuke has a heady set of tools that lets you build dynamic websites. The information in such sites is interactive and data-driven. The information changes automatically as it is contained in file or database. Publishing blogs, showing current affairs, chat system, date, time, weather forecast and other similar stuff are the changing or dynamic data you can easily put on your website using DotNetNuke tools.
Within an organization, portals provide a single web front-end to the many applications within an organization. It may be providing Transactions, HR, Locker info, Customer Services provided in a Banking environment all from one site. The back-end data base systems are also connected to provide businesses with the prospect to combine information and use it fruitfully.
Key benefits and reasons to move to DotNetNuke are:
- Easy Web site administration: While working on this framework no programming knowledge is required. Clients can generate, supervise and publish web content without requiring any technical skill level.
- Ready to use: DotNetNuke is user-friendly framework and is built in such a way as to allow users to deal with all parts of their projects. A well worked out user interface allows an easy operation.
- Advanced Features: The advanced features in DotNetNuke exceed the features in your homegrown applications. Moreover it is a constantly evolving with multi-functionality to cater end-user requirements. It also saves development time.
- Strength: The administrative options are skillfully divided between host level and individual portal level. In one hosting account the administrator at DotNetNuke supports multiple portals or sites- each with its own look.
- Powerful Tools: DotNetNuke comes with a set of powerful tools. These built in tools provide multi-functionality for security, site designing, hosting, site membership options etc. There are various other features that can be manipulated as per your needs with these tools.
- Network of Support: A Core Team of developers is always there to support DotNetNuke. Online Forums, blogs, online help and various websites give DotNetNuke a dedicated network of support.
- Easy Installation: DotNetNuke.com provides the free download software and an install.pdf with install instructions for the latest version of DotNetNuke. DotNetNuke can be made running within minutes.¼LI>Multi-Language Localization: DotNetNuke supports a multi-language localization that allows the websites built on it, to be translated into any language.
- Licensed Open Source Software: DotNetNuke 3.0 is available for free download. The full application source code and sub-projects are distributed under a standard BSD open source license; providing the maximum freedom in both non-commercial and commercial environments.
- Increase Profits Opportunities: DotNetNuke is module based. So you can build up various unique modules and sell them to your clients. Besides this, you can also go commercial with site templates, database options etc.
- Latest Technology: The working of DotNetNuke utilizes modern day technology- ASP.NET 2.0, Visual Web Developer, Visual Studio 2005 and SQL Server 2005, thus giving the users a hands on to the latest technology.
- Advanced CMS: DotNetNuke has built-in tools to create the most complex content management systems. Moreover, many options of extending and customizing the site are also available.
- Established: DotNetNuke is a now a trademark in web designing. It is a popular brand in the open source community. With over 250,000 registered users and a talented team of developers. Through end-user feedback and real world trial DotNetNuke continues to grow.
- Easy to integrate: With its flexible infrastructure, DotNetNuke is easy to integrate within your conventional processes.
- Priority on security: Emphasis placed on validation, encryption, “bug” tracking and potential threats provides a secure way to build websites.
- Fully customizable: Changes can be made to portals at all levels – from basic stylesheet elements like font type, color, and bullet points, to overall site appearance. New skins and module containers can be easily applied to the site with no repercussion on content.
DotNetNuke is built on a Microsoft ASP.NET (VB.NET) platform. The most recently released versions are 3.3.x and 4.3.x
A website in DotNetNuke is made up of Pages. These Pages exhibit information to your site visitors. A clickable item called Menu is present on Pages that helps you to navigate across the site. You go to these pages by clicking on Links. When you click on Menu, various Menu Items are displayed hat Link to other pages.
Information on Pages is added by putting Modules on them. Modules impart functionality to your website. Different types of modules are available for displaying different types of content. They may be pooled in different unique ways to design your specific website. Modules can be simple like Text/HTML Module, which allows you to put in HTML or Text that you like or they can be complicated like an import module or an online chat utility.
You may have secure information on your site that you don't want to make visible to anyone. Only the registered visitors are to be given special Permissions to view the secure information. You can make the page visible and just hide some of the Modules, which you don’t want to show. This makes users know that they can access further only if they Register and then Login. So the module, which is to be viewed by specific group or to be made secure, is not visible on the page.
"Skin" describes the visual layout or appearance of your website's pages. A Skin can be simple or complex. The skin can be different for different containers of the pages. It can provide different style for horizontal or vertical Menus and provide for different layouts. Some Skins are included with DotNetNuke install while others are available from other sources. Every new page always has the same look which is the default Skin for your website. Your website's default Skin is managed on a page accessible only to Administrators. This setting applies to your entire website and to all new pages that you create.
Every Page has predefined areas called Panes that give the Page its appearance. Modules are placed on these Panes. Every page Skin has at least one pane. A skin may have several panes as per the page design like panes may be intended for specific purposes e.g. an emblem or a logo in the header of a website.
There are many Modules available with DotNetNuke that offer wide spectrum of functionality and custom modules with some special functionality are also available on certain other sites. Some examples of DotNetNuke Modules and their functionality are:
- The Announcements module produces a list of simple text announcements consisting of a title and brief description. It is very handy for making your website visitors aware of items of interest which may have links to additional information. Options include a "read more" link to a file, tab or other site, announcement publish date and expiration date.
- Banner Modules: Banners can enabled in the header of the portal through the Admin > Site Settings tab.Reporting is provided for banner views and clicks. Each banner module can be set to render from one of two separately managed levels of vendor directories, one for the portal host and one for the portal administrator. Banners managed by the portal host are available in all child portals managed under the host portal.Banner types include standard Banner, MicroButton, Button, Block, Skyscraper, Text and Script options
- The DotNetNuke Documents module presents a list of files within DotNetNuke for download by end users. Documents can be stored within a DotNetNuke portal, or accessed from an external website or portal. Access to documents can be secured using the core role-based security from within DotNetNuke
- The Text/HTML Module provides for the input of simple or HTML-formatted text. Simple text is input in a standard text box and a filter converts carriage returns (paragraph breaks) to HTML breaks. HTML-formatted text can be input directly or generated by an alternate rich text input utility that provides a number of advanced WYSIWYG features as well as a gallery of all uploaded images
DotNetNuke Portal
DotNetNuke has many built-in modules such as content module, Table, Events, Links, Picture and more. Various other modules with functionality to cater different aspects of websites can be found in DotNetNuke Web Forums, Blogs and various other websites. The DotNetNuke portal builder lets you construct various intranet and client/vendor extranets using the modules provided and those imported from other sites. While building up an intranet or an extranet one basically requires the following functionality:
- Post/upload/attach a file or a document to the company standard protocols/procedures that is Central file storage of protocols/procedures is needed. This can be done using the Documentation Module.
- Internal and external contacts: To satisfy this one must have multiple instances of contact Module.
- Calendar: This can be added with Events/AVCalendar module
- Staff in/out board: This cannot be found in core module but is easy.
- A way to display Text: A core Text/HTML module will work well.
- Web links required: Links module provides links to various sites.
- Access restricted by user level possible to link Active Directory: AD integration in core provides this functionality.
- Alert users to new upload: This can be implemented by modules easily available.
However, technology is not one tool but to pick the best from Toolbox. Share Point Services also provide some Intranet solutions but is generally used when your needs are more collaboration/communication-centric while DotNetNuke provides more document/content-centric.
Localization
DotNetNuke is used internationally to create web applications that must accommodate the specific culture of both the hosting organization, and the individual end users/site visitors. These websites have to serve a wide range of people with specific languages and culture. Therefore, the aim was to provide a set of procedures to simplify creation of multilingual web sites. So certain standard measures to add new languages and translate resource files, an application programming interface for Core Modules as well as other modules is basically needed for localizability of modules. Since version 3 DotNetNuke provides a set of features to allow static localizability of modules. By static information we mean all data that is not subject to user modification and that can be considered for the most part as not changeable. This includes text labels, error and information messages, help, and graphics that are spread throughout the user interface of the application. The initial release of Multilingual Translations includes only static translations. This means that DotNetNuke framework will convert static strings, but will not convert dynamic content i.e. content stored in the database. It is now possible to roll out websites that are completely non-English. The DNN 3.1 framework allows monolinguistic non-English sites, but not multilingual ones. The ability to have multilingual sites is especially important in countries that have more than one official language. This brings the concept of Dynamic Localization that is capacity to carry content in multiple languages. The word dynamic refers to content that is changed by users, not the programmers. Generally, current multilingual sites consist of multiple shadowing sites. Different URLs support different language entry points i.e. a different URL for a different language. This is a static website solution. However, a portal structure such as DNN must offer content tailored to the visitor on a single page thus, eliminating the ability to have the shadowing sites. The framework should detect the user’s preferred language and offer the correct content. This gives the concept of dynamic localization.
DotNetNuke puts the authority to build and administer Web site in the hands of your clients. They have an active role in managing information on their Web sites, intranets, and extranets. They can browse to the area on the site where they want to create or edit content, and click on the appropriate content management option. Thus, the clients are site administrator. Moreover, DotNetNuke integrates quickly with your infrastructure and has no licensing restrictions.
The benefits of DotNetNuke for hosters include:
- DotNetNuke is browser based content management system. It simplifies web site management by letting the clients, regardless of their skill; decide the infrastructure and content of the site.
- No Developers, no programmers needed. So a working website is developed quite fast.
- A client can easily make changes in website without any support. So content authoring, deployment, and configuration support is not required hence reducing costs of maintaining a website.
- DotNetNuke separates site content from site design so extremely customized site templates can be provided for your clients.
- DotNetNuke is an advanced and constantly evolving technology. It is versatile, user friendly and has an international community to support thus saves your valuable development time and expenses.
- Leverage existing investments: DotNetNuke is built on Microsoft technology, including the .NET Framework so it leverages your existing investments such as Windows servers, database servers, and development tools.
- It simplifies internal management processes, and makes your hosting packages more attractive and valuable. With an active open source community and more than 150,000 registered users worldwide, DotNetNuke is loved by Hosters.
Registered users also have the option of downloading the Linq2Twitter sample. Please register to receive your copy.
How to Setup Twitter Integration
In this article:
- Introduction
- Authentication
- Account Information
- Friends and Followers
- Get Statuses and Retweets
- Update Status
- How to Retweet
- References
Introduction
Twitter is a micro-blogging service that allows people to post messages. The maximum length of each message is 140 characters. Twitter enables social networking by allowing people to follow and communicate with each other. Over time, this has proven to be a powerful communications medium because of its real-time nature.
Whenever news breaks around the world, people are tweeting that news as it happens. This article will talk about how to integrate twitter API into ASP.NET application. There are few libraries introduced in twitter developer website for using in .NET application
All may have its own pros & cons. This article will focused on LinqToTwitter library which as its name shown completely based on linQ. You can download the source code or dll’s from codeplex. Then you should add references to your web applications.
How to Start
First thing you should consider for creating any twitter application is you have to register the application and get Consumer key and Consumer secret:
These keys should be kept on safe place. Web.config is good place to put these keys and it is easy to access them through all places in ASP.NET application.
Authentication
Twitter has recently changed its authentication from basic to OAuth authentication.
OAuth is a security protocol that allows applications to act on your behalf without requiring you to give out your password to every application. This definition is a generalization and simplification of what OAuth truly is.
There is an increasing need for Web applications to communicate with each other. In the Twitter space, there are literally hundreds of 3rd party applications that access Twitter on your behalf to provide functionality. Examples include posting photos, scheduling tweets, and full-featured clients.
Many of these applications fill holes in Twitter's offerings and deliver value, contributing to their popularity. Without OAuth, each of these applications would need to collect your username and password to interact with Twitter on your behalf and therein lays the problem.
Sharing secrets (credentials) with a 3rd party application requires putting trust in that application to act responsibly. This is a risky proposition because eventually some unscrupulous application will misuse your secrets for their own gain or engage in malicious behavior. Therefore, you need to minimize who you share your secrets with.
Adding to the unfortunate circumstances of finding yourself in a position where an application has misused secrets, the first line of defense is to change passwords. The problem with changing passwords is that the same password has been given to multiple other applications.
Therefore, after changing your Twitter password, you also need to change passwords for every other application. Giving out secrets to every application is fraught with risk and complication.
OAuth is a way to enable the scenario of working with 3rd party applications, without giving out your secrets. Essentially, a 3rd party application that wants to access your Twitter account, using OAuth, will perform a redirection to an authorization page on Twitter, you will then tell Twitter to give them permission, and the application will be able to perform actions on your behalf.
This whole sequence of events occurs without needing to share a password with the 3rd party site. Instead, Twitter has shared a token to your account that the 3rd party application uses. If later, you find that you can't trust the 3rd party application, go to Twitter and cancel their access and Twitter will no longer allow that specific application to access your account.
Because access is controlled through Twitter, you don't have to do anything special for other applications because they still have access to your account. No one has your Twitter password and you don't have to encounter the pain of visiting every site.
OAuth is really the way forward in building applications that work with Twitter. By implementing OAuth, you can instill a degree of trust in your application because visitors know that you're taking a responsible approach, rather than asking them to unnecessarily share secrets.
I encourage you to use OAuth in all of your application development endeavors, which is fully supported by LINQ to Twitter. Anyway let’s do some coding; this code will do the authentication:
private WebAuthorizer auth;
protected void Page_Load(object sender, EventArgs e)
{
IOAuthCredentials credentials = new SessionStateCredentials();
if (credentials.ConsumerKey == null || credentials.ConsumerSecret == null)
{
credentials.ConsumerKey = ConfigurationManager.AppSettings
["twitterConsumerKey"];
credentials.ConsumerSecret = ConfigurationManager.AppSettings
["twitterConsumerSecret"];
}
auth = new WebAuthorizer
{
Credentials = credentials,
PerformRedirect = authUrl => Response.Redirect(authUrl)
};
if (!Page.IsPostBack)
{
auth.CompleteAuthorization(Request.Url);
}
if (string.IsNullOrWhiteSpace(credentials.ConsumerKey) ||
string.IsNullOrWhiteSpace(credentials.ConsumerSecret))
{
// The user needs to set up the web.config file to include Twitter
consumer key and secret.
lblInfo.Text = "Please set up Consumekey and ConsumerSecret in your
web.config";
}
else if (auth.IsAuthorized)
{
screenNameLabel.Text = "Logged in as " + auth.ScreenName;
lblInfo.Text = "";
}
else {
lblInfo.Text = "You are not authorized from twitter.";
}
}
protected void authorizeTwitterButton_Click(object sender, EventArgs e)
{
auth.BeginAuthorization(Request.Url);
}
The WebAuthorizer class is the class will do the OAuth authentication for you, when user click on authorize button the browser will be redirected to a page like this:
So the page will redirect to twitter site and user will pass his username/password to twitter website, not the application. After successful authentication the page will be redirect to application callback URL and IOAuthCredentials property of WebAuthorizer class is loaded now.
Now the user is authenticated and can use his/her twitter account through the application features. There are few points should be considered, the credential will hold OAuthToken and AccessToken from twitter, these values can be hold in a Session and set in SessionStateCredentials class so user doesn’t need to login again and again when navigating through different pages of application, they can also save in database and in this way user will login into the website just once.
Account Information
Account class hold information related to twitter account, this contains numbers of Friends ( following account ) , Followers, Updates and favorites. So to get these information a linQ query should be written from this class:
twitterCtx = new TwitterContext(auth);
var accountTotals =
(from acct in twitterCtx.Account
where acct.Type == AccountType.Totals
select acct.Totals)
.SingleOrDefault();
lblFriends.Text = accountTotals.Friends.ToString();
lblFollowers.Text = accountTotals.Followers.ToString();
lblupdates.Text = accountTotals.Updates.ToString();
lblFavourites.Text = accountTotals.Favorites.ToString();
From a coding experience perspective, the TwitterContext type is analogous to DataContext (LINQ to SQL) or ObjectContext (LINQ to Entities).TwitterContext instance, twitterCtx uses to access IQueryable<T> tweet categories.
Each tweet category has a Type property for the type of tweets wants to get back. For example, Status tweets can be made for Public, Friend, or Usertimelines. Each tweet category has a type enum to helps figure out what is available.
Just like other LINQ providers, IQueryable<T>returns from the query. You can see how to materialize the query by invoking the ToList operator. Just like other LINQ providers, LINQ to Twitter does deferred execution, so operators such as ToList and ToArray or statements such as for and foreach loops will cause the query to execute and make the actual call to Twitter.
Friends and Followers
Now to get details on these data, some other queries should be used from other classes. User class is used to get details about friends and followers:
twitterCtx = new TwitterContext(auth);
var friends =
from tweet in twitterCtx.User
where tweet.Type == UserType.Friends &&
tweet.ID == auth.UserId
select tweet;
gvFriends.DataSource = friends;
gvFriends.DataBind();
var followers =
from tweet in twitterCtx.User
where tweet.Type == UserType.Followers &&
tweet.ID == auth.UserId
select tweet;
gvFollowers.DataSource = followers;
gvFollowers.DataBind();
This class contains other information related to user like Categories, Lookup and Search. This can be used the same way as Friends and followers.
Get Statuses and Retweets
To get statuses from your friends Status class can be queries, it contains different type of filters which can be included in Where clause. As an example this block of code will return statuses by friends:
twitterCtx = new TwitterContext(auth);
var tweets =
from tweet in twitterCtx.Status
where tweet.Type == StatusType.Friends
select tweet;
StatusType is an enum which can be used to get retweets by me, or retweets by specific user and also retweets by/to me/user. Nice and easy.
Update Status
Updating status is very easy and one line of the code:
twitterCtx.UpdateStatus(“New status”);
There are many overloads for this method, for example it gets inReplyToStatusId , Latitude, Longitude, placeId…
How to Retweet
Again this part is very easy, only StatusID of tweet is needed:
twitterCtx = new TwitterContext(auth);
var retweet = twitterCtx.Retweet(txtStatusId.Text);
lblInfo.Text = "User: " + retweet.Retweet.RetweetingUser.Name +
" - Tweet: " + retweet.Retweet.Text +
" - Tweet ID: " + retweet.Retweet.ID
Retweet method returns a Status object which holds information related to the tweet.
References
Registered users also have the option of downloading the Linq2Twitter sample. Please register to receive your copy.