Code stats - Aida vs. Seaside vs. Iliad

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Code stats - Aida vs. Seaside vs. Iliad

Janko Mivšek
Dear all,

I'm currently working on comparison between three main web frameworks in
Smalltalk and here is one interesting result I measured today:

Code stats            Aida    Seaside Iliad
Nr of packages          1      74      9
Nr of categories       14     123     26
Nr of classes         145     943    265
Nr of methods        4.465   8.758  2.368
Lines of code       33.578  66.337  9.794
Avg methods/class     31      9       9
Avg lines/method     7,5     7,6     4,1
               
Code is loaded in Pharo with by Metacello configurations, tests are
included, all code included except Grease, Sport, Swazoo, Magritte.

Note how small number of packages and classes has Aida comparing
specially to Seaside, but only twice less methods. Is this a reason why
everyone consider Aida as simple from first sight?

More to come.

Best regards
Janko




--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
Janko Mivšek <[hidden email]> writes:

> Dear all,
>
> I'm currently working on comparison between three main web frameworks in
> Smalltalk and here is one interesting result I measured today:
>
> Code stats            Aida    Seaside Iliad
> Nr of packages          1      74      9
> Nr of categories       14     123     26
> Nr of classes         145     943    265
> Nr of methods        4.465   8.758  2.368
> Lines of code       33.578  66.337  9.794
> Avg methods/class     31      9       9
> Avg lines/method     7,5     7,6     4,1
>
> Code is loaded in Pharo with by Metacello configurations, tests are
> included, all code included except Grease, Sport, Swazoo, Magritte.
>
> Note how small number of packages and classes has Aida comparing
> specially to Seaside, but only twice less methods. Is this a reason why
> everyone consider Aida as simple from first sight?
I would not dare to draw such kind of conclusions. I think a look e.g et
Code Clean an other books will be interesting. However it seems there
are different philosophies at work. Look at the methods in the
class. Iliad and Seaside seem to have finer grained classes. I can't
tell if that is really good or bad, but the attitude in Smalltalk seems
to have small classes, small methods. So in this regard Iliad would be
"winning". One has to admit. One spared line of code is one line less
which can contain a bug....

What I definitly am missing in Seaside is some idea on what all this
classes really do.

I'd think one also has to see what is provided by the frameworks. Does
e.g Seaside include something not in Aida or Iliad.

My impression is that we probably have to look after Iliad
especially. If the functionality of Aida and Iliad is comparable (I can't
judge that) than I'd say the Iliad people have done a better job. Just a
third that much code looks very good. If we can compare Seaside
completly with Aida than I'd say Aida is better done because it just needs
half the code of Aida.

I don't know who has written it. A work is finished not if you can add
something more, but if you are not able to remove something ..

Or similiar

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Nicolas Petton
In reply to this post by Janko Mivšek
Le jeudi 11 novembre 2010 à 22:13 +0100, Janko Mivšek a écrit :

> Dear all,
>
> I'm currently working on comparison between three main web frameworks in
> Smalltalk and here is one interesting result I measured today:
>
> Code stats            Aida    Seaside Iliad
> Nr of packages          1      74      9
> Nr of categories       14     123     26
> Nr of classes         145     943    265
> Nr of methods        4.465   8.758  2.368
> Lines of code       33.578  66.337  9.794
> Avg methods/class     31      9       9
> Avg lines/method     7,5     7,6     4,1
>
> Code is loaded in Pharo with by Metacello configurations, tests are
> included, all code included except Grease, Sport, Swazoo, Magritte.
>
> Note how small number of packages and classes has Aida comparing
> specially to Seaside, but only twice less methods. Is this a reason why
> everyone consider Aida as simple from first sight?

Hi guys,

Iliad is how it is because 1) Iliad is a vision about how we can build
web apps 2) I want Iliad to have a small, easy to maintain codebase

In a nutshell, the goal of Iliad is to help developers write web
applications with reusable, stateful web components, while liveraging
modern web technologies (like automatic, unobstrusive and degradable
AJAX), and keep clean, human readable and bookmarkable urls.

If I could reduce the number of lines of code in Iliad, I would
certainly do so.

I'm not saying that Iliad is better than <put whatever framework you
like here>. It may be _different_, and answer to web development issues
differently than other web frameworks do.

If some framework needs 10x more lines of code, maybe it's for a reason,
maybe not, but the complexity of an internal implementation of a
specific feature of a framework doesn't mean that this complexity is
shown to the developer. Afterall, that's the purpose of any framework.

So I think that instead of comparing the number of lines of code to
determine which framework is simpler for newcommers, one should try to
compare the complexity of the API provided by each framework, and what
it allows you to do with it.

Just my 2 cents,

Nico

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
Nicolas Petton <[hidden email]> writes:

> Le jeudi 11 novembre 2010 à 22:13 +0100, Janko Mivšek a écrit :
>> Dear all,
>>
>> I'm currently working on comparison between three main web frameworks in
>> Smalltalk and here is one interesting result I measured today:
>>
>> Code stats            Aida    Seaside Iliad
>> Nr of packages          1      74      9
>> Nr of categories       14     123     26
>> Nr of classes         145     943    265
>> Nr of methods        4.465   8.758  2.368
>> Lines of code       33.578  66.337  9.794
>> Avg methods/class     31      9       9
>> Avg lines/method     7,5     7,6     4,1
>>
>> Code is loaded in Pharo with by Metacello configurations, tests are
>> included, all code included except Grease, Sport, Swazoo, Magritte.
>>
>> Note how small number of packages and classes has Aida comparing
>> specially to Seaside, but only twice less methods. Is this a reason why
>> everyone consider Aida as simple from first sight?
>
> Hi guys,
>
> Iliad is how it is because 1) Iliad is a vision about how we can build
> web apps 2) I want Iliad to have a small, easy to maintain codebase
Well that is the most nobel goal one can have in Software development,
at least for me.

>
> In a nutshell, the goal of Iliad is to help developers write web
> applications with reusable, stateful web components, while liveraging
> modern web technologies (like automatic, unobstrusive and degradable
> AJAX), and keep clean, human readable and bookmarkable urls.



>
> If I could reduce the number of lines of code in Iliad, I would
> certainly do so.
I think this is the thing we all should strive for.

>
> I'm not saying that Iliad is better than <put whatever framework you
> like here>. It may be _different_, and answer to web development issues
> differently than other web frameworks do.
I was very cautious (at least I hope so) but less code -> less
bugs. So in that regards Iliad seems to have an edge, but of course just
if the functionality can be compared. And this is what I can't do.

Regards
Friedrich


--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Janko Mivšek
In reply to this post by Janko Mivšek
Dear all,

Code statistics extended with several graphs is now available at Google
Docs:
https://spreadsheets.google.com/ccc?key=0Atnb1W9vuq9ndG4wbUpxNXpKQnFZRlFyQXpHclhZa2c&hl=en#gid=1

I added graphs of three distributions:

 - number of methods in classes
 - class inheritance depth
 - number of lines in methods

Tests and comments section was also added.

                          Aida  Seaside  Iliad
  Nr of test methods       67     914     412
  Avg tests/class         0,5      1      1,6

  % of commented methods  45%     23%       5%
  % of commented classes  32%     39%      13%


Quite interesting results and again a lot of food for discussion!

Best regards
Janko

On 11. 11. 2010 22:13, Janko Mivšek wrote:

> I'm currently working on comparison between three main web frameworks in
> Smalltalk and here is one interesting result I measured today:
>
> Code stats            Aida    Seaside Iliad
> Nr of packages          1      74      9
> Nr of categories       14     123     26
> Nr of classes         145     943    265
> Nr of methods        4.465   8.758  2.368
> Lines of code       33.578  66.337  9.794
> Avg methods/class     31      9       9
> Avg lines/method     7,5     7,6     4,1
>
> Code is loaded in Pharo with by Metacello configurations, tests are
> included, all code included except Grease, Sport, Swazoo, Magritte.
>
> Note how small number of packages and classes has Aida comparing
> specially to Seaside, but only twice less methods. Is this a reason why
> everyone consider Aida as simple from first sight?
>
> More to come.

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
Janko Mivšek <[hidden email]> writes:

> Dear all,
>
> Code statistics extended with several graphs is now available at Google
> Docs:
> https://spreadsheets.google.com/ccc?key=0Atnb1W9vuq9ndG4wbUpxNXpKQnFZRlFyQXpHclhZa2c&hl=en#gid=1
>
> I added graphs of three distributions:
>
>  - number of methods in classes
>  - class inheritance depth
>  - number of lines in methods
>
> Tests and comments section was also added.
>
>                           Aida  Seaside  Iliad
>   Nr of test methods       67     914     412
>   Avg tests/class         0,5      1      1,6
>
>   % of commented methods  45%     23%       5%
>   % of commented classes  32%     39%      13%
>
>
> Quite interesting results and again a lot of food for discussion!
Indeed AIDA and Seaside need more tests and Iliad more comments ;-)

Now the question is is Iliad so readable that it does not need comments
;-)

I think discussing somethong upon such numbers is not a worthwhile
undertaking. Too many open questions which may it feasible to "judge"
something..

Regardss
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Nicolas Petton
Yes, Iliad needs more comments.

Now, we try to always comment classes and methods of the API. See
ILWidget, ILApplication, etc.

Internal stuff are less commented, and I agree there should be more
comments here too, but I think it's less important.

Nicolas


Le lundi 15 novembre 2010 à 11:40 +0100, Friedrich Dominicus a écrit :

> Janko Mivšek <[hidden email]> writes:
>
> > Dear all,
> >
> > Code statistics extended with several graphs is now available at Google
> > Docs:
> > https://spreadsheets.google.com/ccc?key=0Atnb1W9vuq9ndG4wbUpxNXpKQnFZRlFyQXpHclhZa2c&hl=en#gid=1
> >
> > I added graphs of three distributions:
> >
> >  - number of methods in classes
> >  - class inheritance depth
> >  - number of lines in methods
> >
> > Tests and comments section was also added.
> >
> >                           Aida  Seaside  Iliad
> >   Nr of test methods       67     914     412
> >   Avg tests/class         0,5      1      1,6
> >
> >   % of commented methods  45%     23%       5%
> >   % of commented classes  32%     39%      13%
> >
> >
> > Quite interesting results and again a lot of food for discussion!
> Indeed AIDA and Seaside need more tests and Iliad more comments ;-)
>
> Now the question is is Iliad so readable that it does not need comments
> ;-)
>
> I think discussing somethong upon such numbers is not a worthwhile
> undertaking. Too many open questions which may it feasible to "judge"
> something..
>
> Regardss
> Friedrich
>
>
>


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Janko Mivšek
And yes, Aida needs much more tests. Note that Aida was born years
before test driven development came to light, which is probably one of
reasons of so few tests. Only really hard parts of Aida (like versioned
objects) are covered by tests, while most of other not.

Anyone willing to help Aida a bit with writing some tests?

Best regards
Janko

On 15. 11. 2010 11:53, Nicolas Petton wrote:

> Yes, Iliad needs more comments.
>
> Now, we try to always comment classes and methods of the API. See
> ILWidget, ILApplication, etc.
>
> Internal stuff are less commented, and I agree there should be more
> comments here too, but I think it's less important.
>
> Nicolas
>
>
> Le lundi 15 novembre 2010 à 11:40 +0100, Friedrich Dominicus a écrit :
>> Janko Mivšek <[hidden email]> writes:
>>
>>> Dear all,
>>>
>>> Code statistics extended with several graphs is now available at Google
>>> Docs:
>>> https://spreadsheets.google.com/ccc?key=0Atnb1W9vuq9ndG4wbUpxNXpKQnFZRlFyQXpHclhZa2c&hl=en#gid=1
>>>
>>> I added graphs of three distributions:
>>>
>>>  - number of methods in classes
>>>  - class inheritance depth
>>>  - number of lines in methods
>>>
>>> Tests and comments section was also added.
>>>
>>>                           Aida  Seaside  Iliad
>>>   Nr of test methods       67     914     412
>>>   Avg tests/class         0,5      1      1,6
>>>
>>>   % of commented methods  45%     23%       5%
>>>   % of commented classes  32%     39%      13%
>>>
>>>
>>> Quite interesting results and again a lot of food for discussion!
>> Indeed AIDA and Seaside need more tests and Iliad more comments ;-)
>>
>> Now the question is is Iliad so readable that it does not need comments
>> ;-)
>>
>> I think discussing somethong upon such numbers is not a worthwhile
>> undertaking. Too many open questions which may it feasible to "judge"
>> something..
>>
>> Regardss
>> Friedrich
>>
>>
>>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Janko Mivšek
In reply to this post by FDominicus
On 15. 11. 2010 11:40, Friedrich Dominicus wrote:

>> Quite interesting results and again a lot of food for discussion!
> Indeed AIDA and Seaside need more tests and Iliad more comments ;-)
>
> Now the question is is Iliad so readable that it does not need comments
> ;-)
>
> I think discussing somethong upon such numbers is not a worthwhile
> undertaking. Too many open questions which may it feasible to "judge"
> something..

But at least we have those numbers there, for a first time. Those
numbers (and some additional to come) can be a good start to measure a
code quality at one side and code understandability at the other. Which
seems not to be one and the same thing, code quality seems not necessary
lead to code understability. So question is if our code quality
standards are actually good or should be redefined?

Specially of you look at first two distribution graphs [1] for nr. of
methods in classes and class inheritance depth, together with
package/class/method numbers.

These show me the two different approaches, school of thought if you
like, to quality/understandability questions. And that's what I actually
wanted to find out with those measurements: to objectively show those
differences and open a discussion about that. To improve Aida, and
subsequently other web frameworks. This can be at the end a contribution
to Smalltalk as a whole!

Janko

[1]
https://spreadsheets.google.com/ccc?key=0Atnb1W9vuq9ndG4wbUpxNXpKQnFZRlFyQXpHclhZa2c&hl=en#gid=1



--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Janko Mivšek
In reply to this post by Janko Mivšek
. and here is the code used for those measurements:

    http://www.squeaksource.com/WebCodeStats.html

Best regards
Janko

On 11. 11. 2010 22:13, Janko Mivšek wrote:

> Dear all,
>
> I'm currently working on comparison between three main web frameworks in
> Smalltalk and here is one interesting result I measured today:
>
> Code stats            Aida    Seaside Iliad
> Nr of packages          1      74      9
> Nr of categories       14     123     26
> Nr of classes         145     943    265
> Nr of methods        4.465   8.758  2.368
> Lines of code       33.578  66.337  9.794
> Avg methods/class     31      9       9
> Avg lines/method     7,5     7,6     4,1
>
> Code is loaded in Pharo with by Metacello configurations, tests are
> included, all code included except Grease, Sport, Swazoo, Magritte.
>
> Note how small number of packages and classes has Aida comparing
> specially to Seaside, but only twice less methods. Is this a reason why
> everyone consider Aida as simple from first sight?
>
> More to come.
>
> Best regards
> Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
In reply to this post by Janko Mivšek
Janko Mivšek <[hidden email]> writes:

> And yes, Aida needs much more tests. Note that Aida was born years
> before test driven development came to light, which is probably one of
> reasons of so few tests. Only really hard parts of Aida (like versioned
> objects) are covered by tests, while most of other not.
>
> Anyone willing to help Aida a bit with writing some tests?
Well I guess a few will come from me maybe ;-)

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
In reply to this post by Janko Mivšek
Janko Mivšek <[hidden email]> writes:

> On 15. 11. 2010 11:40, Friedrich Dominicus wrote:
>
>>> Quite interesting results and again a lot of food for discussion!
>> Indeed AIDA and Seaside need more tests and Iliad more comments ;-)
>>
>> Now the question is is Iliad so readable that it does not need comments
>> ;-)
>>
>> I think discussing somethong upon such numbers is not a worthwhile
>> undertaking. Too many open questions which may it feasible to "judge"
>> something..
>
> But at least we have those numbers there, for a first time. Those
> numbers (and some additional to come) can be a good start to measure a
> code quality at one side and code understandability at the other. Which
> seems not to be one and the same thing, code quality seems not necessary
> lead to code understability. So question is if our code quality
> standards are actually good or should be redefined?
Well the problem is the numbers alone do not tell the whole story. E.g
if you have short methods which are "simple" one would expec less
comments. If you have some piece of code lenghty whith many comments
than you know that you are in a round of trouble
>
> Specially of you look at first two distribution graphs [1] for nr. of
> methods in classes and class inheritance depth, together with
> package/class/method numbers.
>
> These show me the two different approaches, school of thought if you
> like, to quality/understandability questions.
Not that much as in other languages. The base still is quite short
methods. The difference I see mainly in code granularity. I'm still
undecided what may be good or bad. The last books I have read or am
reading are very much for very fine granularity. e.g the Smalltalk books
from Andre Valluh but also from Robert C Martin are in favour of many
classes and very small methods. Anyway the Smalltalk way of things
AFAIKT from my experiences (which are surely lacking) are that
Smalltalkers are used to write small methods. I see a different "way" of
thinkin in the OO camp but also the FP camp.


> And that's what I actually
> wanted to find out with those measurements: to objectively show those
> differences and open a discussion about that. To improve Aida, and
> subsequently other web frameworks. This can be at the end a contribution
> to Smalltalk as a whole!
I agree to some part but disagree about the fact that the numbers alone
are not sufficient. You'd better take some prototypic elements from the
diverse Web Frameworks and/or implement the same solution in any of
them. Unfortunatly to get to some "more" concrete figures you need to
have not just "toy" examples. But who can afford e.g to sponsor a
certain type if web application to be build in the different tools?

And one has to see that none of the Smalltalk Webframeworks are closed,
so I expect that some may look at least sometimes into a different
solution. And probably changes the own code quite often. What probably
won't change is the "big" outline. Aida probably has some core in it
which is in it from the beginning. I expect the same for Seaside and
Iliad.  I expect also that Iliad does have the less fixed structure
because in comparison it's the newest. I don't know if Seaside or Aida
are older but I expect the older systems to be less likely to be
changed.

Of course I may get that all, but to really get a discussion needs some
code from the diffent packages and see how to "refactor" them. So
interesting would be a refatoring rate or the like. Howerver I've not
the slightest idea on how such thing could be calculated...

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

FDominicus
In reply to this post by Janko Mivšek
Just a think I forgot:
There is this no if movement:


http://www.antiifcampaign.com/

I think the Smalltalkers are among the strongest supporters, and I just
mention this excellent boot of Andre Valloud

http://www.lulu.com/product/paperback/a-mentoring-course-on-smalltalk/3788890?productTrackingContext=search_results/search_shelf/center/1

Just see the examples there and I was very suprised. I first found it
extreme but maybe it's just "right".

Regards
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Code stats - Aida vs. Seaside vs. Iliad

Mariano Martinez Peck
Thanks Janko for such useful package.
In less than 5 minutes I have stats for my project ;)


On Mon, Nov 15, 2010 at 2:30 PM, Friedrich Dominicus <[hidden email]> wrote:
Just a think I forgot:
There is this no if movement:


http://www.antiifcampaign.com/

I think the Smalltalkers are among the strongest supporters, and I just
mention this excellent boot of Andre Valloud

http://www.lulu.com/product/paperback/a-mentoring-course-on-smalltalk/3788890?productTrackingContext=search_results/search_shelf/center/1

Just see the examples there and I was very suprised. I first found it
extreme but maybe it's just "right".

Regards
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida