This project is read-only.

Naked Objects 5.5 released

Jun 26, 2013 at 12:45 PM
Edited Jun 26, 2013 at 2:20 PM
I am pleased to announce the release of version 5.5 of the Naked Objects framework, and a corresponding new release (1.3) of the Restful Objects Server.

This release includes significant enhancements to the MVC user interface. For more details, see the Release Notes on the Downloads tab. As always, the best way to install the new release is via NuGet.

There is a new version of the Developer Manual available.
Jun 26, 2013 at 2:12 PM
Awesome news! Thanx for the hard work guys!
Awaited with anticipation.
Jun 26, 2013 at 2:27 PM
Edited Jun 26, 2013 at 2:28 PM
For those interested in Restful Objects ...

The new version of the AW Sample app (which can be downloaded from the Downloads tab) contains both a RunMVC project and a RestfulObjectsAPI project. When you run the latter you are taken to the home resource on
http://localhost:53010/  
and (assuming you have a suitable plug-in for your browser such as JSONView) you can following the links to other resources.

But, for interest, I have also added in a version of our still-under-development 'Spiro Modern' single-page app. You can get to this just by starting from this URL instead:
http://localhost:53010/Spiro
More details on Spiro here. Please bear in mind that Spiro is not a released product yet - it is neither complete nor fully tested. But it is a lot of fun to play with :-)
Jun 27, 2013 at 12:55 AM
Edited Jun 27, 2013 at 12:56 AM
I seem to be having a problem with changes to StandaloneTable.cshtml.
It wants me to replace this:
@section title {@Html.ObjectTitle(Model)}
with this:
@section title {@Html.ObjectTitle(Model.Result)}
But that gives me this:
Compiler Error Message: CS1061: 'System.Collections.IEnumerable' does not contain a definition for 'Result' and no extension method 'Result' accepting a first argument of type 'System.Collections.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
which makes sense to me. Are you sure the new view is correct to use Model.Result,?

Otherwise the upgrade has gone beautifully. :) Thanx much!
Jun 27, 2013 at 8:06 AM
Edited Jun 27, 2013 at 8:08 AM
You probably missed that the type of the model (specified at the top of the view) has also changed, from IEnumerable - to ActionResult.

P.S. As always - my recommendation with a new version of NOF is that you temporarily create a brand-new Run project alongside your existing one and do a FreshInstall into that one - and check that everything then runs OK with the generic UI. That way you have something to compare against when you are converting your existing (customised) run project.
Jun 27, 2013 at 8:45 AM
Edited Jun 27, 2013 at 8:47 AM
You probably missed that the type of the model (specified at the top of the view) has also changed, from IEnumerable - to ActionResult.
I most certainly did.
I do have the raw runner. And everything worked fine, but I kept missing that very top line in my merge tool. My bad, sorry. :)

Ok, I see it now uses:
NakedObjects.Web.Mvc.Models.ActionResultModel
How will custom versions of this view now work? Still with
@model IEnumerable<T>
Edit:
Oh, I see there is a <T> version also of ActionResultModel.
Jun 27, 2013 at 9:30 AM
I'm having trouble understanding how to make a strongly type version though.

What i used to have was this:
@(Html.CollectionTableWith<SmdCoreModel.Individual>(m => m.Column1))
But that now gives this:
Compiler Error Message: CS1660: Cannot convert lambda expression to type 'System.Collections.Generic.IEnumerable<SmdCoreModel.Individual>' because it is not a delegate type
I got it to work like this:
@(Html.CollectionTableWith(Model,  "Column1"))
But cannot seem to be able to figure out how the strongly typed version should look now.
Any tips?
Jun 27, 2013 at 9:56 AM
I'm not sure and don't have time to look into this right now, but I'm not sure if you've picked up that whereas before the Model was an IEnumerable<T>, the model is now ActionResult. Although ActionResult : IEnumerable - it is not itself the enumerable of the domain objects - that is in Model.Result (this change was because we needed to be able to pass back a record of the action that gave rise to the collection). Hence the reason for the change to the title method.

In order to use the helpers that take a Func you might first need to cast the Result explicitly into an IEnumerable<Individual> - I can't recall for sure.
Jun 27, 2013 at 10:56 AM
I'm not sure if you've picked up that whereas before the Model was an IEnumerable<T>, the model is now ActionResult.
I did, and I understand that is the problem now, but haven't been able to figure it out. Will post if I do.