Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Dropthings – my open source Web 2.0 Ajax Portal has gone through a technology overhauling. Previously it was built using ASP.NET AJAX, a little bit of Workflow Foundation and Linq to SQL. Now Dropthings boasts full jQuery front-end combined with ASP.NET AJAX UpdatePanel, Silverlight widget, full Workflow Foundation implementation on the business layer, 100% Linq to SQL Compiled Queries on the data access layer, Dependency Injection and Inversion of Control (IoC) using Microsoft Enterprise Library 4.1 and Unity. It also has a ASP.NET AJAX Web Test framework that makes it real easy to write Web Tests that simulates real user actions on AJAX web pages. This article will walk you through the challenges in getting these new technologies to work in an ASP.NET website and how performance, scalability, extensibility and maintainability has significantly improved by the new technologies. Dropthings has been licensed for commercial use by prominent companies including BT Business, Intel, Microsoft IS, Denmark Government portal for Citizens; Startups like Limead and many more. So, this is serious stuff! There’s a very cool open source implementation of Dropthings framework available at National University of Singapore portal.

Visit: http://dropthings.omaralzabir.com

Dropthings AJAX Portal

I have published a new article on this on CodeProject:

http://www.codeproject.com/KB/ajax/Web20Portal.aspx

Get the source code

Latest source code is hosted at Google code:

http://code.google.com/p/dropthings

There’s a CodePlex site for documentation and issue tracking:

http://www.codeplex.com/dropthings

You will need Visual Studio 2008 Team Suite with Service Pack 1 and Silverlight 2 SDK in order to run all the projects. If you have only Visual Studio 2008 Professional, then you will have to remove the Dropthings.Test project.

New features introduced

Dropthings new release has the following features:

  • Template users – you can define a user who’s pages and widgets are used as a template for new users. Whatever you put in that template user’s pages, it will be copied for every new user. Thus this is an easier way to define the default pages and widgets for new users. Similarly you can do the same for a registered user. The template users can be defined in the web.config.
  • Widget-to-Widget communication – Widgets can send message to each other. Widgets can subscribe to an Event Broker and exchange messages using a Pub-Sub pattern.
  • WidgetZone – you can create any number of zones in any shape on the page. You can have widgets laid in horizontal layout, you can have zones on different places on the page and so on. With this zone model, you are no longer limited to the Page-Column model where you could only have N vertical columns.
  • Role based widgets – now widgets are mapped to roles so that you can allow different users to see different widget list using ManageWidgetPersmission.aspx.
  • Role based page setup – you can define page setup for different roles. For ex, Managers see different pages and widgets than Employees.
  • Widget maximize – you can maximize a widget to take full screen. Handy for widgets with lots of content.
  • Free form resize – you can freely resize widgets vertically.
  • Silverlight Widgets – You can now make widgets in Silverlight!

Why the technology overhauling

Performance, Scalability, Maintainability and Extensibility – four key reasons for the overhauling. Each new technology solved one of more of these problems.

First, jQuery was used to replace my personal hand-coded large amount of Javascript code that offered the client side drag & drop and other UI effects. jQuery already has a rich set of library for Drag & Drop, Animations, Event handling, cross browser javascript framework and so on. So, using jQuery means opening the door to thousands of jQuery plugins to be offered on Dropthings. This made Dropthings highly extensible on the client side. Moreover, jQuery is very light. Unlike AJAX Control Toolkit jumbo sized framework and heavy control extenders, jQuery is very lean. So, total javascript size decreased significantly resulting in improved page load time. In total, the jQuery framework, AJAX basic framework, all my stuffs are total 395KB, sweet! Performance is key; it makes or breaks a product.

Secondly, Linq to SQL queries are replaced with Compiled Queries. Dropthings did not survive a load test when regular lambda expressions were used to query database. I could only reach up to 12 Req/Sec using 20 concurrent users without burning up web server CPU on a Quad Core DELL server.

Thirdly, Workflow Foundation is used to build operations that require multiple Data Access Classes to perform together in a single transaction. Instead of writing large functions with many if…else conditions, for…loops, it’s better to write them in a Workflow because you can visually see the flow of execution and you can reuse Activities among different Workflows. Best of all, architects can design workflows and developers can fill-in code inside Activities. So, I could design a complex operations in a workflow without writing the real code inside Activities and then ask someone else to implement each Activity. It is like handing over a design document to developers to implement each unit module, only that here everything is strongly typed and verified by compiler. If you strictly follow Single Responsibility Principle for your Activities, which is a smart way of saying one Activity does only one and very simple task, you end up with a highly reusable and maintainable business layer and a very clean code that’s easily extensible.

Fourthly, Unity Dependency Injection (DI) framework is used to pave the path for unit testing and dependency injection. It offers Inversion of Control (IoC), which enables testing individual classes in isolation. Moreover, it has a handy feature to control lifetime of objects. Instead of creating instance of commonly used classes several times within the same request, you can make instances thread level, which means only one instance is created per thread and subsequent calls reuse the same instance. Are these going over your head? No worries, continue reading, I will explain later on.

Fifthly, enabling API for Silverlight widgets allows more interactive widgets to be built using Silverlight. HTML and Javascripts still have limitations on smooth graphics and continuous transmission of data from web server. Silverlight solves all of these problems.

Read the article for details on how all these improvements were done and how all these hot techs play together in a very useful open source project for enterprises.

http://www.codeproject.com/KB/ajax/Web20Portal.aspx

Don’t forget to vote for me if you like it.

DotNetKicks Image
Published Wed, Apr 8 2009 19:16 by omar

Comments

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Thursday, April 09, 2009 7:38 AM by Michael

Just curious despite latest and greatest in many areas for this application , you stick to ASMX Web Services. Is it just because you don't see real benefits from more recent Microsoft offerings such as ADO.Net Data Services or WCF services.

You quite clearly stated that Linq to SQL doesn't scale properly unless compiled , that's why you decided to to experiment with services ?

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Thursday, April 09, 2009 8:18 AM by omar

I have nothing against WCF, I just did not get enough time to replace the ASMX layer with WCF implementation. It's surely the greatest thing since banana juice.

About ASO.NET Data Services, honestly I haven't made real implementation out of this tech yet. Something very interesting to explore. Stay tuned.

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Thursday, April 09, 2009 6:37 PM by Mekon

I'm  abit confused by your page weight issues; the MS ajax and jQuery should be cached on the client when they first hit the site;  

Are you saying that the intial page load got better or all of the page loads?

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Monday, April 20, 2009 7:51 PM by Michael

Thanks for uncovering and describing inner works since initial release.  Could you also reveal the rationale to use Google for code and Codeplex for documentation and issue tracking ?

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Monday, April 20, 2009 8:35 PM by Michael

Back in July 2008 you mentioned a possibility of ASP.NET MVC version of this portal using jQuery.

Even if you abandoned such plans it would be interesting to see a present ( article or something ) like you did initially for Dropthings with Codeproject article "Build Google IG like Ajax Start Page in 7 days using ASP.NET Ajax and .NET 3.0" showcasing this alternative approach.  Show us the way in a darkness please :)

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Monday, May 25, 2009 4:21 AM by ambatisreedhar

Hi

I am  Sreedhar Ambati a dotnet developer.

I want to use your application.

Please tell me how to configure it.

I have required vs 2008 with silverlight addons.

I am facing problem with the connectionstring.

You have inbuilt database.

I couldnt able to connect to that using the code specified in web.config.

Is there any facility in your application to drag desktop document on to the web application?

My email id: ambatisreedhar@hotmail.com

Thanks

Sreedhar Ambati

# Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity - Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5

Saturday, July 04, 2009 5:50 PM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity - Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5

Monday, July 06, 2009 10:34 PM by 9eFish

9efish.感谢你的文章 - Trackback from 9eFish

# re: Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Tuesday, September 15, 2009 2:33 PM by Monty

Can this be implemented using MVC framework too?

Thanks,

-Monty

# Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Sunday, October 11, 2009 8:06 PM by PimpThisBlog.com

Thank you for submitting this cool story - Trackback from PimpThisBlog.com

# Klonopin.

Saturday, October 24, 2009 12:35 PM by Clonazepam klonopin.

Klonopin withdrawal. Klonopin side effects. Alcohol klonopin and suboxone. Klonopin. Klonopin for anxiety.

Leave a Comment

(required) 
(required) 
(optional)
(required)