TechEd – June 2 (Day 1)
Martin Schaeferle--Vice President of AppDev Products
Ken Getz--Sr. Consultant from MCW Technologies, LLC
http://www.mcwtech.com/2008/teched
New Features in Visual Studio 2008:
LINQ – Language Integrated Query
Is a language compiler not a .Net framework feature. It is used to query, set and transform operations for .Net. It makes querying data a core programming concept and it works with all languages. It uses the IEnumerable class. You can LINQ to Datasets, Entities, SQL, or XML. You can basically just write a statement rather than having to loop through something and write a bunch of code. This new feature definitely looks like something that we will want to begin using in the future.
General Format:
From…Where…OrderBy…Select
Note: Select goes last so that it gets intellisense. It must be public and static. It accepts a parameter and the type of thing you are extending.
Example:
Dim numbers As Integer = {1,5,3,6,10,12,8}
Dim oddNumbers = From number In numbers _
Where number Mod 2 <> 0 _
OrderBy number Descending _
Select number
Query Extention Methods include All, Any, Average, Where, Concat, Contains, ConvertAll, Count, Distinct, Except, OrderBy, ThenBym, Select, and more…
Functions require some way to indicate values on which to operate
Lambda Expression:
For Each a As Actor In Actors _
.Where (Function(byVal x) x.Birthdate.Month = 9)
* Acts as an anonymous method.
* Supply a single value and expression return value
* Create a function and call it
You can even query a text file and get all the words that meet some criteria by using a LINQ query.
You can use LINQ to SQL
Server Explorer Window
Drag in tables or stored procedure
Do a LINQ statement to get whatever you want from it or manipulate the data
Then do DB.SubmitChanges
You can LINQ to DataSets(typed and untyped)
Note: VB uses the ! or bang operator, however, C# doesn’t have one. When using LINQ, VB has many more features than C#. This would do away with xsl.
There are samples at 101 LINQ Samples on the http://msdn2.microsoft.com site.
TableAdapterManager -- You can cache data locally. It seperates the dataset and the table adapter. You can also code n-tier applications. By using the TableAdapterManager you can write code that ensures that the right things happen when adding or deleting data from the database. You can use UpdateAll and UpdateOrder. It can be used to synch local data. It has a new set of classes—“Microsoft.Syncronization.Data” Note: Any ADO.Net and SQL Server Compact 3.5 (formerly SQL S Mobile Edition)
N-Tier Architecture--Layers: Presentation, Business, Data Access, and Database.
Note: The DataSet and DataAdapter are now “.split”.
WPF – Windows Presentation Foundation
It takes advantage of all your hardware power, however, it is more difficult than windows forms to get anything to look decent without the help of a dedicated graphics designer. However, with these new technologies, they are vector-based rather than pixel based, so you can scale or zoom without loosing resolution. Same with SilverLight. It is the same graphics engine that determines XML. Note: It would be better to use DirectX for hardcore game coding, however, WPF and DirectX could be combined to write something like that. You can go to http://www.codeplex.com to download a sample.
XAML – Extensible Application Markup Language
It is used to provide markup/XML-based grammer for WPF.
WCF – Windows Communication Foundation
Provides a unified program model for building distributable applications. It is designed for loosely coupled communications.
Services – functionality exposed to outside clients
Endpoints – how services exposes itself to the client
Address (URL, URI)
Binding (TCP, HTTP)
Contract (how data will move back and forth. Written in XML and defines communication
WF – Windows Workflow Foundation
You can manage the flow of an application. Reminds me of the flow design in Pivotal Agents. Visual designer that makes it easy to just drag in activities that you want to perform and wire them up. Activities are workflow controls—while, code, listen, etc.
You execute actions based on conditions. Could be used to kick-off some type of processing and then send emails or create files based upon a condition.
Classes in System.Workflow namespace
Runtime environment
Note: It works in 2005 if you install a few things
Client Application Services
Role based security so that user’s project settings can be saved to the server so that they come up the same no matter where the user logs in.
Office 2007 Projects in VS2008
Office projects can now be built right in Visual Studio. It completely replaces VBA with real code. You can do a single document or create and add-in that can be used again. You can create a Ribbon item to put a bar at the top of an office document that can interact with the database.
Wednesday, June 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment