New Posts New Posts RSS Feed: Getting Started Guide
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Getting Started Guide

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

Joined: 12-Oct-2007
Posts: 10
Post Options Post Options   Quote thamaluk Quote  Post ReplyReply Direct Link To This Post Topic: Getting Started Guide
    Posted: 25-Oct-2007 at 1:54pm
I would like to create a new Cabana application using a database, other than the example that comes from DevForce.  In the Getting Started Guide on page 2 under the heading "Creating a New CAB Application" point 6 states "You may specify a namespace containing the DevForce data model for your application".
 
I don't understand were would this namespace come from ?
 
Doesn't the process of creating the CAB application create  the namespace ?
 
I have a namespace in a different  solution, do I use that one some how ?
 
thanks for your help
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 26-Oct-2007 at 9:56am
The IdeaBlade CAB Application Wizard always copies the sample model of the tutorial database into the solution for the newly-created application.  It adjusts the namespace in which the model is defined based on the value specified for the Model Namespace (default suggested value is "companyname.appname.Model").  It (and the Visual Studio item wizards that will be used later) also adjusts components that refer to the model use this namespace.
 
This capability would be used if you have a model project already defined (perhaps in another DevForce solution) within a different namespace.  You would then remove the sample Model project from the wizard-generated solution and replace it with your existing Model project.
 
Some additional surgery on the existing model will be required:
 
1.  All model classes must inherit, directly or indirectly from IdeaBlade.Common.EntityModel.CommonEntity.  We recommend using an intermediate BaseEntity class like the one in the sample model.
 
2.  The classes in the Common and QuasiCommon folders need to be present in the model.
 
3.  There must be an entity that implements the IUser interface and you may need to adjust the login code to perform authentication and authorization using your model information.
 
Feel free to ask additional questions--we're exploring the ins and outs of this process too.
 
Hope this helps.
 
Bill Jensen
Back to Top
thamaluk View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Oct-2007
Posts: 10
Post Options Post Options   Quote thamaluk Quote  Post ReplyReply Direct Link To This Post Posted: 26-Oct-2007 at 11:44am
Would it be easier to just rename that database and insure that the objects in the Common and QuasiCommon folders exist in the renamed database ?
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 26-Oct-2007 at 3:05pm
Well, you can get the model for your application defined any way you want to. 
 
Typically, however, if a model already exists it contains many class definitions, each with a namespace statement.  It's easier to use the wizard to construct the new application (and the common and quasi-common classes) to reference that namespace rather than changing all the entity classes.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down