design considerations=>wud naked objects pattern/methodology) fit the bill

May 10, 2012 at 7:05 PM
Edited May 10, 2012 at 7:07 PM

hi ,

  i am tryin to make a simple search app which allows users to retrieve records from a database

with the added convenience of  viewing only  certain  columns and saving their preferences  in the form of views.....

    so.... every view has a list of associated columns....now how wud i typically handle schema changes in the database without havin to rewrite the code and  in addition to this how wud this design scenario be handled...

     moreover, the promise of building a lot of stuff without doin much sure does seem tantalising...:)....... i wud love some inputs on some concise yet relatively maintenance free approaches...

Editor
May 10, 2012 at 8:49 PM
The naked objects pattern works best when there's a clear business-oriented domain, but it's not clear to me what the domain is here; you talk only of "records from a database", filtering, and views.

If the domain is actually one of view management over an arbitrary object store, then I'm not convinced that naked objects fits.

But rather than me guessing, perhaps you could flesh out the app that you want to build in a little more detail?

Dan


On 10 May 2012 20:05, knapshots <notifications@codeplex.com> wrote:

From: knapshots

hi ,

i am tryin to make a simple search app which allows users to retrieve records from a database

with the added convenience of filterin out certain columns and saving their filterin options in the form of views.....

so.... every view has a list of associated columns....now how wud i typically handle schema changes in the database without havin to rewrite the code and in addition to this how wud this design scenario be handled...

and moreover, the promise of building a lot of stuff without doin much sure does seem tantalising...:)....... i wud love some inputs on some concise yet relatively maintenance free approaches...

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 11, 2012 at 7:16 AM

like i said,

  i wish to retrieve records of a certain type from the database  with the only exception being that the user has the option of choosing which properties(columns)

he wishes to see and  gets to save his preferences as well in the form of views....

 

a view has a structure somethin like this...

  string name;

 ICollection<Column> Columns;

 

 

the Column Class has the structure:

           string dbName;

          string friendlyName;

         string associatedViewName;

 

 

 

 

 

Editor
May 11, 2012 at 8:12 AM
ok, in which case your domain seems to be that of view management.

I'm not sure that Naked Objects is going to work for you without quite a bit of mangling. As I'm sure you're aware, NO works by building a metamodel of a domain object model, and consults this metamodel in order to render each domain view.

Your Column and View classes are at the same level of abstraction as the NO metamodel, not as a "regular" domain model. Which is where I see the issue.

What you want to do, I think, is to have the NO rendering process somehow "consult" your the view definition for a particular database record. However, there is no public API (that I can think of) that would allow you to do this.

Really, what you are describing sounds like it would require a new implementation of a Naked Objects viewer.

If i have this correct, one way forward might be to write your own ASPX helpers, similar to the ones that ship with NO, but that also look up the corresponding View/Columns saved for the currrent user and adapt the rendered page accordingly.

Or, as an alternative, you could consider using the soon-to-be-released Restful Objects packages (they are up in NuGet as pre- packages at the moment). Then you could build your own viewer (eg in some fancy javascript library) that (similarly) would use your View and Column objects to render things out as required.

Does that make sense?

Dan



On 11 May 2012 08:16, knapshots <notifications@codeplex.com> wrote:

From: knapshots

like i said,

i wish to retrieve records of a certain type from the database with the only exception being that the user has the option of choosing which properties(columns)

he wishes to see and gets to save his preferences as well in the form of views....

a view has a structure somethin like this...

string name;

ICollection<Column> Columns;

the Column Class has the structure:

string dbName;

string friendlyName;

string associatedViewName;

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 11, 2012 at 9:38 AM

u got the requirement spot on..... i am just lookin for a really neat way of doing this..... NO caught my fancy as the code required for ui seemed to be almost nil....

oh...well, if u can point me to another solution, that wud be sweet...if not, i might as well end up writing a framework of my own rather than writing some ugly (blechhhh) code

Editor
May 11, 2012 at 10:54 AM
yeah, I think you'll need to write some framework code.

But, do consider writing it as a Restful Objects client... I think you'll enjoy doing it this way.

Dan

On 11 May 2012 10:38, knapshots <notifications@codeplex.com> wrote:

From: knapshots

u got the requirement spot on..... i am just lookin for a really neat way of doing this..... NO caught my fancy as the code required for ui seemed to be almost nil....

oh...well, if u can point me to another solution, that wud be sweet...if not, i might as well end up writing a framework of my own rather than writing some ugly (blechhhh) code

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com