More basic examples

Posts   
 
    
Stoop
User
Posts: 66
Joined: 28-Feb-2004
# Posted on: 28-Feb-2004 12:18:37   

Hello

As a new user to LLGen Pro I am facing a learning curve in getting up to speed in using the generated classes in a project. I'm not new to OO programming, but as all of you were at one time or another, new to the syntax and how to use the classes of LLGen.

I have taken a look the Northwind examples and, though they show a lot of features, they are hard to follow due to complexity (this is even mentioned in the comments in one of the project classes) of the code.

What I would like to request are more examples, but more on a specific level. For example, a basic project that shows how to insert a record (which BTW, the NW examples don't do). A basic example of how to validate data. A basic example of how to data bind to a dropdown list, et..

Having several examples demonstrating basic functionality and "How to do this" would save me a lot of time trying to wade through one big example and having to step through several procedures.

Well, that is just my humble request simple_smile

Steve

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 28-Feb-2004 13:05:46   

Actually, this is already scheduled to be included in the docs which will ship with 1.0.2003.3 simple_smile (not ready yet, will finish the docs in the comming week)

I've planned to include a section "How do I... " with examples how to do simple things and the more advanced things people run into.

I have to add that the documentation does contain a lot of these small examples. For example the transaction section does show how to insert a new entity and there are various others in the documentation. However, because these are not in a single place, it might be hard to find back that particular example how to do that particular thing.

The NW example was meant to be a 'look how it's done' kind of project, however due to the databinding hell, it turned out to be much more complex than anticipated (and it turned out to be more of a complex databinding example than a tutorial how to use the features).

Oh, btw, the NW samples does save new entities. simple_smile The adapter version for example shows the recursive save functionality (soon released for selfservicing as well), for example when adding a new order to a customer. Changing the customer's fields also lets you save the customer entity. This illustrates that 'save' is transparent: does it update or insert? it doesn't matter, it saves the entity's data back to the database. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Stoop
User
Posts: 66
Joined: 28-Feb-2004
# Posted on: 28-Feb-2004 20:25:50   

Cool!

Looking forward to seeing them!

Steve

netLearner
User
Posts: 150
Joined: 18-Oct-2003
# Posted on: 29-Feb-2004 02:32:18   

Please add these if possible:

  1. How to handle errors in self servicing, for ex: When saving an entity, if a unique constraint is not met then what happens?

  2. More info about aggregates functionality.

  3. How to use transactions in self servicing, for ex: If i have 2 entities Customer and Order, if Customer is fails to save then order must not be saved.

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 29-Feb-2004 11:30:44   

netLearner wrote:

  1. How to handle errors in self servicing, for ex: When saving an entity, if a unique constraint is not met then what happens?

Ok. I think 'handling' errors is appropriate.

  1. More info about aggregates functionality.

Could you please explain to me what you mean by this, as the current code doesn't have support for aggregates.

  1. How to use transactions in self servicing, for ex: If i have 2 entities Customer and Order, if Customer is fails to save then order must not be saved.

There is an example about transactions and what you describe in the documentation, under 'Transactions' in using the generated code. Could you please elaborate a bit where this example isn't clear enough?

Frans Bouma | Lead developer LLBLGen Pro