Is LLBLGEN over-engineered...?

Posts   
 
    
Jay2007
User
Posts: 2
Joined: 05-Jan-2007
# Posted on: 05-Jan-2007 04:36:58   

I have used LLBLGEN on a previous assignment and found the product to be very stable and very productive. Performance was also quite acceptable. But, my only grouch is that the syntax is patently complicated - albeit elegant. In my current project, we are using SubSonic (formerly called ActionPack and based on Ruby on Rails) and when I compare the two, I find that the syntax in SubSonic is far more intuitive and does not expose patterns-related and architectural verbiage to the user of the framework. I am not saying that SubSonic has everything that LLBLGEN has but from what I have used of it, it gets CRUD done and exposes SPs - output parameters and all. Though, validation support is not flash and it seems to have no COM+ support and provision for more complex query constructs are just not there. But then, even with LLBLGEN, I tended to go the SP way for complex queries.

I bring this up because, I had the unenviable task of training my juniors on how to go about using LLBLGEN - I was not exactly a seasoned LLBLGEN developer myself. When I first mentioned PredicateExpressions to them, they blank-stared me and thought I were AL himself. But when I told them it was merely a "WHERE" clause, their eyes lit up - and with it, my intelligence quotient in their eyes took a nosedive.

In essence, wouldn't it be better if we used simple, non-architectural terminology so that the newbies are able to map their SQL knowledge to LLBLGEN with little difficulty. When I had to guide my juniors on SubSonic, they got it instantly. After all, the idea of using an OR/M tool like LLBLGEN is to eliminate the drudgery of DB coding without a steep learning curve.

You have a great product here and this is not meant to be a criticism. Merely a suggestion to make this really cool product more accessible even to people with minimal coding experience. bye, Jay Shanker

PS: Pls. dont flame me over this. This is just a constructive observation not meant to criticise or belittle the product. I am a happy user of LLBLGEN and will recommend it for its great performance and productivity.

sami
User
Posts: 93
Joined: 28-Oct-2005
# Posted on: 05-Jan-2007 09:37:33   

Just a short comment about predicateexpressions; I feel the same way, if you try to do something a bit more complex, you can end up spending a lot of time tinkering with the predicateexpression - even though I have a bit of LLBLGen experience. And some things you can't do at all.

Having said that, LLBLGen IS a great product sunglasses

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 05-Jan-2007 10:05:00   

Jay2007 wrote:

I have used LLBLGEN on a previous assignment and found the product to be very stable and very productive. Performance was also quite acceptable. But, my only grouch is that the syntax is patently complicated - albeit elegant. In my current project, we are using SubSonic (formerly called ActionPack and based on Ruby on Rails) and when I compare the two, I find that the syntax in SubSonic is far more intuitive and does not expose patterns-related and architectural verbiage to the user of the framework. I am not saying that SubSonic has everything that LLBLGEN has but from what I have used of it, it gets CRUD done and exposes SPs - output parameters and all. Though, validation support is not flash and it seems to have no COM+ support and provision for more complex query constructs are just not there. But then, even with LLBLGEN, I tended to go the SP way for complex queries.

I bring this up because, I had the unenviable task of training my juniors on how to go about using LLBLGEN - I was not exactly a seasoned LLBLGEN developer myself. When I first mentioned PredicateExpressions to them, they blank-stared me and thought I were AL himself. But when I told them it was merely a "WHERE" clause, their eyes lit up - and with it, my intelligence quotient in their eyes took a nosedive.

A WHERE clause is a predicate expression, a single clause in a WHERE clause, e.g. CustomerName == "SomeName", is a Predicate.

LLBLGen Pro uses type safe predicates, and not string based predicates. This is a design choice to be able to check at compile time what's wrong instead of at runtime. You can't compare it with Ruby related stuff as Ruby doesn't compile up front.

In essence, wouldn't it be better if we used simple, non-architectural terminology so that the newbies are able to map their SQL knowledge to LLBLGEN with little difficulty. When I had to guide my juniors on SubSonic, they got it instantly. After all, the idea of using an OR/M tool like LLBLGEN is to eliminate the drudgery of DB coding without a steep learning curve.

The problem is that unless a standard terminology is used, you can't use any other terminology to name things and refer to things, as everybody names the elements differently. So I used the standard terminology with databases. Not all of it, though. I don't use the mathematical background on predicates, I don't use the word 'tuple' in any way, though at some point it you have to refer to elements and it's then best to use the term which is the standard term for it.

That said, creating predicates is quite easy these days with the operator overloading. It's still not LINQ, but it's better than the class oriented approach we had earlier. There are however very little alternatives, as a string based query approach is out of the question.

You have a great product here and this is not meant to be a criticism. Merely a suggestion to make this really cool product more accessible even to people with minimal coding experience. bye, Jay Shanker

PS: Pls. dont flame me over this. This is just a constructive observation not meant to criticise or belittle the product. I am a happy user of LLBLGEN and will recommend it for its great performance and productivity.

Any critizism, with arguments, is welcome. I understand your point, though I don't see how define things differently without writing a second manual just for the novice developer. You see: LLBLGen Pro is a tool for software developers. if the software developer has little experience with writing software, the problems related to converting an algorithm to code are also causing problems with understanding how LLBLGen pro works.

We did try to explain filtering etc. much better in the v2.0 manual, as it was indeed a bit cryptical documented.

Frans Bouma | Lead developer LLBLGen Pro
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 05-Jan-2007 10:39:09   

Linq will help a lot here - until then Frans (or anybody else) can't do much to improve predicate(expressions) syntax - even now tricks are used to make it simple as it is. Perhaps he could create a new language - LLBLGenPro# :-)

Anyway, I agree that bulding complex predicateexpressions can be an effort. However, you get strong typing and compile time checking thus it is worth the effort. I don't know of that other product but if it uses strings then it is completely another thing and can't be compared to LLBLGenPro.

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 05-Jan-2007 15:32:58   

maybe a translation chart would help your novice programmers without "dumbing down" llbl terminology. example: * entity = table * where clause = predicate expression * relation = relation * entity hierachy = ??? (this took me awhile to grasp, but i finally got it. learned a little be too about db design in the process simple_smile ) the crudest way to explain it is 1:1 extended relations on tables, at least for me anyway.As Fran's stated in his post. The biggest obstical is knowledge/experience base of the programmer.

another thought would be to create 1.) new templates -or- 2.) extend the classes to remove(hide) public functions/properties your team does not require. This is pure theory as I haven't ventured into template minipulation... yet.

Example: I use the adapter model exclusively, as I like the CRUD to be seperate from the actual object. With the adapter I use about 3-4 public functions when saving/retrieving data. I have thought of creating a new template that would mark most functions as private/protected. I don't know if this would work or not as i don't fully understand the mechanics behind the adapter.

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 05-Jan-2007 16:44:59   

I can't deny it needs a simple learning curve, but it's very effecient with compile time checking, which is a very big advantage.

But let's be practical, why don't you and/or your team member start posting some queries that you want to write with the LLBLGen Pro way, and we all can help you to accomplish it.

After a short while you might find it very easy to do ones that you thought to be too complex.

Also I can supply an on-site training for your team, if you need it.

PilotBob
User
Posts: 105
Joined: 29-Jul-2005
# Posted on: 06-Jan-2007 00:18:47   

Otis wrote:

The problem is that unless a standard terminology is used, you can't use any other terminology to name things and refer to things, as everybody names the elements differently. So I used the standard terminology with databases. Not all of it, though. I don't use the mathematical background on predicates, I don't use the word 'tuple' in any way, though at some point it you have to refer to elements and it's then best to use the term which is the standard term for it.

Well, yes, it is the correct term, but it is also a $5 word.

Predicate Expression is just a fancy term for Filter.

Predicate is just a fancy term for Expression or FilterItem.

But, I agree... once you know the terms, if you didn't already, writting the code isn't that hard. It's just that people are used to String based queries.

BOb

louthy
User
Posts: 61
Joined: 02-Aug-2005
# Posted on: 08-Jan-2007 00:03:33   

I'd never worked on an app that used a DB before, and I chose LLBLGen Pro because I thought SQL was an abomination, and didn't really want to get my hands dirtied with all that.

I didn't find the terms a problem at all, althought I am an experienced developer (I worked in the games industry for 10 years previously - hence no DB experience). I agree predicate and predicate-expression don't exactly float off the tongue, but I think to anyone who spends 30 mins reading the manual it would be pretty clear.

One thing I have done is to create wrappers for the Predicate, PredicateExpression, SortClause, SortExpression so you don't have to type:

set.Fill(0,new SortExpression(CustomerFields.Surname), true, new Predicate(CustomerFields.Age > 18 ) )

I can now do this:

set.Fill(0,CustomerFields.Surname,true,CustomerFields.Age > 18 );

Which makes it look a little more like a normal select statment.