New Posts New Posts RSS Feed: DevForce App with no Database
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

DevForce App with no Database

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: DevForce App with no Database
    Posted: 16-Oct-2007 at 1:10pm
So you want to write an app that has no database!  I take it that the client app is a UI for capturing information and storing it on the user's PC. It never reads or writes to a database. Is that right.
 
You can do this (it took me a second to think this way as we've never had an app with no db before as far as I know).
 
You started as I would have: "creating business objects based on a sql database model and then dropping the database".
 
[aside: You don't have to drop the database and I would not. This is your design database and it's good to have it around as you evolve your business object structures. When you ship the app, the db won't exist at the client's site but that will be OK as you're about to see.]
 
You are correct that DF tries to connect as soon as you call CreateEntity. It will try to connect under almost all circumstances. In this case, it wants to check the database for the current schema info.
 
You can prevent this by forcing the PM to disconnect BEFORE you use it: PersistenceManager.Disconnect();
 
Now when you call CreateEntity, the PM knows it can't reach the database and relies on local knowledge of the entity schemas
Back to Top
jeffdoolittle View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 146
Post Options Post Options   Quote jeffdoolittle Quote  Post ReplyReply Direct Link To This Post Posted: 16-Oct-2007 at 4:03pm
This makes me think of an interesting question:

Why can't DevForce just look at an ADO.NET DataSet for mapping entities?  this would make it even easier to design your entities without a backend database. 

I have an XSD file, it seems that it would be trivial for DevForce to inspect the XSD and build entities accordingly.

Hmm...
Back to Top
jeffdoolittle View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 146
Post Options Post Options   Quote jeffdoolittle Quote  Post ReplyReply Direct Link To This Post Posted: 22-Oct-2007 at 11:56am
I would appreciate it if someone from IdeaBlade could respond to my previous inquiry regarding XSD files and ADO.NET. 

Regards,

--Jeff
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 22-Oct-2007 at 4:38pm
Using an XSD file is another way to solve the problem.
 
I don't know that either solution is "better" or "easier".  In your case, the XSD file may be readily available making it perhaps easier for you.  In our case, this file is not usually available, and we would have to go through a fair amount of effort to manufacture one.
 
Ultimately, I think this is a matter of preference.
Back to Top
jeffdoolittle View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 146
Post Options Post Options   Quote jeffdoolittle Quote  Post ReplyReply Direct Link To This Post Posted: 22-Oct-2007 at 9:09pm
So are you saying that the capability currently exists to build your entities from an ADO.NET XSD file?
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 23-Oct-2007 at 8:00am

We have no utiliities that I know of that will construct an EntitySet from an XSD file.

We do have a Tech Tip on Crystal Reports that contains a utility that will build an XSD file from the DLL in your Model project
Back to Top
jeffdoolittle View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 146
Post Options Post Options   Quote jeffdoolittle Quote  Post ReplyReply Direct Link To This Post Posted: 23-Oct-2007 at 9:07am
I'm not talking about building an EntitySet.  I'm talking about pointing the Object Mapper at an XSD file instead of at a database.  It seems to be that this shouldn't be too difficult.  This would allow a developer to create their object model without an actual database.

The discussion is probably more academic than practical, because a developer could just load a free version of SQL Server for development purposes.  But, I'm just trying to understand what would preclude the DevForce object mapper from being able to build the object map from an XSD file.

--Jeff
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 23-Oct-2007 at 9:32am
Jeff, pointing the Object Mapper at an XSD or XML file is something we've discussed internally, and even have a low priority feature request filed.  It's stayed low priority due to the usual reasons - we have very few resources and spend most of our time battling bugs and those features that someone needs ASAP. 
 
So, no promises on when this feature will be added, but it is definitely something we'd like to include.
Back to Top
jeffdoolittle View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 146
Post Options Post Options   Quote jeffdoolittle Quote  Post ReplyReply Direct Link To This Post Posted: 23-Oct-2007 at 11:00pm

Thanks for the reply.  If I come up with a compelling business case for this, I'll let you know.  In the meantime, I'm content to let the issue rest.

--Jeff

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down