New Posts New Posts RSS Feed: Coping with Cabana
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Coping with Cabana

 Post Reply Post Reply
Author
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Topic: Coping with Cabana
    Posted: 28-Aug-2007 at 3:37pm
I made a demo app using Cabana, and slowly figured out how to do most things, but decided (with input from Ward Bell) that for our application and development capability and time frame it was too much to learn and not enough gain over a normal Devforce app. I was concerned that I didn't know how many more problems I would need to solve in future using Cabana. I will proceed using just DevForce, but will configure my app where possible to allow for a future transition to a Cab application.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 28-Aug-2007 at 1:22pm
Now, after a month of opportunity does anyone have anything to add regarding the Cabana project?  I have stalled in my development.  Certainly, I have learned much regarding CAB projects and the integration of DevForce; however, I am still not ready for prime time.  How are you all doing out there?
Back to Top
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Posted: 09-Aug-2007 at 6:26pm
The ShellApplication.Main() method has optional compilation for debug or release to run either the RunInDebugMode() or RunInReleaseMode() methods resp. The Debug one has the CAB visualizer.
This means you need to compile in debug mode, and in the shell project's properties Build options you must have the checkbox ticked that says Define DEBUG constant.
Back to Top
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Posted: 09-Aug-2007 at 6:22pm
I had exactly the same problem with my module not loading. I ended up copying the Splash module and putting my code into that and it loaded fine. Something was missing, but I don't know what yet. I read somewhere that Ward creates modules by copying other working ones too, but that they plan to give some more templates or wizards to help creating new modules in the next week or so.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 09-Aug-2007 at 5:11pm
One other item to note:  the CAB visualizer does not fire up at startup.  No error...it just doesn't fire up.  Hmmm...that could mean something.  But, what?
 
Bill
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 09-Aug-2007 at 5:04pm
Thanks, Michael, for these tips.  I was able to successfully create a new layout and employ it in the Cabana app.
 
In an effort to really see how all these things operate with one another, I decided to create a new application from scratch.  I have gotten it running; however, the new layout that I created in Cabana (which I stole from myself) is not loading...only the ShellForm form is loading.  It is as if FoundationModule is not getting run.  I am going to perform a few more passes with the debugger.  Perhaps I will detect something.
Back to Top
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Posted: 07-Aug-2007 at 7:36pm
Just to share a little hint for newcomers about tracing through Cabana...
 
The ProfileCatalog.xml in the shell lists the CAB assemblies that are to be loaded. This includes the Infrastructure.Foundation.dll that has the basic shell loading stuff.
 
In each assembly, it is the Load method of the <name>Module.cs file that is used first because that class inherits from ModuleInit.
 
In the Load method, it usually adds a new workitem which uses a controller named <name>ModuleController that inherits from the WorkItemController class. The load method then calls the Run method of the newly loaded controller which does all the steps to add buttons to navbars and subscribe to events etc. This also is where the first forms are opened when someone clicks a button etc.
 
For each view there is a presenter that is created by the object builder when the view is instantiated. That code is in the view in a method having the [InjectionMethod] attribute, usually called InjectPresenter. Elsewhere in the view the presenter is accessed using the InnerPresenter object, although there is often a Presenter property defined in the view so it can be accessed with that property instead. e.g. a button press on the form would call Presenter.<buttonhandlermethod>
 
Hope that helps a bit :)
Back to Top
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Posted: 07-Aug-2007 at 7:21pm
I figured out where to put my custom shell:
 
Create a new view and presenter in Infrastructure.Foundation.Views.Layout which is a modification of the default shell view and presenter in IdeaBlade.Cab.DotNet.Views.Layout.DotNetShellLayoutView
 
Add to the Infrastructure.Foundation.ViewFactoryService the registration of the new custom shell (create a new constant for the name of the new shell)
 
Modify the Infrastructure.Foundation.FoundationModule.ShowShellLayout method to load the new custom shell.
 
 
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 07-Aug-2007 at 9:32am
Hi Michael,
 
I started tracing the ShellLayoutView late yesterday.  The FoundationModule is key, I think, in the Cabana application and plays a role in the layouts somehow.  Still working on it.  If I figure something out, I'll make sure to share it in the forums.
 
I agree with the Lib concept...shouldn't these be untouched and untouchable assemblies?  I am finding myself regularly entering one of the IdeaBlade.CAB assemblies in order to effect a change.
 
Let's keep at it, though...there is great reward waiting for us after we figure this CAB thing out.  Especially, in conjunction with the DevForce product.  Powerful, useful, adaptable applications are just around the corner!
 
Bill
Back to Top
MichaelP View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Aug-2007
Location: Australia
Posts: 12
Post Options Post Options   Quote MichaelP Quote  Post ReplyReply Direct Link To This Post Posted: 07-Aug-2007 at 12:57am
I've only just started with using DevForce and CAB. I've spent a few days trying to modify Cabana to suit my application when I discovered the new version and switched to that. I guess I am a pretty confused too. In the old version I was playing around with the toolbar, and now it is no longer included.
 
I am not sure what is the best way of creating a new shell format that has a toolbar without just modifying all the standard Cabana code. I don't want to shut myself out of any updates from future Cabana releases. I haven't actually found out how the IdeaBlade.Cab.DotNet.DotNetShellLayoutView actually becomes the main shell layout so that I can replace it with my own new shell layout. I also would have thought that type of customising code shouldn't even exist in the lib solution. Too many questions...
  
Back to Top
wdevine View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 5
Post Options Post Options   Quote wdevine Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 8:27pm
I actually ordered that book too.  Hopefully it isn't a bomb, but it's the only one on CAB.  Should be getting it sometime next week.
Back to Top
Matthew View Drop Down
Newbie
Newbie


Joined: 31-Jul-2007
Posts: 14
Post Options Post Options   Quote Matthew Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 3:10pm
No problem at all. 

I have it ordered and B&N say it should be arriving sometime early next week.  I'll let you know how it reads.  While the review was not very good, I was sort of looking for a broad overview so I don't think I'll be disappointed.

Though looking through your posts, I'll admit I've become more willing to look through Cabana again before the book arrives Smile

Maybe I'll give it a shot this weekend...
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 9:31am
Thanks a TON for responding, Matt! 
 
The Platt book is available, now, so I checked the Amazon customer review.  It has a 2/5 star rating.  That's not too good.
 
 
Only one review, but substantial.
 
Bill
Back to Top
Matthew View Drop Down
Newbie
Newbie


Joined: 31-Jul-2007
Posts: 14
Post Options Post Options   Quote Matthew Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 9:22am
I'm not really.  I took a few hours to poke through it until I was satisfied that I didn't really understand the why's of anything.

So instead I ordered the book by David Platt, Programming Microsoft Composite UI App Block.  I'm going to read that book and revisit Cabana.

Matt
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 4:45am

This will be the fifth day working through the Cabana code.  I am no further along to understanding it than I was on Monday...actually, I have more questions than ever.

There were so many people who wanted the update to Cabana.  Now that it is here and you all have had a week to look at it, how are you coping with Cabana?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down