Talk:Active record pattern

From WikiProjectMed
Jump to navigation Jump to search

Applicability

I think enterprise applications shouldn't link to java enterprise applications. These techniques are really applicable to more, and the link is misleading. ~JWHPryor

I don't think LINQ is an implementation of Active Record. It seems to just add a veneer on top of sql statements, rather than creating an maintaining a whole object.

It definitely is not. Besides, it was just thrown in for no reason. I'm removing it. --AndreFillipe 11:00, 4 January 2007 (UTC)[reply]

What about Enterprise Java Beans - don't they fit the bill?

Perhaps we could have a section talking about the pros/cons of having your entity domain classes aware of their storage mechanism?

By what criteria are some of the open source implementation links allowed to remain and others removed? -68.58.169.229 (talk) 04:48, 25 January 2008 (UTC)[reply]

Hu12 please explain why the references to Rails active record and the C++ implementation from butterfat were remove? —Preceding unsigned comment added by 24.214.173.82 (talk) 05:00, 25 January 2008 (UTC)[reply]

Django

Why is Django not mentioned here? Remove the word "new" from the pseudo-code example, and that's exactly what their model access looks like. —Preceding unsigned comment added by 205.232.42.46 (talk) 19:53, 24 May 2010 (UTC)[reply]

some thoughts

The "pseudo-code" is valid JavaScript, although I don't know of any implementations of Active Record in JS.

I'm making the following changes: pointing out that it's common in software that accesses databases (enterprise or no), but acknowledging Martin Fowler's "Patterns of Enterprise Application Architecture" as the source of the name.

Kragen Javier Sitaker (talk) 20:38, 10 April 2008 (UTC)[reply]

Actually, I believe the code was originally valid code for Ruby and ActiveRecord, and it seems to have mutated to JavaScript "pseudocode" while no one was looking, which is a bit funny if there really is no AR-based frameworks for JS... =) --wwwwolf (barks/growls) 19:20, 15 August 2008 (UTC)[reply]

Command Pattern Similarity

To me the Active Record Pattern looks very similar to the Command Pattern, with the Active Record Pattern basically just being an implementation of the Command Pattern. I know these examples are little contrived but if using the Command pattern they might look something like this:

partAdder = new PartAdder()
partAdder.name = "Sample part"
partAdder.price = 123.45
partAdder.execute()

And Select:

partFinder = new PartFinder()
partFinder.add_requirement_is_equal("name", "Sample part")
partFinder.add_requirement_is_greater_than("price", 10.0)
b = partFinder.execute()

I just think the article could mention the similarity perhaps. Hullo exclamation mark (talk) 13:15, 8 February 2010 (UTC)[reply]

Python - plagiarism?

The section on Elixir in Python is a direct copy of what is on the Elixir wiki (http://elixir.ematia.de/trac/wiki) - I only assume that the elixir wiki's description came first - it was the elixir page that brought me to this wikipedia page in the first place. -dashavoo —Preceding unsigned comment added by 94.172.43.66 (talk) 21:37, 20 June 2010 (UTC)[reply]

DAO

Why does the article mention a desire to merge with DAO? I do not see any discussions here concering the idea, I myself oppose it. So I suggest to remove the remark from the beginning of the article. Remove it for good or move it to the talk page...--Karl Brodowsky (talk) 19:36, 12 July 2010 (UTC)[reply]

symfony

symfony does not bundle its own orm. it uses doctrine (by default) or propel. —Preceding unsigned comment added by 85.8.70.161 (talk) 10:11, 8 December 2010 (UTC)[reply]

This is now fixed. Billyoneal (talk) 20:31, 17 February 2011 (UTC)[reply]

Static Methods

The "Criticism" segment talking about static methods doesn't make sense. Propel, for example, does not do anything in terms of static methods, but certainly is an ActiveRecord implementation. Therefore, I think this point is really moot, and will be nuking that entire section unless someone can come up with a reasonable counterpoint. Billyoneal (talk) 20:31, 17 February 2011 (UTC)[reply]

Encapsulation

The bit about breaking encapsulation doesn't make any sense. The whole point of active record is that it does encapsulate data access into the business objects. Grauenwolf (talk) 07:19, 31 March 2011 (UTC)[reply]

CodeIgniter has no ActiveRecord

Just removed this for the second time: CodeIgniter calls its Query Builder "ActiveRecord" which is both misleading and wrong. CI's implementation has nothing to do with implementing this pattern. —Preceding unsigned comment added by 87.212.196.114 (talk) 15:13, 23 May 2011 (UTC)[reply]

ActiveJDBC

The description of ActiveJDBC looks like an ad. I think that it should be rewritten in a more objetive way

For example is not true that ActiveJDBC requires zero configuration, and there is no benchmark to support the claim that it's "lightweight and fast". — Diegof79 (talk) 21:36, 9 December 2011 (UTC).[reply]

Object/Row Identification/Linking

A key component of the Active Record pattern, is the link between the in-memory object and the database (or view) row it represents - usually in the form of some sort of (in-memory object) ID that maps to a db table/row primary key. This is different than the object attribute/table column data-based mapping; identification is the critical piece that typically facilitates the retrieval/saving between object and row (ties the 2 together) as noted by Fowler, et. al. I feel this needs more attention n this discussion. — Preceding unsigned comment added by 66.192.226.98 (talk) 16:50, 3 December 2014 (UTC)[reply]

criticism citation needed. Really?

The sentence "unit testing an active record object without a database becomes difficult" has a "citation needed"-tag. I can't see who should be quoted here for what reason. Is is not obvious in and of itself without some external quote that testing something which needs a database while not having a database would present itself as being difficult? I'd like to remove this tag unless someone can remember how it came to be and what kind of citation the tagger would have liked to see. 130.180.13.90 (talk) 10:01, 9 July 2015 (UTC)[reply]

Symfony

"Symfony's default database layer and ORM "Doctrine" does not implement active record but rather a data mapper approach." This statement is a half truth, and literally taken it is false. Doctrine, which is widely used with Symfony, does use active record; Doctrine 2 which is widely used with Symfony 2 uses data mapper approach. KSiimson (talk) 09:09, 9 September 2016 (UTC)[reply]

Entity Framework CodeFirst - is it ActiveRecord?

Was surprised not to find it on the list here... Alirobe (talk) 18:27, 28 March 2017 (UTC)[reply]

Considered Anti-Pattern

Active Record is not an anti-pattern as per the definition https://en.wikipedia.org/wiki/Anti-pattern.

> The anti-pattern is a commonly-used process, structure or pattern of action that, despite initially appearing to be an appropriate and effective response to a problem, has more bad consequences than good ones

Active Record provides more good consequences than bad. It is because of this that so many frameworks in different languages have widely adopted this pattern.

> Another solution to the problem the anti-pattern is attempting to address exists, which is documented, repeatable and proven to be effective where the anti-pattern is not

Active Record is documented, repeatable, and proven to be effective.

Active Record is an abstraction that makes certain trade-offs in order to facilitate the rapid development of CRUD applications. — Preceding unsigned comment added by Thornycrackers (talkcontribs) 18:05, 6 April 2022 (UTC)[reply]

The sources being used to try to add this anti-pattern stuff are truly awful. Blog posts and Q&A sites are not usable sources on Wikipedia. This is looking a lot like POV pushing. Wikipedia isn't a place to spread a dislike of this pattern, even if a few bloggers happen to agree. MrOllie (talk) 20:39, 6 December 2022 (UTC)[reply]
There are currently only sources by a single blogger. Either we remove the page entirely because of lack of independent sources or we allow a neutral point of view. WP:NPOV — Preceding unsigned comment added by 85.48.184.142 (talk) 08:26, 7 December 2022 (UTC)[reply]
NPOV does not mean WP:FALSEBALANCE. - MrOllie (talk) 12:49, 7 December 2022 (UTC)[reply]