¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: [TDD] Open Source Project Survey

Keith Fogarty
 

Thanks Mark.
Keith's 'distribution of complexity' measurement approach looks interesting for sure. I wonder if it ever became a research paper - a quick check doesn't show anything. It'd be particularly useful if there was some formal identification of test-first, test-last and no-test.
Anyway, I'll ask.
Thanks again for the info,
Keith.
On Tuesday, April 15, 2014 3:12 PM, Mark Levison wrote:
?
Contact Keith Braithewaite he reviewed a number of open source projects that were done test first, last, not at all. His conclusions are quite interesting.

Cheers
Mark


On Mon, Apr 14, 2014 at 5:05 AM, Keith Fogarty <fogarty_keith@...> wrote:

?
Hi,

I was hoping you may be able to help.
I'm working on a MSc. thesis and am looking to identify Open Source Test-First and Test-Last projects for a research experiment.
To this end I was hoping that anyone who has contributed to a Java open source project (and has some overall knowledge of the project) could fill out the attached (short, 12 questions) survey for that project?

My research will look at Design Pattern Usage in Test-First and Test-Last projects and I will post a link here to my research when finished.

Also (as far as I can see) it's been a little while since the last 'What projects are Test-Driven?' request in this group - by way of updating this information I can post the survey findings here (for java projects anyway). ?Of course if you prefer your project not be identified there is a privacy option on the survey.
?
Thanks in advance for your help,
Keith Fogarty.

Link to the survey:

Hi, I was hoping you may be able to help me. I'm currently working on an M.Sc. Thesis and require a number of Test-First and Test-Last subject projects as part o...
Preview by Yahoo



--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?



Re: [TDD] Open Source Project Survey

Mark Levison
 

Contact Keith Braithewaite he reviewed a number of open source projects that were done test first, last, not at all. His conclusions are quite interesting.

Cheers
Mark


On Mon, Apr 14, 2014 at 5:05 AM, Keith Fogarty <fogarty_keith@...> wrote:

?

Hi,

I was hoping you may be able to help.
I'm working on a MSc. thesis and am looking to identify Open Source Test-First and Test-Last projects for a research experiment.
To this end I was hoping that anyone who has contributed to a Java open source project (and has some overall knowledge of the project) could fill out the attached (short, 12 questions) survey for that project?

My research will look at Design Pattern Usage in Test-First and Test-Last projects and I will post a link here to my research when finished.

Also (as far as I can see) it's been a little while since the last 'What projects are Test-Driven?' request in this group - by way of updating this information I can post the survey findings here (for java projects anyway). ?Of course if you prefer your project not be identified there is a privacy option on the survey.
?
Thanks in advance for your help,
Keith Fogarty.

Link to the survey:

Hi, I was hoping you may be able to help me. I'm currently working on an M.Sc. Thesis and require a number of Test-First and Test-Last subject projects as part o...
Preview by Yahoo




--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?


Re: [TDD] Examples of Pojo Free Code?

 

Units of discipline is an interesting way to look at it. I suppose that is analogous to velocity or capacity. The way I look at it is more from a learning perspective. You give people a whole bunch of new situations to look for and new ways that they are supposed to respond and they'll either freeze up or go back to the way they are used to doing it. You give them one or two techniques or ideas and let them practice and rather quickly they'll be hungry for more.?

What I tend to do when I first get access to a client's code is go over it to try to understand it and look for smells along the way. Once I have identified a handful or so I will prioritize them by what seems either most egregious or most prevalent/widespread. I will point out one or two (I used to start with three, now I tend to start with two.) I will also ask questions about anything that seems unusually confusing or out of place.?

The first time around I usually just provide the information and see what they do with it. Sometimes they fire back a lot of follow up questions, sometimes they get defensive, and sometimes they just proactively start looking for the smells themselves or even removing them. Each of those reactions is a situation that can be coached, but each requires a slightly different strategy to get through.?




On Mon, Apr 14, 2014 at 10:03 AM, Mark Levison <mark@...> wrote:
?

George - we agree. Here's how I think of discipline. Most people have only 80-100 units at one time, asking them not to use Setter's or Classes that Eclipse helpful pops up might cost 10 units. I would rather use those 10 units on practicing TDD without outside help in the months after taking a course from me :-)

If it helps George many people don't realize how unique you're - you might have 250 units of discipline at one time. However your world is not the world of others.

Cheers
Mark


On Mon, Apr 14, 2014 at 12:48 PM, George Dinwiddie <lists@...> wrote:
?

Mark,



On 4/14/14, 10:56 AM, Mark Levison wrote:
>
>
> George - thanks (BTW with Ron you seem to be the person I know of the
> most mailing lists - we need to get you some more work :-)

:-) I put in long hours. I do have some availability starting late May.


> I think I touched on your wrapper approach in my previous email. Like
> you I have used it in the past as an approach but it requires additional
> discipline from the dev team. Scrum already tries their discipline and I
> wish to conserve its use :-)

All successful programming requires discipline. I've found that TDD
makes the discipline easy, combining it with ease of work and peace of mind.

- George


>
> Danke
> Mark
>
>
> On Sat, Apr 12, 2014 at 1:38 PM, George Dinwiddie
> <lists@... lists@...>> wrote:
>
> __

>
> Mark,
>
>
>
> On 4/11/14, 1:50 PM, Mark Levison wrote:
> >
> >
> > I'm running an Agile Development course with some wonderful
> people at a
> > client who're addicted to their existing ORM. We've been
> discussing the
> > evil involved in Data Classes (i.e. classes with no behaviour).
> In their
> > world the habit of creating data classes comes from the fact that
> their
> > ORM (Hibernate and JPA) creates POJO type objects and they manipulate
> > them. They get the problem but would live to see an example of
> project
> > that doesn't do this.
> >
> > Do you know an OpenSource project that doesn't a use POJOs to get its
> > data in/out of an RDBMS? Do you know an ORM that helps people avoid
> > creating Data Classes?
>
> I don't have any examples to show, but a pattern I've used successfully
> is to encapsulate the "data object" within a business domain object.
> Typically I've used the data object as a parameter to the domain object
> consctructor, and provided a getter for when (if) I needed to recover
> the primitive for some reason. Often the user (ORM in this case)
> doesn't
> actually need a data-only object, anyway. It just needs some
> bean-pattern getters and setters for the fields it's to understand.
>
> - George
>
> --
> ----------------------------------------------------------
> * George Dinwiddie *
> Software Development
> Consultant and Coach
> ----------------------------------------------------------
>
>
>
>
> --
> headshot-square-300x300
> <> *Mark
> Levison* | 1 (877) 248-8277 | Twitter <> |
> LinkedIn <> | Facebook
> <>
> Certified ScrumMaster Training: Vancouver
> <> | Edmonton
> <> | Ottawa
> <> | Montreal
> <> | Toronto
> <>
> Agile Pain Relief Consulting <> | Notes from
> a Tool User <>
> Proud Sponsor of Agile Tour Gatineau Ottawa <> and
> Agile Coach Camp Canada <>

>
>
>
>

--
----------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------




--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?



Re: [TDD] Examples of Pojo Free Code?

Mark Levison
 

George - we agree. Here's how I think of discipline. Most people have only 80-100 units at one time, asking them not to use Setter's or Classes that Eclipse helpful pops up might cost 10 units. I would rather use those 10 units on practicing TDD without outside help in the months after taking a course from me :-)

If it helps George many people don't realize how unique you're - you might have 250 units of discipline at one time. However your world is not the world of others.

Cheers
Mark


On Mon, Apr 14, 2014 at 12:48 PM, George Dinwiddie <lists@...> wrote:

?

Mark,



On 4/14/14, 10:56 AM, Mark Levison wrote:
>
>
> George - thanks (BTW with Ron you seem to be the person I know of the
> most mailing lists - we need to get you some more work :-)

:-) I put in long hours. I do have some availability starting late May.


> I think I touched on your wrapper approach in my previous email. Like
> you I have used it in the past as an approach but it requires additional
> discipline from the dev team. Scrum already tries their discipline and I
> wish to conserve its use :-)

All successful programming requires discipline. I've found that TDD
makes the discipline easy, combining it with ease of work and peace of mind.

- George


>
> Danke
> Mark
>
>
> On Sat, Apr 12, 2014 at 1:38 PM, George Dinwiddie
> <lists@... lists@...>> wrote:
>
> __

>
> Mark,
>
>
>
> On 4/11/14, 1:50 PM, Mark Levison wrote:
> >
> >
> > I'm running an Agile Development course with some wonderful
> people at a
> > client who're addicted to their existing ORM. We've been
> discussing the
> > evil involved in Data Classes (i.e. classes with no behaviour).
> In their
> > world the habit of creating data classes comes from the fact that
> their
> > ORM (Hibernate and JPA) creates POJO type objects and they manipulate
> > them. They get the problem but would live to see an example of
> project
> > that doesn't do this.
> >
> > Do you know an OpenSource project that doesn't a use POJOs to get its
> > data in/out of an RDBMS? Do you know an ORM that helps people avoid
> > creating Data Classes?
>
> I don't have any examples to show, but a pattern I've used successfully
> is to encapsulate the "data object" within a business domain object.
> Typically I've used the data object as a parameter to the domain object
> consctructor, and provided a getter for when (if) I needed to recover
> the primitive for some reason. Often the user (ORM in this case)
> doesn't
> actually need a data-only object, anyway. It just needs some
> bean-pattern getters and setters for the fields it's to understand.
>
> - George
>
> --
> ----------------------------------------------------------
> * George Dinwiddie *
> Software Development
> Consultant and Coach
> ----------------------------------------------------------
>
>
>
>
> --
> headshot-square-300x300
> <> *Mark
> Levison* | 1 (877) 248-8277 | Twitter <> |
> LinkedIn <> | Facebook
> <>
> Certified ScrumMaster Training: Vancouver
> <> | Edmonton
> <> | Ottawa
> <> | Montreal
> <> | Toronto
> <>
> Agile Pain Relief Consulting <> | Notes from
> a Tool User <>
> Proud Sponsor of Agile Tour Gatineau Ottawa <> and
> Agile Coach Camp Canada <>

>
>
>
>

--
----------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------




--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?


Re: [TDD] Examples of Pojo Free Code?

 

Mark,

On 4/14/14, 10:56 AM, Mark Levison wrote:


George - thanks (BTW with Ron you seem to be the person I know of the
most mailing lists - we need to get you some more work :-)
:-) I put in long hours. I do have some availability starting late May.

I think I touched on your wrapper approach in my previous email. Like
you I have used it in the past as an approach but it requires additional
discipline from the dev team. Scrum already tries their discipline and I
wish to conserve its use :-)
All successful programming requires discipline. I've found that TDD
makes the discipline easy, combining it with ease of work and peace of mind.

- George


Danke
Mark


On Sat, Apr 12, 2014 at 1:38 PM, George Dinwiddie
<lists@... <mailto:lists@...>> wrote:

__

Mark,



On 4/11/14, 1:50 PM, Mark Levison wrote:
>
>
> I'm running an Agile Development course with some wonderful
people at a
> client who're addicted to their existing ORM. We've been
discussing the
> evil involved in Data Classes (i.e. classes with no behaviour).
In their
> world the habit of creating data classes comes from the fact that
their
> ORM (Hibernate and JPA) creates POJO type objects and they manipulate
> them. They get the problem but would live to see an example of
project
> that doesn't do this.
>
> Do you know an OpenSource project that doesn't a use POJOs to get its
> data in/out of an RDBMS? Do you know an ORM that helps people avoid
> creating Data Classes?

I don't have any examples to show, but a pattern I've used successfully
is to encapsulate the "data object" within a business domain object.
Typically I've used the data object as a parameter to the domain object
consctructor, and provided a getter for when (if) I needed to recover
the primitive for some reason. Often the user (ORM in this case)
doesn't
actually need a data-only object, anyway. It just needs some
bean-pattern getters and setters for the fields it's to understand.

- George

--
----------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------




--
headshot-square-300x300
<> *Mark
Levison* | 1 (877) 248-8277 | Twitter <> |
LinkedIn <> | Facebook
<>
Certified ScrumMaster Training: Vancouver
<> | Edmonton
<> | Ottawa
<> | Montreal
<> | Toronto
<>
Agile Pain Relief Consulting <> | Notes from
a Tool User <>
Proud Sponsor of Agile Tour Gatineau Ottawa <> and
Agile Coach Camp Canada <>



--
----------------------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------------------


Re: [TDD] Examples of Pojo Free Code?

Donaldson, John
 

¿ªÔÆÌåÓý

Mark,

?

Both Hibernate and Toplink support JPA.

And, I think Toplink has been taken over by Eclipse to become EclipseLink ¨C and will be taken forward as open source.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Mark Levison
Sent: 14 April 2014 16:53
To: Testdrivendevelopment
Subject: Re: [TDD] Examples of Pojo Free Code?

?




Adam - thanks for taking the time to reply. I showed this email to the person who had been making the comments and all of a sudden this isn't what he thinks he had been saying :-) I've never heard that before have you?

?

Your advice and comments are overall sound. ORMs still bug me to a fair degree:

?

  1. You have real classes with behaviour, a null constructor and setter's - ugh I hate setters they get misused by accident, people call them innocently and then all of sudden you have a class who's data is in an odd state and you've no idea when/how it happened
  2. You wrap the Data Class in a Real class - avoiding the setter problem but relying on the convention that everyone remembers and never has enough discipline never to access the Data Objects.

I would have more respect for an ORM that doesn't require setters, JPA (never used by me) seems closer to the mark than Hibernate (which I have used).

?

Avi - in quoting the original person I think I misquoted POJO point.

?

All thanks for the comments, insightful as usual. One last thing I would love to see an open source project that persists objects to a Database that you think does the job well, cleanly, effectively. My goal is to have a shining example of good code for the client when I next back in their neck of the woods.

?

Cheers

Mark

?

On Fri, Apr 11, 2014 at 4:20 PM, Adam Sroka <adam.sroka@...> wrote:

?

There's nothing about the ORM that forces them to use data classes. The framework typically requires you to follow some conventions and/or configure some options so that it knows how to match types. Also, you typically have to provide a no-arg constructor so that it can instantiate objects for you. Otherwise, they call them "plain old java objects" for a reason. They can and should have behavior.?

?

My advice would be the same as for any heavy framework use:

?

1) YAGNI??

2) Test-drive a wrapper around the framework APIs you intend to use so that you can reference them directly in only a couple of places. It blows my mind why more people don't do this.?

3) Use a gradual changeover or parallel change strategy to move current uses of the framework to the new wrapper. This could take months or years to fully complete depending on how large and complex the legacy code is. Prioritize new functionality and/or areas that have caused you difficulty in the past.?

?

Beyond that, it sounds like there is a interesting cultural/educational problem. I would want to investigate to understand why they believe something that is clearly false: ORMs force them to write poorly factored and/or non-OO code. This is simply not the case. For example, Industrial Logic uses Hibernate in their eLearning product code (written in Java) and there are plenty examples of well factored classes in there.?

?

I have also run into a tendency to:

?

?a) copy contrived examples from the ORM documentation that needlessly couple you to the framework then blame the framework.?

?

b) misinterpret some design book as suggesting these are ORM "best practices." For example, Domain Driven Design, by Eric Evans, seems to be misinterpreted as saying that persistent "Entities" are just data and "Services" operate on that data. He describes both of these patterns but never says that they should be implemented that way.?

?

If you convince yourself that all the behavior belongs in static services (libraries) and all the data belongs in data classes (structs) then you should really be writing in C. That's not a knock on C. I love C. Java was designed for a different paradigm, though, and if you are going to work with it professionally you should know what that is.?

?

On Fri, Apr 11, 2014 at 10:50 AM, Mark Levison <mark@...> wrote:

?

I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

?

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

?

BTW I'm asking on this list lacking a better place.

?

Cheers

Mark


?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?

?



?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?





Re: [TDD] Examples of Pojo Free Code?

Mark Levison
 

George - thanks (BTW with Ron you seem to be the person I know of the most mailing lists - we need to get you some more work :-)

I think I touched on your wrapper approach in my previous email. Like you I have used it in the past as an approach but it requires additional discipline from the dev team. Scrum already tries their discipline and I wish to conserve its use :-)

Danke
Mark


On Sat, Apr 12, 2014 at 1:38 PM, George Dinwiddie <lists@...> wrote:
?

Mark,



On 4/11/14, 1:50 PM, Mark Levison wrote:
>
>
> I'm running an Agile Development course with some wonderful people at a
> client who're addicted to their existing ORM. We've been discussing the
> evil involved in Data Classes (i.e. classes with no behaviour). In their
> world the habit of creating data classes comes from the fact that their
> ORM (Hibernate and JPA) creates POJO type objects and they manipulate
> them. They get the problem but would live to see an example of project
> that doesn't do this.
>
> Do you know an OpenSource project that doesn't a use POJOs to get its
> data in/out of an RDBMS? Do you know an ORM that helps people avoid
> creating Data Classes?

I don't have any examples to show, but a pattern I've used successfully
is to encapsulate the "data object" within a business domain object.
Typically I've used the data object as a parameter to the domain object
consctructor, and provided a getter for when (if) I needed to recover
the primitive for some reason. Often the user (ORM in this case) doesn't
actually need a data-only object, anyway. It just needs some
bean-pattern getters and setters for the fields it's to understand.

- George

--
----------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------




--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?


Re: [TDD] Examples of Pojo Free Code?

Mark Levison
 

Adam - thanks for taking the time to reply. I showed this email to the person who had been making the comments and all of a sudden this isn't what he thinks he had been saying :-) I've never heard that before have you?

Your advice and comments are overall sound. ORMs still bug me to a fair degree:

  1. You have real classes with behaviour, a null constructor and setter's - ugh I hate setters they get misused by accident, people call them innocently and then all of sudden you have a class who's data is in an odd state and you've no idea when/how it happened
  2. You wrap the Data Class in a Real class - avoiding the setter problem but relying on the convention that everyone remembers and never has enough discipline never to access the Data Objects.
I would have more respect for an ORM that doesn't require setters, JPA (never used by me) seems closer to the mark than Hibernate (which I have used).

Avi - in quoting the original person I think I misquoted POJO point.

All thanks for the comments, insightful as usual. One last thing I would love to see an open source project that persists objects to a Database that you think does the job well, cleanly, effectively. My goal is to have a shining example of good code for the client when I next back in their neck of the woods.

Cheers
Mark


On Fri, Apr 11, 2014 at 4:20 PM, Adam Sroka <adam.sroka@...> wrote:
?

There's nothing about the ORM that forces them to use data classes. The framework typically requires you to follow some conventions and/or configure some options so that it knows how to match types. Also, you typically have to provide a no-arg constructor so that it can instantiate objects for you. Otherwise, they call them "plain old java objects" for a reason. They can and should have behavior.?

My advice would be the same as for any heavy framework use:

1) YAGNI??
2) Test-drive a wrapper around the framework APIs you intend to use so that you can reference them directly in only a couple of places. It blows my mind why more people don't do this.?
3) Use a gradual changeover or parallel change strategy to move current uses of the framework to the new wrapper. This could take months or years to fully complete depending on how large and complex the legacy code is. Prioritize new functionality and/or areas that have caused you difficulty in the past.?

Beyond that, it sounds like there is a interesting cultural/educational problem. I would want to investigate to understand why they believe something that is clearly false: ORMs force them to write poorly factored and/or non-OO code. This is simply not the case. For example, Industrial Logic uses Hibernate in their eLearning product code (written in Java) and there are plenty examples of well factored classes in there.?

I have also run into a tendency to:

?a) copy contrived examples from the ORM documentation that needlessly couple you to the framework then blame the framework.?

b) misinterpret some design book as suggesting these are ORM "best practices." For example, Domain Driven Design, by Eric Evans, seems to be misinterpreted as saying that persistent "Entities" are just data and "Services" operate on that data. He describes both of these patterns but never says that they should be implemented that way.?

If you convince yourself that all the behavior belongs in static services (libraries) and all the data belongs in data classes (structs) then you should really be writing in C. That's not a knock on C. I love C. Java was designed for a different paradigm, though, and if you are going to work with it professionally you should know what that is.?


On Fri, Apr 11, 2014 at 10:50 AM, Mark Levison <mark@...> wrote:
?

I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

BTW I'm asking on this list lacking a better place.

Cheers
Mark


--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?





--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?


Re: [TDD] Examples of Pojo Free Code?

 

Agreed. I was asking Mark

On Apr 13, 2014 7:14 PM, "Donaldson, John" <john.m.donaldson@...> wrote:

?

Avi,

?

Not sure if your question was to me, or to Mark.

?

If it was intended for me, then POJOs are wonderful, but you will in any case need to manage the interface to the database.

With an ORM this is part of the framework ¨C but if you roll your own, you¡¯ll need to construct it.

Of course, YAGNI ¨C but still¡­

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Avi Kessner
Sent: 13 April 2014 14:34
To: testdrivendevelopment@...
Subject: Re: [TDD] Examples of Pojo Free Code?

?




Sorry for my ignorance, but google didn't help me.
Whats the problem with using POJOs??


brought to you by the letters A, V, and I
and the number 47

?

On Sun, Apr 13, 2014 at 3:10 PM, Donaldson, John <john.m.donaldson@...> wrote:

?

Mark,

?

I am pretty much in agreement with you. (Struggling with a legacy Toplink app at the moment, Hibernate before that).

But, don¡¯t forget that an ORM framework is also providing you with other useful stuff around sessions, multi-user access, one-many/many-one/many-many mappings, error handling, transactions and so on.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Mark Levison
Sent: 11 April 2014 19:50
To: Testdrivendevelopment
Subject: [TDD] Examples of Pojo Free Code?

?



I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

?

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

?

BTW I'm asking on this list lacking a better place.

?

Cheers

Mark


?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?



?





Open Source Project Survey

Keith Fogarty
 

Hi,

I was hoping you may be able to help.
I'm working on a MSc. thesis and am looking to identify Open Source Test-First and Test-Last projects for a research experiment.
To this end I was hoping that anyone who has contributed to a Java open source project (and has some overall knowledge of the project) could fill out the attached (short, 12 questions) survey for that project?

My research will look at Design Pattern Usage in Test-First and Test-Last projects and I will post a link here to my research when finished.

Also (as far as I can see) it's been a little while since the last 'What projects are Test-Driven?' request in this group - by way of updating this information I can post the survey findings here (for java projects anyway). ?Of course if you prefer your project not be identified there is a privacy option on the survey.
?
Thanks in advance for your help,
Keith Fogarty.

Link to the survey:


Re: [TDD] Examples of Pojo Free Code?

Donaldson, John
 

¿ªÔÆÌåÓý

Avi,

?

Not sure if your question was to me, or to Mark.

?

If it was intended for me, then POJOs are wonderful, but you will in any case need to manage the interface to the database.

With an ORM this is part of the framework ¨C but if you roll your own, you¡¯ll need to construct it.

Of course, YAGNI ¨C but still¡­

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Avi Kessner
Sent: 13 April 2014 14:34
To: testdrivendevelopment@...
Subject: Re: [TDD] Examples of Pojo Free Code?

?




Sorry for my ignorance, but google didn't help me.
Whats the problem with using POJOs??


brought to you by the letters A, V, and I
and the number 47

?

On Sun, Apr 13, 2014 at 3:10 PM, Donaldson, John <john.m.donaldson@...> wrote:

?

Mark,

?

I am pretty much in agreement with you. (Struggling with a legacy Toplink app at the moment, Hibernate before that).

But, don¡¯t forget that an ORM framework is also providing you with other useful stuff around sessions, multi-user access, one-many/many-one/many-many mappings, error handling, transactions and so on.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Mark Levison
Sent: 11 April 2014 19:50
To: Testdrivendevelopment
Subject: [TDD] Examples of Pojo Free Code?

?



I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

?

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

?

BTW I'm asking on this list lacking a better place.

?

Cheers

Mark


?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?



?





Re: [TDD] Examples of Pojo Free Code?

 

Sorry for my ignorance, but google didn't help me.
Whats the problem with using POJOs??

brought to you by the letters A, V, and I
and the number 47


On Sun, Apr 13, 2014 at 3:10 PM, Donaldson, John <john.m.donaldson@...> wrote:
?

Mark,

?

I am pretty much in agreement with you. (Struggling with a legacy Toplink app at the moment, Hibernate before that).

But, don¡¯t forget that an ORM framework is also providing you with other useful stuff around sessions, multi-user access, one-many/many-one/many-many mappings, error handling, transactions and so on.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Mark Levison
Sent: 11 April 2014 19:50
To: Testdrivendevelopment
Subject: [TDD] Examples of Pojo Free Code?

?




I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

?

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

?

BTW I'm asking on this list lacking a better place.

?

Cheers

Mark


?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?






Re: [TDD] Examples of Pojo Free Code?

Donaldson, John
 

¿ªÔÆÌåÓý

Mark,

?

I am pretty much in agreement with you. (Struggling with a legacy Toplink app at the moment, Hibernate before that).

But, don¡¯t forget that an ORM framework is also providing you with other useful stuff around sessions, multi-user access, one-many/many-one/many-many mappings, error handling, transactions and so on.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of Mark Levison
Sent: 11 April 2014 19:50
To: Testdrivendevelopment
Subject: [TDD] Examples of Pojo Free Code?

?




I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

?

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

?

BTW I'm asking on this list lacking a better place.

?

Cheers

Mark


?

--

Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?





Re: [TDD] Examples of Pojo Free Code?

 

Mark,

On 4/11/14, 1:50 PM, Mark Levison wrote:


I'm running an Agile Development course with some wonderful people at a
client who're addicted to their existing ORM. We've been discussing the
evil involved in Data Classes (i.e. classes with no behaviour). In their
world the habit of creating data classes comes from the fact that their
ORM (Hibernate and JPA) creates POJO type objects and they manipulate
them. They get the problem but would live to see an example of project
that doesn't do this.

Do you know an OpenSource project that doesn't a use POJOs to get its
data in/out of an RDBMS? Do you know an ORM that helps people avoid
creating Data Classes?
I don't have any examples to show, but a pattern I've used successfully is to encapsulate the "data object" within a business domain object. Typically I've used the data object as a parameter to the domain object consctructor, and provided a getter for when (if) I needed to recover the primitive for some reason. Often the user (ORM in this case) doesn't actually need a data-only object, anyway. It just needs some bean-pattern getters and setters for the fields it's to understand.

- George

--
----------------------------------------------------------------------
* George Dinwiddie *
Software Development
Consultant and Coach
----------------------------------------------------------------------


Re: [TDD] Examples of Pojo Free Code?

 

There's nothing about the ORM that forces them to use data classes. The framework typically requires you to follow some conventions and/or configure some options so that it knows how to match types. Also, you typically have to provide a no-arg constructor so that it can instantiate objects for you. Otherwise, they call them "plain old java objects" for a reason. They can and should have behavior.?

My advice would be the same as for any heavy framework use:

1) YAGNI??
2) Test-drive a wrapper around the framework APIs you intend to use so that you can reference them directly in only a couple of places. It blows my mind why more people don't do this.?
3) Use a gradual changeover or parallel change strategy to move current uses of the framework to the new wrapper. This could take months or years to fully complete depending on how large and complex the legacy code is. Prioritize new functionality and/or areas that have caused you difficulty in the past.?

Beyond that, it sounds like there is a interesting cultural/educational problem. I would want to investigate to understand why they believe something that is clearly false: ORMs force them to write poorly factored and/or non-OO code. This is simply not the case. For example, Industrial Logic uses Hibernate in their eLearning product code (written in Java) and there are plenty examples of well factored classes in there.?

I have also run into a tendency to:

?a) copy contrived examples from the ORM documentation that needlessly couple you to the framework then blame the framework.?

b) misinterpret some design book as suggesting these are ORM "best practices." For example, Domain Driven Design, by Eric Evans, seems to be misinterpreted as saying that persistent "Entities" are just data and "Services" operate on that data. He describes both of these patterns but never says that they should be implemented that way.?

If you convince yourself that all the behavior belongs in static services (libraries) and all the data belongs in data classes (structs) then you should really be writing in C. That's not a knock on C. I love C. Java was designed for a different paradigm, though, and if you are going to work with it professionally you should know what that is.?


On Fri, Apr 11, 2014 at 10:50 AM, Mark Levison <mark@...> wrote:
?

I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

BTW I'm asking on this list lacking a better place.

Cheers
Mark


--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?



Examples of Pojo Free Code?

Mark Levison
 

I'm running an Agile Development course with some wonderful people at a client who're addicted to their existing ORM. We've been discussing the evil involved in Data Classes (i.e. classes with no behaviour). In their world the habit of creating data classes comes from the fact that their ORM (Hibernate and JPA) creates POJO type objects and they manipulate them. They get the problem but would live to see an example of project that doesn't do this.

Do you know an OpenSource project that doesn't a use POJOs to get its data in/out of an RDBMS? Do you know an ORM that helps people avoid creating Data Classes?

BTW I'm asking on this list lacking a better place.

Cheers
Mark


--
Mark Levison?| 1 (877) 248-8277 |??|??|?
Certified ScrumMaster Training:??|??|??|??|?
?|?
Proud Sponsor of??and?


Re: [TDD] How to TDD JavaScript so it thinks it is in a browser.

Adam Miller
 

There are plenty of options for doing TDD with Javascript, qunit with phantomjs is another one.


On Sun, Apr 6, 2014 at 3:52 PM, Adam Sroka <adam.sroka@...> wrote:
?

Karma is a kick ass tool for integration testing. It's better if you can test most of the "business logic" with jsdom, a few mocks, or less. The tests will be super fast that way.?



On Sunday, April 6, 2014, Yoann R. <artissae@...> wrote:
?

I usually TDD with node.js and karma. It allows me to test my code in various browsers
at the same time.

Cheers,

Yoann

Le 4 avr. 2014 23:47, "Nayan Hajratwala" <nayan@...> a ¨¦crit :
?

Have you tried webdriver + phantomjs?

---
Nayan Hajratwala ... @nhajratw ... 734.658.6032 ...

On Apr 4, 2014, at 5:35 PM, Ian <hobson42@...> wrote:

?

Hi all,

How can I set up some programmed tests to test JavaScript, so it thinks
its in a browser?

The JavaScript code modifies the style objects and the DOM.

Have tried various utilities that claim to test JavaScript in the
browser, and they have
proved impractically slow. (A paste of a 25 character string took over 3
minutes!)

So I guess the JavaScript has to be run elsewhere (WSH?) and made to
think it is in a browser,
but I have no ideas how to do this.

I can use Windows or Linux - (No mac :( ).

Thanks

Ian



Re: [TDD] How to TDD JavaScript so it thinks it is in a browser.

 

Karma is a kick ass tool for integration testing. It's better if you can test most of the "business logic" with jsdom, a few mocks, or less. The tests will be super fast that way.?


On Sunday, April 6, 2014, Yoann R. <artissae@...> wrote:
?

I usually TDD with node.js and karma. It allows me to test my code in various browsers
at the same time.

Cheers,

Yoann

Le 4 avr. 2014 23:47, "Nayan Hajratwala" <nayan@...> a ¨¦crit :
?

Have you tried webdriver + phantomjs?

---
Nayan Hajratwala ... @nhajratw ... 734.658.6032 ...

On Apr 4, 2014, at 5:35 PM, Ian <hobson42@...> wrote:

?

Hi all,

How can I set up some programmed tests to test JavaScript, so it thinks
its in a browser?

The JavaScript code modifies the style objects and the DOM.

Have tried various utilities that claim to test JavaScript in the
browser, and they have
proved impractically slow. (A paste of a 25 character string took over 3
minutes!)

So I guess the JavaScript has to be run elsewhere (WSH?) and made to
think it is in a browser,
but I have no ideas how to do this.

I can use Windows or Linux - (No mac :( ).

Thanks

Ian


Re: [TDD] How to TDD JavaScript so it thinks it is in a browser.

 

I usually TDD with node.js and karma. It allows me to test my code in various browsers
at the same time.

Cheers,

Yoann

Le 4 avr. 2014 23:47, "Nayan Hajratwala" <nayan@...> a ¨¦crit :

?

Have you tried webdriver + phantomjs?

---
Nayan Hajratwala ... @nhajratw ... 734.658.6032 ...

On Apr 4, 2014, at 5:35 PM, Ian <hobson42@...> wrote:

?

Hi all,

How can I set up some programmed tests to test JavaScript, so it thinks
its in a browser?

The JavaScript code modifies the style objects and the DOM.

Have tried various utilities that claim to test JavaScript in the
browser, and they have
proved impractically slow. (A paste of a 25 character string took over 3
minutes!)

So I guess the JavaScript has to be run elsewhere (WSH?) and made to
think it is in a browser,
but I have no ideas how to do this.

I can use Windows or Linux - (No mac :( ).

Thanks

Ian


Re: [TDD] Testing a class which utilizes randomness

Michael Hill
 

jarod...

actually, to validate a PRNG is a very complex piece of sophisticated statistical analysis.?

as an example, let's take your observation. the numbers 1,2,3,4...n, served in that order, will certainly pass your proposed bin for any number of bins that's a divisor of n.

try knuth, volume 2, which dedicates over a third of its text to PRNG algorithms and their analyses.

(a long and entirely irrelevant aside, cuz i've always been fascinated with this stuff: if you have knuth, check out his algorithm A, p. 27. this is an extremely fast (addition only) algorithm.?

curiously, I've never seen an analysis of algorithm A that rejects it. but I have seen that virtually *all* of the people who give their lives over to such things consistently choose far more complex algorithms, and i'm betting they have their reasons. i've used it several times, but because i needed very long cycles. most default language libraries have PRNGs with cycles in the low thousands, which is pathetic. algorithm A is 2^54th periodicity.

if anyone knows of a serious analysis of A, i'd love to see it.?

if a person wanted high-grade PRNG they'd need to research the alternatives and pick a serious one. actual cryptologists use hardware RNG's rather than algorithms. time periods between alpha particle reception is one way, and there are others.)

seeya,
hill






On Fri, Apr 4, 2014 at 1:55 PM, Jarod Eells <jarod+yahoo@...> wrote:
?

On Fri, Apr 04, 2014 at 12:23:49PM -0400, Mark Levison wrote:
> Desirable? - by definition - randomness can and should occasionally
> duplicate something. Testing a random number generator is very hard.
>
> Cheers
> Mark

Testing a RNG doesn't have to be hard.
Just have to roll the dice a sufficient number of times and bin out the results.
Then check that the bins are filled according to the expected statistical distribution.
If you want a higher accuracy for your test then make more bins and/or roll more numbers.

Jarod Eells