Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


SSWUG

Reader rating:
Click here to read 14 comments about this article.
Article source: CoDe (2004 - September/October)


Article Pages:  1  2 3 4 5 - Next >


Drag-Once Databinding

Using the new Data Sources Window in Visual Studio 2005, developers can now drag columns of their typed DataSets or properties of their own business objects directly to their form. Visual Studio 2005 will create, name, and label controls for each bound property. For those that prefer to lay out the forms with the toolbox, developers can use "Connect the Dots DataBinding" to drag and drop from the Data Sources Window onto their existing controls.

Developers want easier ways to create their forms. There are many approaches including UI frameworks that aim to simplify forms creation. Typically each approach makes assumptions about how the UI may be formatted, or they require interfaces or base classes. While these frameworks would allow developers to quickly create forms based on some schema of objects, it can be difficult to customize the layout. Building a great application isn't just about how fast you can complete the application. A great application includes developer productivity and intuitive use by its end users. In order to create great UI, developers need precise layout for each control on the form.

"
If you change the schema of your business object, typed DataSet or Web service, the Data Sources Window will refresh to show this new schema.
"

If we look at the goals for enabling RAD form development we find some basic requirements:

  • Easily create controls based on some schema
  • Precise layout for each control
  • Mapping data types to specific controls
  • Ability to vary the default control for a particular column/property
  • Ability to add custom controls to the list of available controls
  • Creating a label for each databound control
  • Establish databinding for each control
  • Naming each control something more meaningful than TextBox1, Label1, etc.

Enter Visual Studio 2005 and the Data Sources Window

Visual Studio 2005 introduces a new, simple, yet very powerful model for building forms. The Data Sources Window is a new tool window that displays selected objects within your project that you can use to create data bound forms. The Data Sources Window can display several different types of data sources including typed DataSets, user defined objects (business objects), and Web services. Developers may drag items to their form and Visual Studio will create databound controls, labels for the controls, and name the controls based on their bound properties.

"Connect the Dots"

Click for a larger version of this image.

Figure 1: Form1 bound to Customers.

While it's very helpful to create UI from a new tool window, developers like to work in different styles. Some developers prefer working from the Toolbox. In addition to the Drag-Once DataBinding from the Data Sources Window, the Data Sources Window also has a feature the VB team calls "Connect the Dots." To use it, developers lay out their form from the ToolBox and then drag from the Data Sources Window onto existing controls. Rather than create a new control, the Data Sources Window will establish the databinding to the default binding property of the existing control using some new databinding attributes. Since we assume the developer has already designed the user interface, Visual Studio will not create labels or change the name of the controls.

&

By: Steve Lasker

Steve is a Program Manager on the Visual Basic team at Microsoft. His team is responsible for many of the Data Design-Time features for building client applications including the Data Source Window and the DataSet Designer. Prior to joining Microsoft, Steve was a technical architect and Director of R&D at a large consulting company building Web, client and device applications for corporate customers. Steve has an engineering background in the remote broadcasting and entertainment industries.

Contact Steve via e-mail or send feedback on the VB Team Blog http://blogs.msdn.com/vbteam/

steve.lasker@immedient.com

Fast Facts

Visual Studio 2005 will offer productivity features that will reduce the tedium of building forms. The Data Sources Window will help you build forms faster.



Article Pages:  1  2 3 4 5 - Next Page: 'Data Source Types' >>

Page 1: Drag-Once Databinding
Page 2: Data Source Types
Page 3: Giving It a Test Drive
Page 4: Hierarchal Objects
Page 5: CustomerFactory

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
4.6 out of 5

264 people have rated this article.

Instantly Search Terabytes Of Text
“Lightning Fast”
– Redmond Mag
“Covers all data
sources” – eWeek
25+ fielded & full-text search options
dtSearch’s own document filters highlight hits in popular file types
Web Spider supports static & dynamic data
APIs for .NET, Java, C++, SQL, etc.
Win / Linux (64-bit & 32-bit)
www.dtSearch.com
 

      AppsWorld Europe

 

SSWUG