New Posts New Posts RSS Feed: More suggestions on the sample
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

More suggestions on the sample

 Post Reply Post Reply
Author
BenHayat View Drop Down
Groupie
Groupie
Avatar

Joined: 06-Jan-2009
Location: Estero, FL USA
Posts: 86
Post Options Post Options   Quote BenHayat Quote  Post ReplyReply Direct Link To This Post Topic: More suggestions on the sample
    Posted: 15-Apr-2009 at 12:03pm
Just to show the power of DevForce, I'd like to suggest a few more features to this sample:
a) Let's say you start a new record but decide not to save it. It would be nice to add a "Cancel" button to cancel the add or edit.

b) Similar to above, it would be nice to have an "Undo" button" if a change was made to an existing record and you want to revert back to before change,

c) As the manual was describing the power of Eager Loading, it would be nice to have three grids that shows Hierarchical data: Customers, his orders and line items of each order.

d) A filter textbox that user can enter Let's say Country and DevForce would do a filter on customer file based on "Country" field.

e) I think one great feature of DevForce is where you can have data in Cache and use it. It would be nice to create a page that shows three sections, each section would show a customer his orders and line items. There should be a text box in each section where the user enters customer ID to search for. This will show a real life situation, where a user could be looking at three customers simultaniously.

f) I tried to create a new customer that already exist with ID "FRANS", and as soon as I tried to pass the field, I got error that the record exist. However, from this point, I can not delete that record and I have no way of backing out. I tried to clear and read all the records again, and it would not read them unless I disconected and re-connected again. I suggest to show a solutiuon if a record can not be saved, what should we do to allow our customers to back out gracefully.

I think these 5 suggestions would add a nice colloection to the sample.
Thanks!
Best Regards!
..Ben

WPF & Silverlight Insider
http://www.MicroIntelligence.Com
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2009 at 6:48am
Great ideas! What to do?
 
Let me begin by putting them in 3 groups:
1) "Easy" - (a) ... if I understood it better, (b)
2) "Complex" - (c), (d), (e)
3) "Yes you can!" (f)
 
Items in the easy group require zero understanding of the model and very little coding. The challenges have to do with finding room for the buttons and, in the case of (a), understanding the difference between "Cancel" and "Delete" (which we have).  Would also want to distinguish between "Undo this one" and "Undo all pending changes". At some point, we are adding so many options that we overwhelm the current "button parade" design and that means rethinking the UI.
 
This leads me to the challenges of the "Complex" group. Of course we can do all of the things you suggest just as a normal application would. However, in doing so, the demo begins to lose the already-questionable simplicity it presently has.
 
I'm really torn about this. The Model Explorer was meant to be an introduction to DevForce capabilities. We want people to explore the code and see how easy it is to do basic things. At some tipping point, the features - no one of which is very big - become so voluminous that the new developer can't find his way. Frustration leads to the mis-apprehension that DevForce is too complicated. Perhaps I'm over thinking this but that's my fear.
 
Moreover, the ME Template - which is intrinsic to the ME itself - is designed to be "domain model agnostic" in the sense that you can re-point it at any database and it will work. Which means that to offer the suggested drill-down features - with no pre-knowledge of inter-entity relationships - the code would have to read and interpret the metadata about the model. We do have such metadata available; but presenting the code to do this in a bullet-proof fashion would increase "the concept count" and undermine our primary goal of easing newbies into DevForce.
 
I suspect that we should take up your suggestions in a "Level 2" demo. And given that most developers are going to understand their domain models, we wouldn't have to enter the metadata world at Level 2; we could explore that in a "Level N" sample.
 
I'm just thinking out loud here ... and looking for guidance.
 
Finally, regarding (f), the solution is blissfully simple!
 
When you changed the Customer ID to "FRANS", you got the expected collision. But you couldn't delete it because ... the logic for Customer delete blocks any attempt to delete a customer whose ID lacks a digit; see the implementation of Customer.CanDelete. The solution is to change the ID to something with a digit that does not collide with an existing ID (e.g., FRAN0) and THEN delete it.
 
P.S.: Remember I said that the ME Template is "domain model agnostic". That is ALMOST true. We snuck in the custom "Customer" partial class file which is tied quite specifically to the Customer table in NorthwindEF. The illustrative punch seemed worth the inconsistency, considering that it is easy and harmless to delete the custom Customer file.
Back to Top
BenHayat View Drop Down
Groupie
Groupie
Avatar

Joined: 06-Jan-2009
Location: Estero, FL USA
Posts: 86
Post Options Post Options   Quote BenHayat Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2009 at 7:19am
Hi Ward;

Thanks for detail answer. I fully understand and agree not to over complicate this sample. Somehow, I forgot this is a Template and not just a sample. For Level1 entry people the simple get up and start, is great.

But, anyone who is embarking on developing SL LoB applications, dealing with complex 3-tier structure, writing code in .Net, LINQ, C# and etc., should have stomach to see more complex scenarios. Honestly, if someone gets scared of a Master-detail hierarchical code and say, Oh boy this is hard, he doesn't belong in developing n-tier SL apps. So, for someone giving this product a chance to explore, I'm pretty sure he is ready to role up his sleaves.
Now, with my suggestions, I was trying to make this group feel like there is more under the hood to meet the eyes, than simply looking at one set of grid of data and call it LoB app. And that's why the (c), (d) and (e) were suggested.
Any if you really want to convert these lookers to customers, another sample (and not necessarily a template), should be designed as proof of ability and more importantly, as guidelines how to do those more complex situations.

By just labeling them as "Complex" and not addressing them, it will not seattle right with a real prospect!
I know DevForce is very powerful and mature and more importantly, resolves many nightmares that developers has to write code, if he was going to use a pre-mature product. I had been there before, where the tools were like a hammeer, nail and a ladder and I was expected to build a house. A full sample speaks a 1000 words!!!

Hope this went well! :-)


Edited by BenHayat - 16-Apr-2009 at 7:20am
Best Regards!
..Ben

WPF & Silverlight Insider
http://www.MicroIntelligence.Com
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2009 at 7:57am
"just labeling them as "Complex" and not addressing them, it will not settle right with a real prospect!"
 
ABSOLUTELY!
 
In fact, it is really easy to write drill-downs and expose related entities in DevForce.
 
Unwanted complexity emerges when one tries to do this in a domain agnostic way. It can get tricky when you don't know anything about a type or its related types or how many of those types to expose or whether to keep drilling into the related types of the related types or what properties on related types would be most useful to expose in which contexts, or ...
 
You also end up with kind of a lowest-common-denominator experience that doesn't have much to do with real applications.
 
I'm kind of reluctant to go down this alley when there are so many better avenues to explore.
 
BUT A SAMPLE is definitely in order. We have examples of technique in our tutorials, of course, but a nice fat example, front and center, would do wonders.
 
I'll be talking to the team about that. Stay tuned.
Back to Top
BenHayat View Drop Down
Groupie
Groupie
Avatar

Joined: 06-Jan-2009
Location: Estero, FL USA
Posts: 86
Post Options Post Options   Quote BenHayat Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2009 at 8:09am
We have examples of technique in our tutorials, of course,


Ward, could you please point me to which tutorial? I'm basically compiling my own "How-to" for this new tool. Every tool does things differently, and I've come to learn of having a "How-to" bullet-point, saves lots of time during initial development until you get good at the tool (like you) :-)

I'm glad we both see it the same way and I'm just voicing a point that someone else is thinking out too, so don't shoot me [not yet]!
Best Regards!
..Ben

WPF & Silverlight Insider
http://www.MicroIntelligence.Com
Back to Top
bigfish View Drop Down
Newbie
Newbie


Joined: 20-Mar-2009
Location: Australia
Posts: 36
Post Options Post Options   Quote bigfish Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2009 at 6:59pm
 

Ben & Ward, I totally agree with both of you on this.

 

The current ModelExplorer (ME) sample is a great introduction to DF Silverlight capabilities, without addressing some of the more application specific issues we face once we've rolled our sleeves up.  It's a good appetite wetter, got me hooked, and then the fun begins.

 

I agree that more detailed examples are required.  I've been racking my brains for the last week trying to determine what I want to say here while continuing to consume all available  information available from IdeaBlade web site and WPF and Silverlight books to supplement.  I am a novice in this subject currently, so am offering suggestions that will help other like individuals trying to fathom RIA and the DevForce framework concurrently.

 

I think though that Ward is right, keep the ME example basically how it is, and construct a Sample2 "real world" silverlight app that is more formalised in its object handling for certain situations.  Ben, the Customer, Order, Orderdetails master detail view handling is one example that could be included.   My additions/agreements to your great start include:

 

------------------------------------------------------------------

The whole shebang!   (or at least for Admin CRUD)

------------------------------------------------------------------

Recently I produced an ASP.NET app using NetTiers for a small job.  Works a treat, albeit basically two tier, and not RIA, but it works.  The community and CodeSmith have done a reasonable job in allowing a developer to point it at a database and produce a working ASP.NET app that renders a  working web site for all objects, linked navigation paths, and leaves the developer wondering how to massage it for use cases.  All the CRUD is done, even to the UI for Admin functions at least.  Not good documentation though as to what to do next.  Have to figure that out, and well, not RIA is it, nor has it got all the DF persistence and caching  goodies.

 

  1. Now I've contemplated using ME as a template for Admin type functions, but even better would be an extension to the object mapper to nominate objects that are basically Admin (reference types) so that the Admin SL pages could be generated along with their objects and an SL UI that handles that.  I realise this is a simplistic notion to a complex issue but templates that handle 90% of application types yet allow the real punch (your framework) for those difficult apps would certainly help programmers like me.
     

    -----------------------------------

    Some more details please!

    -----------------------------------

  2. This brings me to navigation properties.  Seems ME displays simple properties only (autopopulate = true), navigation properties are not exposed, yet they are very available as I discovered in some other  DF tutorials I worked with.  A Client business object may reference Region and when we expose Client on UI we need a bindable dropdown list of available Regions, with current selected item bound to FK property of Client.   "antalakas" post is relevant I think http://www.ideablade.com/forum/forum_posts.asp?TID=1199  An exmaple along this path would be great.
  3. Security.  Hmmm.  2 samples please. 
    1. Show how to collect a user's username password (forms) and globally keep the logged-in user for that session so any referenced xaml view page can identify security role and objects to display.  I say this under the impression (maybe false) that ASP.NET security is not used, and we need to construct our own methods using IEntityLoginManager.  Ben's post exposes this, KimJ answers eloquently, and I am left wondering "how?"  http://www.ideablade.com/forum/forum_posts.asp?TID=1169  An example app doing this would be great.
    2. An simple example of how to manage role based security through SQL would be beneficial.  Identify a logged on user as either Admin or Standard and selectively hide menu items and challenge on each xaml page load.  From there we could expand on that using our own SQL security models depending on the granularity required
  4. XAML user controls - or View controllers.  All IB examples (even WinForms) generally deal with a single form/view.  ME does expose a child dataform very sweetly rendered over the top of the parent, which is nice (really nice - RIA nice), but still really a single parent form.  I have found no explanation of how to handle one model and possible multiple Views and Model Views.  I may be completely misunderstanding how M-V-MV works properly, but should the M-V-MV (not forgetting persistence managers as well) be expanded to M - V(n) - MV(n)????  Please forgive me if I didn't explain myself properly there ( I am a novice on this, and live in the driest state in the driest continent in the world so brain dehydration is an issue).  Perhaps this post by DocScooter also questions this http://www.ideablade.com/forum/forum_posts.asp?TID=1178 but something in an example app would be great.
     
  5. WPF in WinClient - While not strictly to do with DFSilverlight  build, I've noticed through your developer manuals that you discuss WPF but there are no examples.  I imagine the WinForms wizard does not work to drop bound controls onto the canvas.

I appreciate in all of the above that it's not IB role to explain SL or WPF in any depth, but some examples of multi-form (2-3 max) , role-based security apps that handles navigation between forms, and shows related entities via bindable drop down lists would be extremely helpful.  If IB could even generate the Admin objects UI pages that would be super stella.!!!

 

Apologies that this post contains too many points, and is long.  It is a summary of all I've found with current information and issues I'm tackling about how to do what next.  Happy to provide more explanation if needed.

Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 23-Apr-2009 at 3:12pm
BigFish - I am not neglecting you. Lots of meat here. I need to catch a breath and dig in. Should cover it this week. Stay on me! You can always ping me directly at AskWard@ideablade.com .
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down