Download Slide 1 - Fort Smith .NET User Group

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Oracle Database wikipedia , lookup

Database wikipedia , lookup

Microsoft Access wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Database model wikipedia , lookup

Transcript
Michael Paladino
Lead Application Developer
EagleOne


Lead Application Developer at EagleOne
Experience and interests:
 Classic ASP
 .NET
 SQL Server
 Content Management Systems
 Open source software
 FSDNUG!








Problems with standard ADO.NET data
access
What is ORM?
What is SubSonic?
Setup
Basics
Web Form Controls
Other SubSonic Goodness
Summary / Resources

Demo 1: Data access in code-behind
 Requires duplication
 Lots of hand-coding
 No compile-time checking

Demo 2: Custom objects
 Lots of hand-coding
 No compile-time checking


Object-Relational Mapping
Wikipedia:
 “…programming technique for converting data between incompatible type
systems in relational databases and object-oriented programming
languages.”


Typically automated
Example .NET Implementations:




NHibernate
Wilson’s O/R Mapper
ADO.NET Entity Framework
LINQ to SQL
ORM tool – Provides .NET objects that allow
access to the underlying database.
 Designed for web development but can be used
in Windows Forms apps
 Collection of web forms controls to speed up
web development
 Provides ability to track database changes
 Supports SQL Server 2000 and 2005, MySQL,
Oracle (SQLLite, SQLCE, PostGres coming soon)
 Open Source


One-Time
 Download and install release 2.0.3
 Setup toolbar buttons in Visual Studio
 Add controls to Visual Studio toolbox

Per-Project
 Add reference to SubSonic.dll
 Update Web.config
 Create _DB and _Generated folders

Basic blog engine
 Multiple authors, only one per post
 Multiple categories per post
 Comments
 Simple editing

Database structure
 SubSonic conventions


ActiveRecord pattern
Working with single objects
 ViewPost.aspx

Working with collections
 Default.aspx
 Add comments to ViewPost.aspx

Updating and deleting
 EditPost.aspx







Calendar Control – EditPost.aspx
Radio Buttons – EditPost.aspx
Dropdown – EditPost.aspx
ManyManyList – EditPost.aspx
Scaffold – Scaffold.aspx
Auto Scaffolding – AutoScaffolding.aspx
QuickTable – Sandbox.aspx







Views – Sandbox.aspx
Stored Procedures – Sandbox.aspx
Query Tool – Sandbox.aspx
Partial Classes – Comment.vb
“Sugar” – Sandbox.aspx
DB Versioning
Template Customization


SubSonic has the potential to greatly speed
up database-driven web development
Future possibilities?

Main Site: http://subsonicproject.com/

CodePlex: http://www.codeplex.com/subsonic

Rob Conery: http://blog.wekeroad.com/

Presentation Slides:
http://www.fsdnug.org/previousMeetings.html

Michael Paladino
 Email: [email protected]
 Blog: www.mpaladino.com
 Twitter: www.twitter.com/mpaladino
 LinkedIn: http://www.linkedin.com/in/michaelpaladino

Fort Smith .NET User Group
 www.fsdnug.org