There are loads of places where I’ve heard a term for the first time and don’t know how to spell it or what it’s about. There are double question marks in those cases. Where I’ve done that I’d appreciate if someone can send me a note explaining what the hell it’s about.
Enjoy!
Alt .Net UK
Session 1 – Web Services, REST, SOAP
Sebastian & Alan Dean
REST – Architectural Style
Idea began with MILL architecture with constraints applied to result in REST
Must be:
Client-server
Stateless (no app-state)
Cache-constraint – messages must be cacheable across the network
Uniform interface
Must be layered – each client/server don’t need to know about other clients/servers
Code-on-demand – a client can request code to execute on demand e.g: pulling JS into browser
Emphasis on uniform interface between component. Comprises 4 aspects:
- URI
- Set of well defined operations GST POST
- Set of media types text/html, image/jpeg
- Hypertext is the engine of app state – transition to a different URI to change the app state
WACA?? Apparently a new version of HTTP which is completely RESTFul.
Not sure how to spell or whether it’s a mnemonic
Concept of ‘Content Negotiation’ – client asks server for a media type e.g: text/html
You request against a resource e.g: /foo
HTTP provides a status code and a response.
To do REST properly it’s crucial to learn how HTTP works on the wire.
REST seems to be about getting the most out of HTTP, SOAP blatantly is not.
How cool would a REST web reference plugin for Visual Studio be?
Perhaps it’s not about REST vs SOAP. Maybe more about REST *OR* SOAP.
Maybe SOAP is the logical extension of super feature-packed, bloated HTTP.
A lot of so-called ‘RESTFul’ site frameworks are derogatively called ‘GETFul’, not true REST e.g: Flickr.
REST should be ‘SAFE’. You should be able to get the same resource repeatedly. A GET post should not result in a state change. PUT is intended to change state – ‘put’ data on the server e.g: edit details for a product.
POST is an unrestrained verb, you essentially send SOME data to the server without any knowledge or expectaition of what it’s going to do, and server provides a response i.e: what it did.
With PUT you are specifying what you want to happen.
Usage *should* be something like:
PUT /customers/andrew.myhre
Server either says OK that’s fine or no you can’t (exists or something)
e.g: a wiki:
/Hello <- a page with data
PUT /hello
Content-Type: text/plain
…. Data to PUT ….
The server then updates the resource /hello with the data.
The concept becomes unclear when you need to delete. PUT and POST verbs don’t make sense when deleting. Appending verbs using semi-colons is one approach though:
/customer/andrew.myhre;delete
What’s missing is a way for REST services to describe themselves.
HTTP Verbs can be standardised whereas object data structures need to be declared per service for other apps to work with them.
One approach is to only allow POST/PUT to a single page in your application which basically ‘does’ ‘something’ with ‘data’ – > it’s basically a factory method which calls resources and does actions on them.
WADDLE / WADL??
Resources should be self-describing. Apparently this should be done through the
tag.
Major benefit of SOAP is that it’s protocol agnostic: you could and mail a SOAP request.
When creating a wizard-style interface with REST, you would add data from each step to a form package which would only be POSTed to the server after the final step. How is validation performed at each step?
Given the current state of toolsets it’s usually a choice of either/or when considering REST and SOAP.
REST is really targeted with the WWW, not so much with intranets/enterprise apps. Web Services are the other way around, focussed on enterprise apps. The two approaches have completely different goals.
Comment that you shouldn’t expect the tool to solve your problem, your approach should solve the problem. Yeah kinda.
How did steven get on with his REST wrapper for SOAP services?
Atom Media types … ?
How would service discovery be implemented with REST?
Suggestions that it would be implemented as a media type.
I have to disagree, to me media types are ‘views’ on a resource. Providing a particular view that describes how to interact WITH the resource is not the same as a view ON the resource.
I think a new HTTP verb is required.
Speakers propose that any application that supports add-ins and can access HTTP can be REST client. REST services can be self-describing by including content in a response e.g: a JavaScript file included in a page or an HTML form.
Check out LiveWriter.
It uses atom/xml to communicate with any supported blog.
The reason it can do this is because the contract is not specified by the blog site but by the media type.
The blog doesn’t need to describe anything about itself for LiveWriter to know how to communicate with it.
‘Squid’ ? Linux (there is a windows distro) is a reverse proxy. Also ‘Varnish’.
Increases website performance by orders of magnitude, providing your HTTP is implemented correctly.
Session 2 – Castle, Monorail vs MVC, Future of WebForms
WebForms are generally tightly coupled. You have to expend a lot of effort and have discipline to create a loosely coupled WebForms app.
You can add MonoRail to an existing site without upsetting existing WebForms. You just map a new page file extension to the MonoRail Page Controller.
Because of the controller implementation in MVC you can migrate individual pages over to MVC. MasterPages can be reused providing you have implemented solely to deal with common HTML, layout and style.
There are two patterns of using MVC – active and passive.
Active allows for communication from server to client to inform of changes in state, which can’t be implemented with over HTTP. This applies to win forms and allows for scenarios like asynchronous processing.
http://del.icio.us/alan.dean/mvc
Must check out MonoRail and Spring.Net
Tesco have taken the approach of building a sophisticated front-end with a rubbish WebForms admin. ‘Tis a cost-effective decision.
SharePoint development seems to be very difficult.
Heard a few horror stories where Sharepoint portal development has been a major loss, including one where a team of Microsoft developers were creating a site with MOSS 2007 which they found extremely difficult to complete.
Check out MediaWiki
‘CUYAHOGA’ portal framework – uses NHibernate.
Castle ActiveRecord.
Session 3 – LINQ, ORM, NHibernate
Limitations in LINQ:
- linq is more limited than nhibernate in terms of relationship mapping
- not clear yet whether there will be Linq implementations for other database
Linq SELECT expressions need to parse the code tree when they execute? Apparently this is slow and clunky.
Someone is writing a Linq to NHibernate provider.
NHibernate approach is to write the domain first and then the persistence.
The Entity Framework does not support ‘persistence ignorance’.
Check out Astoria
NHibernate doesn’t have the support or development team behind it that LINQ does.
Check out SPOIL.
NHibernate HQL JOIN FETCH clause is very important for optimising join lookups.
Is it possible to implement your entities as structs, map with NHibernate and move all business logic into a different namespace (eg: Tasks).
Interceptors can be used in NHibernate for auditing and could be used to keep basic fields like DateModified up to date on all domain objects without needing to be implemented per object.
Look up ‘Object Databases’
E-Book ‘NHibernate In Action’
Session 4 – Automation
Scott Cowan
Build Automation
Nant tasks allow you to write C# code to perform build tasks.
RAKE allows you to write build scripts in Ruby.
BeyondCompare – merge tool, apparently very good.
TFSBuildLab – a CruiseControl.net like plug-in for Visual Studio
TeamCity is free for up to 5 users.
There’s a SCRUM template called E-SCRUM (might actually be Scrum for Team System)
Custom Visual Studio project templates might be a good way to decrease startup time for new projects. There are probably project templates out there which would be useful.
CIFactory is a tool to create Continuous Integration environments.
TFS Build Center
Brian Harry/Harris – MVP let library of build tools for TFS.
Ron Howard
Practical Project Automation – book about Java tools for automation.
Check out Final Builder