← Back to all blogs

Featured Posts

Posts in 'web'

RIA Services, LINQ to Entities and C1DataGrid

Creating your app the best, cleanest way from the start is everyone's main objective when starting out or starting over. Everyone strives for that "n-tier" architecture in their application design, and by that I mean having each tier of the application in its own separate and distinct layer (presentation, data, business, etc). This architecture leads to cleaner designs and scalability because developers only have to modify or add specific layers when it comes time to change the UI screens or the underlying technology, etc. A full-blown rewrite is no longer necessary.

What's New in 2010 v2

Learn about the exciting new features of ComponentOne's latest release of Studio for Silverlight and WPF

RIA Services Deployment Error: NotFound for query 'GetUser'

So, today for the first time i've tried to deploy a WCF Ria Services application (Silverlight Business Application) to an online server. Of course, the whole app worked great on my dev machine. Not so much the case once I tried to deploy it....

FlexGrid Update Available (Build 46)

This prerelease version adds several new methods and properties:

FlexGrid Migration to WPF and Silverlight

FlexGrid is a lightweight and flexible datagrid control with an easy-to-use object model. It offers unique features like true unbound mode, cell merging, flexible styling, multi-cell row and column headers as well as quick and simple printing. What really makes the FlexGrid unique is the power and simplicity of its object model and great performance.

Adding More Interaction to C1Chart (Drag Points)

The ComponentOne Chart control (WPF/Silverlight) provides four useful methods that help with custom user interaction. They allow you to determine which data point is nearest the mouse, as well as quickly convert plot coordinates to control coordinates and vice versa. Use any combination of these methods to unlock virtually any form of user-to-plot interaction imaginable.

2010 v2 Released!

Studio for Silverlight 4 (Build 80)

Epic AdventureWorks Part 4 - The Style

This article is (finally) the fourth of a four part series: Epic AdventureWorks Part 1 - The Blueprints Epic AdventureWorks Part 2 - The Model Epic AdventureWorks Part 3 - The Web App Epic AdventureWorks Part 4 - The Style Check out the AdventureWorks ASP.NET Sample ASP.NET app online. And now, I introduce to you, Jon "Jebro" Coulter. This is the CSS ninja that styled the entire app. This entire article was written by him so kick back, relax and listen to how he styled AdventureWorks. There are a few VisualStyles that make up the controls in this page, the majority of them being custom or based on Windows7 BonusVisualStyle. Let's start with the menu. This is a hierarchical tab control used as a menu. The styling for this is very simple; it is a custom visual style with minimal styling added. Hierarchical tabs work by using levels, so here you can see 'level0' is styled as a dark bar, and 'level1' is styled as a brighter blue as it is going to represent where you are. The benefit of hierarchical tabs is that it can also function similar to a breadcrumb, as you can see the page you are currently on is in bold as well as the category you are in. #hd .menu {background:none repeat scroll 0 0 #333333;clear:both;display:block;margin:0;padding:0;width:100%;}#hd .level0 {border-bottom:3px solid #0099CC;}#hd .level1 {background:none repeat scroll 0 0 #007399;clear:both;color:#FFFFFF;display:block;margin:0;outline:medium none;padding:0 2%;width:96%;}#hd .menu .C1Selected {-moz-border-radius:3px 3px 0 0;background:none repeat scroll 0 0 #0099CC;color:#FFFFFF;font-weight:700;}

OLAP Tools for Silverlight

What are OLAP Tools?

Customizing Scheduler for Custom Data

The C1Scheduler control provides an appointment data model common to most scheduling applications. This model includes data storage for the default appointment fields:

OLAP for Silverlight Beta Released

ComponentOne unleashes a whole new set of Silverlight controls specifically designed for analyzing data in the form of pivot tables and charts. These OLAP controls provide dynamic views of data. End-users can build and change views on the fly with a drag-and-drop interface similar to that found in Microsoft Excel. This type of dynamic analysis is great for discovering trends in data which cannot be uncovered by simply looking at tabular data.

Epic AdventureWorks Part 3 - The Web App

This article is the third of a four part series: Epic AdventureWorks Part 1 - The Blueprints Epic AdventureWorks Part 2 - The Model Epic AdventureWorks Part 3 - The Web App Epic AdventureWorks Part 4 - The Style Check out the AdventureWorks ASP.NET Sample ASP.NET app online. Now that we designed the blueprints and built an object model, its time to start to develop a website. I am going to create an ASP.NET 3.5 website project. I want to take advantage of the model I built with the Entity Framework and use LINQ to easily query the model. These two technologies will help me rapidly develop against this otherwise daunting database. To build a website I usually start with the most critical piece first and work down the chain from there. So in my opinion the most important part of a retail company's website is the product catalog. Some people might argue that it is the shopping cart, but the way I see it, no one is going to buy until they know what the product is. So we will assume there is a direct sales team to take orders until our shopping cart is launched. General practices Before we dig into code, here are a few of general practices I use when doing ASP.NET web development. Follow MVC Patterns (even in WebForms) I have been following this pattern subconsciously for years of WebForms development. It just makes sense. So how do I follow the pattern in WebForms? In a nutshell: loosely. I like to seperate all of my UI "chunks" or "modules" into UserControls and create Classes for them to inherit. I usually make the Classes more general like "ProductModule" and many UserControls inherit from it to take advantage of common data models and params. I then organize my UserControls into folders that group them logically. For this project I create "Products" and "Order" to section the modules into product catalog UI and shopping cart UI. In the root UserControls folder I add common UI elements like Header and Footer. Take Advantage of ASP.NET UI Features I like to utilize App_Themes, Skins and MasterPages to make UI development faster and more efficient. App_Themes are a nice way to stay organized and adding Skins to them helps to apply theme and behavior settings across the entire app. MasterPages are probably my favorite feature added in ASP.NET 2.0 and have saved me countless hours of work. I am also a fan of using nested MasterPages to really build rich UI templates across a large web app, but we will just use on in this project. Import a CSS Layout Framework Once of the biggest frustrations in web design is layout. I consider myself a CSS guru and still get stumped on some complex layout issues. If you want to spend your time actually styling things with CSS and not trying to hack your layout to work in all browsers then this practice is for you. In this app (and all my work) I chose to use YUI stylesheets including reset, base and grids. Reset will basically reset style on every html element to create a clean pallete across all browsers. Base (which requires reset) will give consistent styling to all html elements. Grids (which requires reset and base) creates a layout framework for you to build pretty much any type of column layout you need. It gets a little crazy when writing the markup, so they also provide a grid builder to make things easier. I can't recommend this practice enough. It has saved me so much time and prevented so many headaches. Use 3rd Party Controls As much as I would love to think I can build every aspect of my projects alone, it just isn't reality. I know it sounds like hot air coming from me, but using 3rd party controls is a great way to shift focus from the tedious code to the fun stuff. I have already wasted too many precious keystrokes writing sort algorithms and browser hacks. I had to draw the line and let the pro's do it for me. One of the most productive things you can do as a developer is know when to delegate work. For me, that delegation includes using custom controls that usually have more functionality than I would ever care to write for myself. Seriously, who really wants to sit down and write a PDF writer? No offense if that kind of programming is your cup of tea, but it sure isn't mine. I want to build the app, get it out the door and watch people use it. Then I can spend my time refining the UX and not trying to fix bugs in the chart control I was to stubborn to purchase. That's right, you need to think of how much effort you are going to spend supporting the custom controls you build on your own, not just how long it would take to develop. The next time you go to develop some controls I would ponder how valuable your time is and whether it's worth your keystrokes. I'm sure you get the picture, so I will stop with the C1 fanboy stuff. Let's Dev! Build the Navigation The AdventureWorks database products are organized by Category and SubCategory. So the first thing to do is make a few methods to build these lists.  Let's start with one we need to make the main menu. For the menu we will need a list of the the base categories in the database. So here is what that method would look like using LINQ against my Entity Model. public static List GetMainCategories(){ var cats = from cat in Common.DataEntities.ProductCategory select cat; return cats.ToList();}

Handling Large Data Sets with C1DataGrid and C1Chart

Most Silverlight applications access data from web services. The problems we face is that sometimes the UI controls perform poorly when handling large amounts of data, whether you're using a listbox, datagrid, chart, etc, and it also becomes impractical to try and send really large amounts of data over the wire at once. So we have to look at how we can workaround these problems to optimize our application. There are several techniques we can use, some of which are provided for free from the controls:

FlexGrid Beta June Update

June 2010 Beta Release Available!