Notes from the TechEd 2007 Birds of a Feather I did with Alan

Shawn Weisfeld
C# MVP
President Orlando .NET Users Group
http://www.shawnweisfeld.com
shawn@shawnweisfeld.com

Alan Stevens
President East Tennessee .NET Users Group
alanstevens@gmail.com
http://netcave.org/


Notes by Dave Noderer: daven@computerways.com
(thanks Dave for taking notes during the session)

 - Microsoft out of the box solution.
 - Drag and drop to create a database and CRUD sql statements
 - Subclass controls to add functionality
 - Billie has a set of controls to add a number of functionality
 - How do you do this??
   - Ken Getz App dev videos
   - Many examples out there
   - Much easier with 2005 than 2003
   - ASP.NET for dummies
 - In many cases the out of the box method does not work in the realworld
 - If you write your own, you know exactly what it does
 - One person does CICS migration to .net so adds validation to cover all the bases
 - Enterprise service blocks has a lot of validation
 - Difference between data abstraction layer and data access layer.
   - Access – just layer above ado.net
   - Data abstraction – business objects and operatios
 - MyGeneration – Useful for one user
   - Third party tool free tool
   - Looks at db and generates data abstraction
   - Have to use it out of visual studio or it will sometimes crash
 - Typed datasets
   - Depends on platform  - 1.0 problems, 2.0 much better
   - Nice start on business objects
   - Create dataset up front, generates classes, uses partial classes
   - Can extend it through the partial classes
   - Have to stay within the lines.
 - SQL Junkie… use stored procedures, design database
 - CSLA
   - Application framework
   - Have a book to learn it from
   - Lots of community support
   - Limits
   - Mark Dunn has training contract with Rocky Lhotka
   - Has been around for many years, over many generations
   - APRESS – Professional Business Objects
 - Ibinding lists – generics
   - Generics – Collection of anything, employees, customers, etc.
   - Common list functionality but put any type of object
   - Strongly typed vs arraylist, arraylist required boxing/unboxing
   - Generic collections are very high performance
   - Generic methods takes any type
   - Collections is one but there are others
   - Ibindinglist does a lot of the work for you
   - Binary search menthod, find, findall comes back with a collection
 - Other issues
   - Code is always the same
   - Very boring
 - Codesmith
   - Templates are easy to create
   - Existing templates can be used as well
 - Net tiers?? Is this a separate
   - Makes you inherit from their classes
   - Expresses business objects as excel rows and columns
 - Business Objects
   - Dataset is memory image of data, tables, rows, columns, relationships
   - Business objects is Customers -> Orders -> OrderDetails as objects
   - List of invoices as a collection
   - Al: Database is for efficient storage and retrieval of data but Application wants to have the data modeled in the application domain
   - In VS2k5 there is business object datasource
 - Hiearchy – Levels of pain
   - 1. Datasets are a cheap ORM
        Directly related to the database
   - 2. Business objects close to db but adds some business rules
        Employee address required if employee is full time
   - 3. Are there business classes not persisted to the database
          Then it might make sense
 - UI validation
   - UI – but spreads around
   - Biz Object – Centralized, easy to manage
   - DB – Centralized but much more obscure and removed from the UI
 - ORM – Object Relational Mapping
   - Check out www.dotnetrocks.com pod casts.
   - There were a number of ORM related shows and an ORM smack down recently
   - Many others.. subsonic, nhibernate, llbgenpro
   - From Microsoft will be coming the “Entity Framework”
          Generates ORM from db
          April to be released
          Link to SQL due out with VS2008 but very limited
   - Also have Entity SQL which is common sql that will work for both SQL Server and Oracle
 - LINQ
   - Allows sql type of synatax in the language to allow you to query over any collection, xml or data.
          Linq to objects - Basic linq over in memory collections and business objects
          Linq to SQL extends out the to database
          Linq to XML generates xpath
   - What is the implications??
          Perfomance?
          Can’t bind to query
   - Can use Linq to query database
 - Dynamic Language Runtime
   - Duck typing
   - If it looks like a duck and walks like a duck it must be a duck
   - Dynamic controls – late binding – will figure it out at runtime
 - All I want to do is bind data
   - Use datatable and bind to grid
 - Third party controls
   - Telerik, DevExpress, Infragistics
   - Issues with upgrading
   - If you stick with Microsoft… fewer issues with upgrades
   - Tedie.net?? controls did not catch up going from 1.1 to 2.0
   - If you subclass from the telerik control you have a chance of changing the root classes!
 - Reporting
   - Information Builders – Old hold over from mainframe days
   - You can generate pdf off of report viewer control -> REPORT VIEWER JUNKIES??? (Alan)
   - Reporting services
   - Dane Prairie – WIN2PDF, low cost
   - Component One, Data Dynamics, Dev Express
 - POST ON BLOG… INSTRUCTIONS FOR SUBCLASSING! (Alan)
 - Client side sorting on client.
   - AJAX
          Some controls using JSON which is terse key/value pair
          Wally McLure has book
          http://www.wrox.com/WileyCDA/WroxTitle/productCd-047178544X.html
          http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470112832.html
          Web developer tool to monitor traffic.
          http://projects.nikhilk.net/Projects/WebDevHelper.aspx (the site was down when I tested this link, don’t know what is up)
   - Infragistics has client side control
   - Infragistics allows filtering by column on
 - Template columns
   - Build a filter
   - Post back to the server and re-query
   - May lose changes

Initial Topic ideas by Shawn & Alan

BOF26 - Binding GridView, DropDownList, etc. with CRUD
Friday, June 8 10:45 AM - 12:00 PM, S331 A

Moderator: Dan Wygant
Join in a discussion of binding with ASP.NET controls such as GridView, DropDownList and DetailView and others. Share in the discussion of techniques using automatic code generation, using the List<> generic to bind data in a form to data in a database, and using other techniques that have worked well and not so well. We Birds of a Feather can help each other by promoting discussions of how to bind into templates for highly customized views of the data with nearly zero code, providing for GUIs.

1) Out of the box databinding
   a. SqlDataSouce (sql right in the ASPX)
   b. Typed DataSets against the ObjectDataSource
2) Business Objects against the ObjectDataSouce
   a. Collection<T> vs. List<T> vs. BindingList<T>
      i. Using Collection<T> vs. List<T> (http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx) The first reason is that List<T> is designed for speed and for use as an internal implementation detail, whereas Collection<T> is designed for extensibility.
      ii. Collection<T> provides 4 overridable methods; ClearItems, InsertItem, RemoveItem and SetItem, which allow a derived class to be notified when a collection has been modified. In contrast, List<T> provides none. The second reason why you shouldn’t expose List<T>, is because it exposes too many members, many of which are not relevant in most situations. In contrast, Collection<T> exposes only a small number.
   b. Binding Attributes (Decorations) – DataObjectMethodAttribute (http://msdn2.microsoft.com/en-us/library/system.componentmodel.dataobjectmethodattribute(VS.80).aspx)
   c. ORM tools
      i. Framework
         1. SubSonic
         2. Mere Mortals
         3. CSLA
         4. Software Factories (from P&P)
         5. nHibernate
         6. IdeaBlade DevForce
         7. ORM.NET
         8. Genome ORM
         9. Deklarit
         10. LLBLGen
         11. Ruby
      ii. CodeGen
         1. CodeSmith
         2. MyGeneration
   d. LINQ
      i. LINQ to SQL
      ii. LINQ to Entities
      iii. LINQ to XML
      iv. BLINK (http://www.asp.net/sandbox/app_blinq.aspx?tabid=62)
         1. Blinq is a tool for generating ASP.NET websites for displaying, creating, and manipulating data based on database schema. Just point Blinq at a SQL database and it will create a website with pages that display sorted and paged data, allow you to update or delete records, create new records, and follow relationships between tables in your database. You don't need to write SQL queries to use Blinq; LINQ will generate optimized queries for you that request just the data you want to show. Blinq uses the May LINQ Community Tech Preview to access data. The code Blinq creates is simple and easy to customize to fit your needs. Everything in the website Blinq creates is meant as a starting point for a website that meets your needs perfectly, so have fun customizing the pages, experimenting with the code, and making it yours!
   e. Entity Data Model - EDM - http://msdn2.microsoft.com/en-us/library/aa697428(VS.80).aspx
3) Implications of AJAX?
   a. Server Side (i.e. sending html) vs. Client Side (i.e. Sending the Business Objects)
4) Third Party Controls
   a. DevExpress
   b. Telerik
   c. Infragistics
   d. FarPoint
   e. Component One

Published Saturday, June 09, 2007 9:39 AM by sweisfeld
Filed under: , , , , ,

Comments

No Comments