VSLive09 – SQL Server 2008 for developers
Leonard Lobel is the presenter – He is a doing a good job showing demos and covering just the right amount of details in slides. Striking a good balance between new features and basic understanding. Talks a bit fast, so sometimes I fall behind.
Got in late. SQL Server 2008 studio has some very nice features
Table defined types, table valued paramter (TVP) gives you the ability to define a variable which is actual a whole table (like a temp table) with a schema defined. They are stored tempdb (so a bit slower than CTE or table variable) but it can be indexed. Use case is something like an order table because you can flatten the schema for the header and order items. Instead of going round trip for each piece you can create a table with one call. Demo time
Very very nice! Quick and easy to get results and much less chat across the wire with a client.
Once you pass it – it is read only once you pass it down the stack. THere is no ALTER TABLE… AS TYPE so you need to drop it as well as the stored procedures
Next Topic – MERGE
Four statements in one
- select
- insert
- update
- delete
Operates on a join but you didn’t need to know about it
Start using it now – 100% compat with existing business logic, such as triggers
OUTPUT is for getting psuedo-tables after an operation
OUTPUT $action, inserted.*, deleted.*;
Demo time – he is showing how to do replication and it is really tight and interesting to watch. Give me more kool-aid
He does a nice demo for updating data and it looks really good – just too much to follow and he is talking a bit too fast.
Next – GROUP BY
Look at with Roll up and CUBE – frickin awesome great for summarization – produces sum for all possible combinations
new is GROUPING SETS – basically does it just for the category you ask for
SQL Server does Cubes right out of the box.
GROUPING helps to deal with distinguising between Nulls and All possible values rolled up
To get this from ORM you would need to use a view or something like that. We then had a short detour on when you might use TSQL vs ORM. He says doing reporting like this might be a place where you might want to use TSQL but he understands the conlict there.
BIG BENEFIT TO VSLive – IT IS NOT MS Conference so the presenters are not as kool-aid driven, much more frank conversation and discussion of pitfalls
New Date and Time variable
- Date
- Time
- datetime2
- datetimeoffset
use these instead of
- datetime
- smalldatetime
Some more about writing code and insulation between layer
He likes DataSets unless you need to serialize them. He thinks they are good for most people and don’t think you really need ORM. DataSets are not slower than DataReaders
He believes developers should only query against stored procedures – no access directly to the tables. For numerous reasons he then delimits the reasons – wow that is bit harsh but interesting to think about. He argues that with a where clause in LINQ, is that you pull back all the data and then filter on the client and why would you want to do that.
On to LINQ
LINQ is really a way to deal with collections to datasource and vice versa in a standard language. Trying to get rid of all these For loops where you process something to get a Collection of data objects.
On to LINQ to DataSet – look in System.Data.DataSetExtensions assembly
He says if you are starting new he says go to Entity framework – it is much more of an ORM mapper
Watching him decorate a Plain Old C# Object (POCO) with LINQ attributes and then doing really cool things. This is actually pretty neat stuff. As a person who doesn’t usually get into performance issues because of low transaction numbers, I am going to mostly go down this route.
He concludes morning session on stating – LINQ is going to be with us for a while and you better dig in. Some providers are better than other but you better learn it.
More to come after lunch!!! THis is a great session
VSLive – Building RESTful services using WCF 3.5
Jon Flanders found at www.rest-ful.net or www.pluralsight.com – vibrant speaker. He wrote RESTful.NET for O’reilly. He actually is a great speaker.
Hey Sean, he called it an architectural style – does he get correctness points for that.
Gives a short history of REST vs SOAP/WS* and now an introduction so I am tuning out again until he comes to how to do this with WCF. He is doing a good job talking about why REST is better.
VS2008 .NET3.5 SP1
Much fewer attributes to define the service. Just create a service and then create methods to respond to messages. Since there probably no needs for multiple implementations of the service you don’t need to use IService -> Service, just do the service. You need a WebGet annotation – with a UriTemplate = to the uri that you want to use to get this method called.
You do need a SVC file – a text file with the service definition for IIS to see the service, also needs a factory that is in his demo.
Fiddler is a good tool for doing REST debugging if you don’t want to use Firebug – made by MS.
Caching is a huge benefit for REST – especially with static data. Glad to hear Silverlight support JSON/ WCF has support for JSON – AJAX enabled WCF service from new file.
Easy to do with feeds with as well – showing how to create an Atom feed -built in helper methods.
There is a REST starter kit on codeplex.
GREAT SESSION – highly reccomend as a speaker and does a good job talking to .NET developers about why use REST.
VSLive – WCF a whirl wind introductio
Rob Green is the presenter
Available at www.mcwtech.com/2009/vslive/sf
WCF allows you to expose the same service through many protocols – not just SOAP over HTTP (did he just say SOAP, I am about to have listen to WS* stuff)
Looks like from this talk it only knows how to talk using XML as the data type and that you might have to define XSD. I think there is a REST using WCF in a later session. That might be more appropriate for what I want…
So while most of his talk is generic it looks to be focused mostly on WS* stuff. I may skip out and go to the LINQ session though it sounds like Entity Framework is the way to go. Nah stay here for now…
Interesting, Attributed Code seems to be the .NET equivalent to Java @ annotations.
The WCF test client shows you the XML payloads and the bound data – not bad
If the web service to front your service – delete the generated files and point it instead to the service you make first. Need the slides or demo to figure this stuff out and now I see what Dave B was talking about. There is a lot to remember to get this up and going – then again he is showing WS*.
Alright tuning out and doing work work – pop back in if he stops talking about WS*.
Ok, wacky pack but kinda cool is that you could host one of these services inside excel where one person has the master spreadsheet and everyone else looks to get updates interactively while the spreadsheet is open.
Interesting
VSLive – using sharepoint and VSTO to deliver apps
You can use WPF in VSTO
Advantage for sharepoint is that it reduces risk and so does office
Allows you to integrate data from the desktop in excel with central data sources. You probably/may not to make this outward facing to the rest of the world and instead use it just internally.
Help to bring some structure from unstructured business flows – gives example using Excel spreadsheet being set around in email. Work in excel but it is really talking to back-end data services (VSTO helps with this – no more VBA – another source for 3 cheers). He is a big fan of Office 2007. VSTO can also integrate with VBA in your current documents.
UH OH – VB6 troll in the room and sidetracks the conversation.
Demo of sharepoint with an excel worksheet with customization with VSTO rather than VBA. Has some web service calls and some DB stuff and save the results back to the DB, trigger the workflow, then trigger an email.
Ruh roh – network connection not working during a demo – I don’t want to be on the end of these kind of support calls.
VSTO
Action Pane and Custom task pane – a Window Form pane in excel to work with and the wpf interop control allows you to put some WPF controls there. Same for Ribbon bar
Outlook form regions – set up custom capabilities inside of outlook. Put a WPF control in outlook email message – hhhmmmm that first hit is free – are you in and if so you are in for a long long time to come
VSTO adds two sharepoint specific worklows – sharepoint is such a sense of gobleygook to me. I wish someone built some nice sharepoint site so I could feel good about spending time trying to make it work. Right now I am so not sold on sharepoint, and certainly not something mere mortals can do. These demos are doing nothing for making me feel any better about sharepoint. Does anyone out there have good stories about sharepoint – other than propoganda.
Too much demo problems making it hard to stay focused – hello twitter, whats up on FB….
Alright it is kinda late in the day and I am not all the interested in breakpoints in the worklflow but looks kinda cool.
LINQ to SQL in an excel spreadsheet FTW!
Load Events when working VSTO form has to be called on the document load otherwise it doesn’t work.
VSLive – Building ADO.NET Data Services Applications in .NET3.5
Alright – Andy Conrad giving the talk
Again presenter says to the use the entity framework rather than LINQ. Looks like a Data Service might be good for REST style endpoints. Dave B, would love to hear your thoughts on why this is not a good idea. It seems really easy and REST like from the get go.
Looks pretty darn easy to make an HTTP endpoint for data queries. If you update your tables then you need to update your service description.
Return type is AtomPub or JSON – nice job MS! The URIs are pretty REST like (there you go Sean, your opportunity to taunt me). They have pretty straight forward syntax for querying into the data, filtering, paging, and inline expansion.
Pretty cool that LINQ can talk to the data service – therefore you can use a .NET client and consume one of these services. Really nice, allows for code completion when talking to the service. I could really see using this as a way to allow my WPF fanboys to get what they want but allow me to hit the service with a jQuery HTML page or some actionscript. Let’s hear it for loose coupling.
The AJAX on codeplex can also talk to these services.
Can I just say at this point that – 3 cheers for the death of WS* – I never liked you and I am glad you are going the way of the dodo.
Where can you put in business logic
- as part of DAL (data access layer)
- Query Interceptor – intercept the URI and then call the interceptor for queries
- Change Interceptor – intercept the URI and then call the interceptor for updates
- Service Operations -Basically create your own data objects but then the transactions are handled by the server
Project Azure uses this as well to expose their services.
There is an out of band release this year – CTP availble by end of next month
New features
- Count support
- Server Driven paging
- Enhanced blob support
- Friendly feeds – addresses some issues in atompub
- binding support – WPF and Silverlight
- more…
They are following transparent design and they are named project astoria. Go to their blog at msdn.com and see what comes out of each meeting and give feedback
My Question – so which MS way to build a REST like service?
GOOD for existing sources where you don’t want to right a lot of code – not really service oriented. More for exposing data without the business logic. WCF is more for when you need a service on top of the data to do a bunch of business logic. WCF also doesn’t have client libraries for binding through linq.
There are still some pain-points that you have to work around – coming in part 2 of the talk
Interesting side note – most of the performance bottlenecks is the network, even if they tuned it up another 500x they are still basically limited transfering the data and making the connection.
Accept header is how you specify JSON versus AtomPub as the response or on the server in the config.
Overall this is really an intersting technology – nice way to go from DB to REST type service. I could see using this and I am also in Dave B’s critique of WCF and comparing it to a generic handler versus MVC.
VSLive – ASP.NET MVC (or MS discovers Struts)
Stephen Walther is the presenter and I like his style. Easy going, minimal slides, and good examples with explanations
It is a new technology for web developers and not to replace WebForms. I usually had a hard time with this with .NET devs in the past. I am glad there is something there now that I can show with the MS stamp of approval.
MVC = Model – View – Controller
It was built on codeplex in an agile pattern and is open source. He is now going to show a CRUD application. It is good to see how people use VS.
Sweet – it prompts you to create unit test from the start. Nice little lecture on why testing is important especially when you need to touch other peoples code. Hallelujah he says to delete the sample files since they just end up confusing you.
Invest the ADO.NET Entity data model framework (“the way forward”) rather than LINQ -but they are very similar
He is going to talk about Model Binding which is the new concept for MS. You can register your own model binders.
Holy cow this is so much better than web forms but still not good enough – I am really going to focus on the WCF and REST sessions. I was done with this style of development quite some time ago.
FOSS to the rescue
What to do when a client sends you multiple 500Meg DBF files and you want to move them into PostgreSQL? Why you find a FOSS solution of course.
http://www.tv.com.pl/stepbystep/dbasepsql/
Seems to be a problem for us in the program seeing all the DBF files in the dbf folder but it works if you list them in the properties file. Pretty darn quick, runs in Java so multiplatform, source code included in case you want to change it, and it gives you both a DDL and a data file.
Life is good…
-
Archives
- November 2009 (1)
- October 2009 (1)
- September 2009 (1)
- July 2009 (1)
- June 2009 (2)
- May 2009 (3)
- April 2009 (2)
- February 2009 (7)
- January 2009 (1)
- December 2008 (3)
- August 2008 (2)
- April 2008 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS



